Webhook Events
A webhook sends an HTTP POST with a JSON body to your URL whenever one of
the subscribed events happens in the account. Optionally it can be limited to
specific inboxes.
Create a webhook with Add Webhook and
choose its events in subscriptions. Every payload has event, which tells
you what happened.
Settings:
| Setting | Value |
|---|---|
| URL | Your webhook URL |
| Method | JSON via POST |
Events
Every kind of payload has its own page, with an example and every field explained:
| Subscription | Sent when | Inbox filter applies | Payload |
|---|---|---|---|
conversation_created | A conversation is created. | Yes | Conversation Events |
conversation_status_changed | A conversation's status changes (Bot, Manual, snoozed or resolved). | Yes | Conversation Events |
conversation_updated | A conversation changes — assignee, team, labels, custom attributes, priority, … Includes changed_attributes. | Yes | Conversation Events |
message_created_customer | The contact sent a message (message_type incoming). | Yes | Message Events |
message_created_agent | An agent or an API user sent a message. | Yes | Message Events |
message_created_bot | An agent bot sent a message. | Yes | Message Events |
message_updated | A message changed — status, content, deletion, … | Yes | Message Events |
csat_survey_submitted | The contact answered a CSAT survey. | Yes | Message Events |
ticket_resolved | A ticket was closed (the conversation was resolved). | Yes | Ticket Resolved |
webwidget_triggered | A visitor opened the website widget. | Yes | Not described yet |
form_link_generated | A form link was generated. | Yes, when the link belongs to a conversation | Form Events |
form_submitted | A contact submitted a form. | Yes, when the submission belongs to a conversation | Form Events |
contact_created | A contact was created. | No (account-wide) | Contact Events |
contact_updated | A contact changed. Includes changed_attributes. | No | Contact Events |
contact_deleted | A contact was deleted. | No | Contact Events |
block_list.contact_blocked | A contact was blocked. | No | Block-List Events |
block_list.contact_unblocked | A contact was unblocked. | No | Block-List Events |
inbox_created, inbox_updated | An inbox was created or changed. | No | Not described yet |
agent_status_changed | An agent's availability changed (online, busy or offline). | No | Agent Status Changed |
signing_link_updated | A Docal signing link changed status. | No | Not described yet |
When the inbox filter applies, the event is sent only if its inbox is in the
webhook's inbox_ids, or inbox_ids is empty. Account-wide events are always
sent.
The three message_created_* subscriptions all deliver a payload with
"event": "message_created": subscribe to each source you need.
message_created itself is not a valid subscription.
Delivery
- Online sends a
POSTto the webhook'surl, with the headersContent-Type: application/jsonandAccept: application/json, and waits up to 5 seconds for your answer. - There are no retries and no signature header. Use a hard-to-guess
URL (for example with a secret token in the path), answer quickly with a
2xx, and process the event asynchronously. - Every payload has
event. Online also addsallow_unverified_ssl(trueorfalse). - For API inboxes, the same conversation and message events are also sent to the inbox's own Webhook URL (set in the inbox settings), independently of the account webhooks.
Remarks
- The payloads of
webwidget_triggered,inbox_created,inbox_updatedandsigning_link_updatedare not described yet. Like every payload, they haveevent. - Some examples are shortened; each page says so.