Skip to content

Webhooks - signed event deliveries

A webhook sends the events you choose to one https URL on a public host, as they happen. Add one in Settings > API and webhooks > Webhooks, or with POST /v1/webhooks and a token with the developers.manage scope. The quickstart has a receiver to start from.

Each delivery is a POST with a JSON body:

{
"id": "5d0c8f5e-2b7a-4c55-9d3e-7f1a6b2c9e41",
"event": "event.created",
"created_at": "2026-11-27T01:30:51.717Z",
"organization_id": "01a21aa0-3eae-773f-9d88-ec0157af528b",
"webhook_id": "0b6f6a52-6a0e-4c43-9a37-0f1c1f8a4d10",
"attempt": 1,
"sequence": 42,
"data": { "chat_id": "cTW8QP0RH7SDW", "thread_id": "MV35R4ZHAN", "event": { "type": "message", "text": "Hello" } }
}

data depends on the event; the events below name what each carries, and the API reference has every field. The headers:

HeaderValue
x-c2r-signaturev1=<hex>: HMAC-SHA256 of <timestamp>.<raw body> under the webhook’s secret.
x-c2r-timestampWhen this attempt was signed, in Unix seconds.
x-c2r-event-idThe event’s id, the same on every attempt.
x-c2r-eventThe event name.
x-c2r-webhook-idThe webhook it was sent for.

Compute HMAC-SHA256 over the timestamp header, a dot, and the body exactly as received, and compare it in constant time with each v1= value in the signature header. Refuse a timestamp more than 5 minutes from your clock: that stops a captured delivery being replayed later.

When you rotate the secret, the old one keeps signing for 24 hours, so during that time the header carries two signatures, comma-separated, the new secret’s first. Accept either, and switch your receiver to the new secret before the old one stops.

Answer with any 2xx within 10 seconds; anything else, a redirect included, counts as a failure. Answer first and do the work afterwards, on a queue of your own.

A failed delivery is tried again, up to 10 attempts in all, after 30 s, 2 min, 10 min, 30 min, 1 h, 2 h, 4 h, 6 h, 8 h in turn, each with a little jitter. attempt in the body counts them. After the last failure the delivery is logged as dead; you can send it again from the delivery log, or with POST /v1/webhooks/{id}/deliveries/{event_id}:redeliver.

An endpoint that fails 5 times in a row has its circuit opened: deliveries wait instead of being sent, and one probe at a time tests whether it is back, after a pause that starts at 30 seconds and doubles up to 30 minutes. An endpoint that has failed for 24 hours without a single success, at least 10 times, is paused until you resume it in the settings or with POST /v1/webhooks/{id}:resume.

Delivery is at least once: a network error after your server answered means the same event comes again. Keep the id of what you have handled and skip a repeat.

Delivery order is not guaranteed. Retries, and events from different chats sent side by side, can arrive in any order, so order by created_at, when the event happened, never by arrival. Within one webhook, sequence gives the order we received events in; it stays the same across retries, though a redelivery may carry a new one.

chat.closed can arrive before the closed chat shows in chat lists and archive search, and before the thread’s last event.created; the chat itself (GET /v1/chats/{chat_id}) has the closed thread at once.

EventScopeWhen
chat.started chats.all A customer or agent started a chat (a new thread).
chat.queued chats.all A chat entered the queue.
chat.assigned chats.all Routing assigned a chat to an agent.
chat.transferred chats.all A chat was transferred to another agent or group.
chat.unassigned chats.all A chat lost its agent and waits to be routed again.
chat.deactivated chats.all A chat's thread ended without being closed by a person (inactivity).
chat.closed chats.all A chat's thread was closed.
chat.priority_changed chats.all A chat's priority changed.
goal.achieved chats.all A visitor in a chat reached a goal.
chat.rated chats.all The customer rated a chat.
chat.user_added chats.all An agent joined a chat.
chat.user_removed chats.all An agent left a chat.
chat.properties_updated chats.all A chat's properties changed.
thread.tagged chats.all A tag was added to a thread.
thread.untagged chats.all A tag was removed from a thread.
thread.properties_updated chats.all A thread's properties changed.
thread.summary_set chats.all An AI summary was stored for a thread.
event.created chats.all A message, file, form or other event was added to a chat.
event.updated chats.all An event was edited.
event.deleted chats.all An event was deleted.
event.seen chats.all A chat member read events up to a time.
ticket.created chats.all A ticket was created.
ticket.updated chats.all A ticket's status, assignee or priority changed.
customer.created customers.read A new customer was recorded.
customer.updated customers.read A customer's details changed.
customer.identified customers.read A visitor was matched to a known customer.
customer.banned customers.read A customer was banned.
agent.status_changed team.read An agent's routing status changed.
agent.created team.read An agent was created.
agent.updated team.read An agent was changed.
agent.deleted team.read An agent was deleted.
group.created team.read A group was created.
group.updated team.read A group was changed.
group.deleted team.read A group was deleted.
tag.created chats.access A tag was created.
tag.updated chats.access A tag was changed.
tag.deleted chats.access A tag was deleted.
canned_response.created chats.access A canned response was created.
canned_response.updated chats.access A canned response was changed.
canned_response.deleted chats.access A canned response was deleted.
routing_rule.created settings.manage A routing rule was created.
routing_rule.updated settings.manage A routing rule was changed.
routing_rule.deleted settings.manage A routing rule was deleted.
greeting.created campaigns.manage A greeting was created.
greeting.updated campaigns.manage A greeting was changed.
greeting.deleted campaigns.manage A greeting was deleted.
settings.updated settings.manage Organization or widget settings changed.
webhook.test developers.manage A test delivery, sent from the API or the Settings page.

An app’s webhook receives only the events its granted scopes allow. Filters narrow a webhook further: group_ids, channels, author_types (who wrote an event.*) and agent_ids.