Message Events
Webhook
Online sends a message event to your webhook when a message is created or changed, or when the contact answers a CSAT survey.
| Subscription | Sent when | event in the payload |
|---|---|---|
message_created_customer | The contact sent a message (message_type incoming). | message_created |
message_created_agent | An agent or an API user sent a message. | message_created |
message_created_bot | An agent bot sent a message. | message_created |
message_updated | A message changed — status, content, deletion, … | message_updated |
csat_survey_submitted | The contact answered a CSAT survey. | csat_survey_submitted |
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. 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 — message_created, a customer message (the conversation's last message is shortened):
{
"event": "message_created",
"id": 40113,
"content": "Hi, where is my order?",
"content_type": "text",
"content_attributes": {},
"additional_attributes": {},
"message_type": "incoming",
"private": false,
"source_id": null,
"created_at": "2026-11-12T08:05:00.000Z",
"account": {
"id": 12,
"name": "Example Account"
},
"inbox": {
"id": 31,
"name": "Website API"
},
"sender": {
"type": "contact",
"id": 801,
"name": "Dana Cohen",
"email": "dana.cohen@example.com",
"phone_number": "+972501234567",
"identifier": "crm-801",
"additional_attributes": {
"company_name": "Example Ltd",
"city": "Tel Aviv"
},
"custom_attributes": {
"customer_tier": "gold"
},
"avatar": "",
"thumbnail": "",
"account": {
"id": 12,
"name": "Example Account"
}
},
"conversation": {
"id": 1501,
"inbox_id": 31,
"channel": "Channel::Api",
"status": "open",
"priority": null,
"labels": [
"vip"
],
"custom_attributes": {},
"additional_attributes": {},
"contact_inbox": {
"source_id": "5f0c1a2b-3c4d-4e5f-8a9b-0c1d2e3f4a5b"
},
"messages": [
{
"id": 40113,
"content": "Hi, where is my order?",
"message_type": 0
}
],
"meta": {
"sender": {
"id": 801,
"name": "Dana Cohen",
"type": "contact"
},
"assignee": null,
"team": null,
"hmac_verified": false
},
"unread_count": 1,
"snoozed_until": null,
"waiting_since": 1794470700,
"last_activity_at": 1794470700,
"agent_last_seen_at": 0,
"contact_last_seen_at": 0,
"assignee_last_seen_at": 0,
"timestamp": 1794470700,
"created_at": 1794470400
},
"allow_unverified_ssl": false
}
Payload explained
| Parameter | Description / Example |
|---|---|
event | What happened. See the values below. |
id | The message ID. |
content | The text. |
content_type | The kind of content — text unless the message is interactive. The values are those of the message object (see List of Messages). |
content_attributes | Data for the content type, as in the message object. |
additional_attributes | Extra data of the message. |
message_type | Who the message is from, as a word. See the values below. |
private | true for a private note: seen by agents only, never sent to the contact. |
source_id | The message's ID on the external channel, or null. |
created_at | When the message was created (ISO 8601, with milliseconds). |
account | The account. |
inbox | The inbox. |
sender | Who sent the message. The fields listed are a contact's (type contact). |
conversation | The conversation the message belongs to. |
allow_unverified_ssl | Added by Online to every payload. |
event
| Value | Explanation |
|---|---|
| message_created | A message was created. Sent for the sources you subscribed to: message_created_customer, message_created_agent, message_created_bot. |
| message_updated | A message changed — status, content, deletion, … |
| csat_survey_submitted | The contact answered a CSAT survey. |
message_type
| Value | Explanation |
|---|---|
| incoming | From the contact. |
| outgoing | From an agent, a bot or the API. |
| activity | A system note, such as "Conversation was resolved". |
| template | A template message. |
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.