tellcasey
APIAPI Reference

Webhooks

/webhooks

GET
/webhooks

List webhook endpoints

Authorization

apiKeyAuth
AuthorizationBearer <token>

Backend API key for server-to-server calls. Format: sk_live_... or sk_test_...

In: header

Response Body

application/json

curl -X GET "http://localhost:3002/v1/backend/webhooks"
{
  "data": [
    {
      "id": "string",
      "url": "http://example.com",
      "description": "string",
      "event_types": [
        "string"
      ],
      "enabled": true,
      "created_at": "2019-08-24T14:15:22Z"
    }
  ]
}

/webhooks

POST
/webhooks

Create a new webhook endpoint. Returns signing secret for webhook verification.

Authorization

apiKeyAuth
AuthorizationBearer <token>

Backend API key for server-to-server calls. Format: sk_live_... or sk_test_...

In: header

Request Body

application/json

url*string
Formaturi
description?string
event_types?array<>
Default["conversation.completed"]

Response Body

application/json

application/json

curl -X POST "http://localhost:3002/v1/backend/webhooks" \  -H "Content-Type: application/json" \  -d '{    "url": "http://example.com"  }'
{
  "data": {
    "id": "string",
    "url": "http://example.com",
    "description": "string",
    "event_types": [
      "string"
    ],
    "enabled": true,
    "created_at": "2019-08-24T14:15:22Z",
    "secret": "string"
  }
}
{
  "error": {
    "code": "string",
    "message": "string"
  }
}

/webhooks/test

POST
/webhooks/test

Send a test event to all webhook endpoints

Authorization

apiKeyAuth
AuthorizationBearer <token>

Backend API key for server-to-server calls. Format: sk_live_... or sk_test_...

In: header

Response Body

application/json

curl -X POST "http://localhost:3002/v1/backend/webhooks/test"
{
  "data": {
    "success": true,
    "message_id": "string"
  }
}

/webhooks/{id}

GET
/webhooks/{id}

Get a webhook endpoint

Authorization

apiKeyAuth
AuthorizationBearer <token>

Backend API key for server-to-server calls. Format: sk_live_... or sk_test_...

In: header

Path Parameters

id*string

Response Body

application/json

application/json

curl -X GET "http://localhost:3002/v1/backend/webhooks/string"
{
  "data": {
    "id": "string",
    "url": "http://example.com",
    "description": "string",
    "event_types": [
      "string"
    ],
    "enabled": true,
    "created_at": "2019-08-24T14:15:22Z"
  }
}
{
  "error": {
    "code": "string",
    "message": "string"
  }
}

/webhooks/{id}

DELETE
/webhooks/{id}

Delete a webhook endpoint

Authorization

apiKeyAuth
AuthorizationBearer <token>

Backend API key for server-to-server calls. Format: sk_live_... or sk_test_...

In: header

Path Parameters

id*string

Response Body

application/json

curl -X DELETE "http://localhost:3002/v1/backend/webhooks/string"
Empty
{
  "error": {
    "code": "string",
    "message": "string"
  }
}

/webhooks/{id}/secret

GET
/webhooks/{id}/secret

Get the signing secret for a webhook endpoint (for verifying webhook signatures)

Authorization

apiKeyAuth
AuthorizationBearer <token>

Backend API key for server-to-server calls. Format: sk_live_... or sk_test_...

In: header

Path Parameters

id*string

Response Body

application/json

application/json

curl -X GET "http://localhost:3002/v1/backend/webhooks/string/secret"
{
  "data": {
    "secret": "string"
  }
}
{
  "error": {
    "code": "string",
    "message": "string"
  }
}