Create Subscription
const url = 'https://example.com/platform/v1/webhooks/subscriptions';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"buffer_max_batch":1,"buffer_window_seconds":1,"custom_headers":{"additionalProperty":"example"},"description":"example","event_types":["example"],"inactivity_minutes":1,"is_active":true,"platform_channel_id":1,"target_url":"https://example.com"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/platform/v1/webhooks/subscriptions \ --header 'Content-Type: application/json' \ --data '{ "buffer_max_batch": 1, "buffer_window_seconds": 1, "custom_headers": { "additionalProperty": "example" }, "description": "example", "event_types": [ "example" ], "inactivity_minutes": 1, "is_active": true, "platform_channel_id": 1, "target_url": "https://example.com" }'Create a normalized webhook subscription.
target_urlis SSRF-validated at create time (https-only + public IP).event_typesvalidator (in the schema) rejects unknown values with 422.platform_channel_id, when set, must belong to this account (422 on miss).- The plaintext
secretis returned ONCE in this response and Fernet- encrypted at rest.
Request Body required
Section titled “Request Body required ”Input for creating a normalized subscription.
event_types=[] -> all events EXCEPT PLATFORM_WILDCARD_EXCLUDED_EVENTS.
platform_channel_id NULL -> account-level (all the account’s channels).
Pydantic HttpUrl enforces parse-able URL; the dispatcher’s SSRF guard
enforces https + public-IP at create time (raised as 422 by the endpoint).
object
Event types to filter on. Empty list = catch-all (every event EXCEPT message.received, which only an explicit subscription receives). Known event types: channel.connected, channel.disconnected, conversation.created, conversation.ended, conversation.inactive, message.delivered, message.echo, message.failed, message.read, message.received, message.sent, template.status_changed.
Responses
Section titled “ Responses ”Successful Response
Returned only at create / rotate-secret. secret shown ONCE.
object
Example generated
{ "buffer_max_batch": 1, "buffer_window_seconds": 1, "created_at": "2026-04-15T12:00:00Z", "custom_headers": { "additionalProperty": "example" }, "description": "example", "developer_account_id": 1, "event_types": [ "example" ], "failure_count": 1, "id": 1, "inactivity_minutes": 1, "is_active": true, "is_paused": true, "last_delivery_at": "2026-04-15T12:00:00Z", "paused_reason": "example", "platform_channel_id": 1, "secret": "example", "target_url": "example", "updated_at": "2026-04-15T12:00:00Z"}Validation Error
object
object
object
Example generated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}