Webhooks

Register a webhook scoped to an inbox

Register a webhook pre-scoped to this inbox — the endpoint only receives events for this one inbox. Otherwise identical to `POST /webhooks`: `url` must be HTTPS, `event_types` must list at least one type, and the response includes the one-time signing secret. Supplying `inbox_ids` in the body overrides the path scope.

POST
/inboxes/{inbox_id}/webhooks

Register a webhook pre-scoped to this inbox — the endpoint only receives events for this one inbox. Otherwise identical to POST /webhooks: url must be HTTPS, event_types must list at least one type, and the response includes the one-time signing secret. Supplying inbox_ids in the body overrides the path scope.

Authorization

x-api-key<token>

The per-tenant API key. Sent as the x-api-key request header. The key is tenant-scoped.

In: header

Path Parameters

inbox_id*string

The inbox's opaque id (e.g. inb_…).

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

The body for registering a webhook.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/inboxes/string/webhooks" \  -H "Content-Type: application/json" \  -d '{    "url": "http://example.com",    "event_types": [      "message.received"    ]  }'
{  "webhook_id": "string",  "url": "http://example.com",  "event_types": [    "message.received"  ],  "inbox_ids": [    "string"  ],  "enabled": true,  "client_id": "string",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z",  "secret": "string"}
{  "webhook_id": "string",  "url": "http://example.com",  "event_types": [    "message.received"  ],  "inbox_ids": [    "string"  ],  "enabled": true,  "client_id": "string",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z",  "secret": "string"}
{  "name": "string",  "message": "string"}
{  "name": "string",  "message": "string"}
{  "name": "validation",  "errors": {    "property1": "string",    "property2": "string"  }}
{  "name": "string",  "message": "string"}