Skip to main content

Conversation Events

Webhook 

Online sends a conversation event to your webhook when a conversation is created, its status changes, or it changes in any other way.

SubscriptionSent when
conversation_createdA conversation is created.
conversation_status_changedA conversation's status changes (Bot, Manual, snoozed or resolved).
conversation_updatedA conversation changes — assignee, team, labels, custom attributes, priority, … Includes changed_attributes, and also sender.

The payload is the conversation's fields, at the top level. changed_attributes lists the changes, for example [{"status": {"previous_value": "open", "current_value": "resolved"}}]. The event is sent only if its inbox is in the webhook's inbox_ids, or inbox_ids is empty.

Settings:

SettingValue
URLYour webhook URL — create the webhook with Add Webhook and choose its events in subscriptions
MethodJSON via POST

Example — conversation_status_changed (the last message is shortened):

{
"event": "conversation_status_changed",
"id": 1501,
"inbox_id": 31,
"channel": "Channel::Api",
"status": "resolved",
"priority": null,
"labels": [
"vip"
],
"custom_attributes": {},
"additional_attributes": {},
"contact_inbox": {
"source_id": "5f0c1a2b-3c4d-4e5f-8a9b-0c1d2e3f4a5b"
},
"messages": [
{
"id": 40114,
"content": "Your order A-1001 is ready for pickup.",
"message_type": 1
}
],
"meta": {
"sender": {
"id": 801,
"name": "Dana Cohen",
"type": "contact"
},
"assignee": null,
"team": null,
"hmac_verified": false
},
"unread_count": 0,
"snoozed_until": null,
"waiting_since": 0,
"last_activity_at": 1794474000,
"agent_last_seen_at": 1794473900,
"contact_last_seen_at": 0,
"assignee_last_seen_at": 0,
"timestamp": 1794474000,
"created_at": 1794470400,
"changed_attributes": [
{
"status": {
"previous_value": "open",
"current_value": "resolved"
}
}
],
"allow_unverified_ssl": false
}

Payload explained​

ParameterDescription / Example
eventWhat happened. See the values below.
idThe conversation's display ID.
inbox_idThe inbox ID.
channelThe inbox's channel type, for example Channel::Api.
statusThe status. The dashboard calls open Bot and pending Manual. See the values below.
priorityThe priority, or null.
labelsThe titles of the conversation's labels.
custom_attributesThe conversation's custom attributes.
additional_attributesChannel or system data of the conversation.
contact_inboxThe contact's link to the inbox.
messagesThe conversation's last message.
metaThe conversation's people.
unread_countIncoming messages the agents have not read.
snoozed_untilWhen a snoozed conversation reopens, or null.
waiting_sinceSince when the contact has been waiting for a reply (Unix time, seconds), or 0.
last_activity_atThe last activity (Unix time, seconds).
agent_last_seen_atWhen an agent last read the conversation (Unix time, seconds), or 0.
contact_last_seen_atWhen the contact last read the conversation (Unix time, seconds), or 0.
assignee_last_seen_atWhen the assignee last read the conversation (Unix time, seconds), or 0.
timestampThe same as last_activity_at.
created_atWhen the conversation was created (Unix time, seconds).
changed_attributesWhat changed: one object per attribute, keyed by its name, with its previous_value and current_value.
senderIncluded with conversation_updated.
allow_unverified_sslAdded by Online to every payload.

event​

ValueExplanation
conversation_createdA conversation was created.
conversation_status_changedThe conversation's status changed.
conversation_updatedThe conversation changed — assignee, team, labels, custom attributes, priority, …

status​

ValueExplanation
openBot — handled by the bot or automation.
pendingManual — handled by a human agent.
snoozedHidden until it is reopened.
resolvedClosed.

Webhook payload

​

Your response​

Answer with any 2xx status within 5 seconds. Online ignores the body of your answer, and does not send the event again.