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.
| Subscription | Sent when |
|---|---|
conversation_created | A conversation is created. |
conversation_status_changed | A conversation's status changes (Bot, Manual, snoozed or resolved). |
conversation_updated | A 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:
| Setting | Value |
|---|---|
| URL | Your webhook URL — create the webhook with Add Webhook and choose its events in subscriptions |
| Method | JSON 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
| Parameter | Description / Example |
|---|---|
event | What happened. See the values below. |
id | The conversation's display ID. |
inbox_id | The inbox ID. |
channel | The inbox's channel type, for example Channel::Api. |
status | The status. The dashboard calls open Bot and pending Manual. See the values below. |
priority | The priority, or null. |
labels | The titles of the conversation's labels. |
custom_attributes | The conversation's custom attributes. |
additional_attributes | Channel or system data of the conversation. |
contact_inbox | The contact's link to the inbox. |
messages | The conversation's last message. |
meta | The conversation's people. |
unread_count | Incoming messages the agents have not read. |
snoozed_until | When a snoozed conversation reopens, or null. |
waiting_since | Since when the contact has been waiting for a reply (Unix time, seconds), or 0. |
last_activity_at | The last activity (Unix time, seconds). |
agent_last_seen_at | When an agent last read the conversation (Unix time, seconds), or 0. |
contact_last_seen_at | When the contact last read the conversation (Unix time, seconds), or 0. |
assignee_last_seen_at | When the assignee last read the conversation (Unix time, seconds), or 0. |
timestamp | The same as last_activity_at. |
created_at | When the conversation was created (Unix time, seconds). |
changed_attributes | What changed: one object per attribute, keyed by its name, with its previous_value and current_value. |
sender | Included with conversation_updated. |
allow_unverified_ssl | Added by Online to every payload. |
event
| Value | Explanation |
|---|---|
| conversation_created | A conversation was created. |
| conversation_status_changed | The conversation's status changed. |
| conversation_updated | The conversation changed — assignee, team, labels, custom attributes, priority, … |
status
| Value | Explanation |
|---|---|
| open | Bot — handled by the bot or automation. |
| pending | Manual — handled by a human agent. |
| snoozed | Hidden until it is reopened. |
| resolved | Closed. |
Webhook payload
Your response
- 200
Answer with any 2xx status within 5 seconds. Online ignores the body of your answer, and does not send the event again.