Skip to main content

Webhooks

Every call needs Authorization: Bearer <key>. 8 calls:

Replay a delivery​

POST /v1/webhook-deliveries/:id/replay

Sends the same event again (same event id, fresh signature) as one new attempt. The delivery must be finished (succeeded or failed) and its endpoint active. At most 30 a minute per workspace.

Path parameters

NameTypeRequiredDescription
idstring (uuid)Yes

Headers

NameTypeRequiredDescription
x-workspace-idstringNoWorkspace for session (JWT) callers. API keys carry their own workspace.
idempotency-keystringNoMakes the write safe to retry for 24 hours. 1 to 255 printable characters. Keys starting with outreach:, workflow: or agent: are reserved for messages bubbl3 sends itself and are refused with 400. Up to 255 characters.

Response 202

FieldTypeDescription
attemptintegerAttempts made so far; 0 until the first one runs. From 0 to 9007199254740991.
created_atstring (date-time)ISO 8601 timestamp.
delivered_atstring (date-time) or nullISO 8601 timestamp.
endpoint_idstringWebhook endpoint id (whk_...).
errorstring or null
event_idstringEvent id (evt_...).
event_typeenumOne of: message.received, message.status, contact.created, contact.opted_out, contact.opted_in, conversation.assigned, line.state_changed, line.degraded, line.recovered, workflow.run.completed, agent.handoff, workflow.webhook.
idstring (uuid)
latency_msinteger or nullFrom 0 to 9007199254740991.
next_attempt_atstring (date-time) or nullISO 8601 timestamp.
statusenumOne of: pending, succeeded, failed.
status_codeinteger or nullFrom -9007199254740991 to 9007199254740991.

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500. See errors for the shape and codes.

List webhook endpoints​

GET /v1/webhooks

Query parameters

NameTypeRequiredDescription
limitintegerNoFrom 1 to 100. Default 50.
cursorstringNoOpaque cursor from next_cursor. Up to 512 characters.

Headers

NameTypeRequiredDescription
x-workspace-idstringNoWorkspace for session (JWT) callers. API keys carry their own workspace.

Response 200

FieldTypeDescription
dataobject[]
data[].created_atstring (date-time)ISO 8601 timestamp.
data[].disabled_atstring (date-time) or nullISO 8601 timestamp.
data[].disabled_reasonstring or null
data[].eventsenum[]
data[].failure_rate_7dnumberFraction from 0 to 1. From 0 to 1.
data[].idstringWebhook endpoint id (whk_...).
data[].statusenumOne of: active, paused, disabled.
data[].updated_atstring (date-time)ISO 8601 timestamp.
data[].urlstring
next_cursorstring or nullPass as cursor to get the next page; null at the end.

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500. See errors for the shape and codes.

Create a webhook endpoint​

POST /v1/webhooks

The signing secret is returned once, in secret. It is stored encrypted and never shown again; rotate it to get a new one. A workspace can have up to 20 endpoints, and an organization up to 50.

Headers

NameTypeRequiredDescription
x-workspace-idstringNoWorkspace for session (JWT) callers. API keys carry their own workspace.
idempotency-keystringNoMakes the write safe to retry for 24 hours. 1 to 255 printable characters. Keys starting with outreach:, workflow: or agent: are reserved for messages bubbl3 sends itself and are refused with 400. Up to 255 characters.

Request body

FieldTypeRequiredDescription
eventsenum[]Yes
urlstring (uri)YesHTTPS URL. Up to 2048 characters.

Response 201

FieldTypeDescription
created_atstring (date-time)ISO 8601 timestamp.
disabled_atstring (date-time) or nullISO 8601 timestamp.
disabled_reasonstring or null
eventsenum[]
failure_rate_7dnumberFraction from 0 to 1. From 0 to 1.
idstringWebhook endpoint id (whk_...).
secretstringSigning secret. Shown once.
statusenumOne of: active, paused, disabled.
updated_atstring (date-time)ISO 8601 timestamp.
urlstring

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500. See errors for the shape and codes.

Update a webhook endpoint​

PATCH /v1/webhooks/:id

Change the URL or events, pause it, or set active to resume a paused endpoint or re-enable a disabled one. Re-enabling starts a fresh failure window, and a disabled endpoint can be re-enabled at most once every 10 minutes. A disabled endpoint can't be paused; re-enable it first.

Path parameters

NameTypeRequiredDescription
idstringYesWebhook endpoint id (whk_...).

Headers

NameTypeRequiredDescription
x-workspace-idstringNoWorkspace for session (JWT) callers. API keys carry their own workspace.
idempotency-keystringNoMakes the write safe to retry for 24 hours. 1 to 255 printable characters. Keys starting with outreach:, workflow: or agent: are reserved for messages bubbl3 sends itself and are refused with 400. Up to 255 characters.

Request body

FieldTypeRequiredDescription
eventsenum[]No
statusenumNoOne of: active, paused.
urlstring (uri)NoHTTPS URL. Up to 2048 characters.

Response 200

FieldTypeDescription
created_atstring (date-time)ISO 8601 timestamp.
disabled_atstring (date-time) or nullISO 8601 timestamp.
disabled_reasonstring or null
eventsenum[]
failure_rate_7dnumberFraction from 0 to 1. From 0 to 1.
idstringWebhook endpoint id (whk_...).
statusenumOne of: active, paused, disabled.
updated_atstring (date-time)ISO 8601 timestamp.
urlstring

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500. See errors for the shape and codes.

Delete a webhook endpoint​

DELETE /v1/webhooks/:id

Deliveries stop at once. The endpoint and its delivery history are removed.

Path parameters

NameTypeRequiredDescription
idstringYesWebhook endpoint id (whk_...).

Headers

NameTypeRequiredDescription
x-workspace-idstringNoWorkspace for session (JWT) callers. API keys carry their own workspace.
idempotency-keystringNoMakes the write safe to retry for 24 hours. 1 to 255 printable characters. Keys starting with outreach:, workflow: or agent: are reserved for messages bubbl3 sends itself and are refused with 400. Up to 255 characters.

Response 200

FieldTypeDescription
deletedenumOne of: true.
idstringWebhook endpoint id (whk_...).

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500. See errors for the shape and codes.

List an endpoint's deliveries​

GET /v1/webhooks/:id/deliveries

Path parameters

NameTypeRequiredDescription
idstringYesWebhook endpoint id (whk_...).

Query parameters

NameTypeRequiredDescription
limitintegerNoFrom 1 to 100. Default 50.
cursorstringNoOpaque cursor from next_cursor. Up to 512 characters.
statusenumNoOne of: pending, succeeded, failed.
event_typeenumNoOne of: message.received, message.status, contact.created, contact.opted_out, contact.opted_in, conversation.assigned, line.state_changed, line.degraded, line.recovered, workflow.run.completed, agent.handoff, workflow.webhook.

Headers

NameTypeRequiredDescription
x-workspace-idstringNoWorkspace for session (JWT) callers. API keys carry their own workspace.

Response 200

FieldTypeDescription
dataobject[]
data[].attemptintegerAttempts made so far; 0 until the first one runs. From 0 to 9007199254740991.
data[].created_atstring (date-time)ISO 8601 timestamp.
data[].delivered_atstring (date-time) or nullISO 8601 timestamp.
data[].endpoint_idstringWebhook endpoint id (whk_...).
data[].errorstring or null
data[].event_idstringEvent id (evt_...).
data[].event_typeenumOne of: message.received, message.status, contact.created, contact.opted_out, contact.opted_in, conversation.assigned, line.state_changed, line.degraded, line.recovered, workflow.run.completed, agent.handoff, workflow.webhook.
data[].idstring (uuid)
data[].latency_msinteger or nullFrom 0 to 9007199254740991.
data[].next_attempt_atstring (date-time) or nullISO 8601 timestamp.
data[].statusenumOne of: pending, succeeded, failed.
data[].status_codeinteger or nullFrom -9007199254740991 to 9007199254740991.
next_cursorstring or nullPass as cursor to get the next page; null at the end.

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500. See errors for the shape and codes.

Rotate a webhook signing secret​

POST /v1/webhooks/:id/rotate

Returns a new secret once. For 24 hours each delivery carries two v1 signatures, one per secret, so receivers can switch over without dropping events.

Path parameters

NameTypeRequiredDescription
idstringYesWebhook endpoint id (whk_...).

Headers

NameTypeRequiredDescription
x-workspace-idstringNoWorkspace for session (JWT) callers. API keys carry their own workspace.
idempotency-keystringNoMakes the write safe to retry for 24 hours. 1 to 255 printable characters. Keys starting with outreach:, workflow: or agent: are reserved for messages bubbl3 sends itself and are refused with 400. Up to 255 characters.

Response 200

FieldTypeDescription
created_atstring (date-time)ISO 8601 timestamp.
disabled_atstring (date-time) or nullISO 8601 timestamp.
disabled_reasonstring or null
eventsenum[]
failure_rate_7dnumberFraction from 0 to 1. From 0 to 1.
idstringWebhook endpoint id (whk_...).
secretstringSigning secret. Shown once.
statusenumOne of: active, paused, disabled.
updated_atstring (date-time)ISO 8601 timestamp.
urlstring

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500. See errors for the shape and codes.

Send a test event​

POST /v1/webhooks/:id/test

Queues one signed delivery of an example event (fixed placeholder data, is_test where the shape has it). Test events are attempted once and never count toward auto-disable. At most 10 a minute per workspace.

Path parameters

NameTypeRequiredDescription
idstringYesWebhook endpoint id (whk_...).

Headers

NameTypeRequiredDescription
x-workspace-idstringNoWorkspace for session (JWT) callers. API keys carry their own workspace.
idempotency-keystringNoMakes the write safe to retry for 24 hours. 1 to 255 printable characters. Keys starting with outreach:, workflow: or agent: are reserved for messages bubbl3 sends itself and are refused with 400. Up to 255 characters.

Request body

FieldTypeRequiredDescription
typeenumNoOne of: message.received, message.status, contact.created, contact.opted_out, contact.opted_in, conversation.assigned, line.state_changed, line.degraded, line.recovered, workflow.run.completed, agent.handoff, workflow.webhook. Default "message.received".

Response 202

FieldTypeDescription
attemptintegerAttempts made so far; 0 until the first one runs. From 0 to 9007199254740991.
created_atstring (date-time)ISO 8601 timestamp.
delivered_atstring (date-time) or nullISO 8601 timestamp.
endpoint_idstringWebhook endpoint id (whk_...).
errorstring or null
event_idstringEvent id (evt_...).
event_typeenumOne of: message.received, message.status, contact.created, contact.opted_out, contact.opted_in, conversation.assigned, line.state_changed, line.degraded, line.recovered, workflow.run.completed, agent.handoff, workflow.webhook.
idstring (uuid)
latency_msinteger or nullFrom 0 to 9007199254740991.
next_attempt_atstring (date-time) or nullISO 8601 timestamp.
statusenumOne of: pending, succeeded, failed.
status_codeinteger or nullFrom -9007199254740991 to 9007199254740991.

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500. See errors for the shape and codes.