Skip to main content

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.

SubscriptionSent whenevent in the payload
message_created_customerThe contact sent a message (message_type incoming).message_created
message_created_agentAn agent or an API user sent a message.message_created
message_created_botAn agent bot sent a message.message_created
message_updatedA message changed — status, content, deletion, …message_updated
csat_survey_submittedThe 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:

SettingValue
URLYour webhook URL — create the webhook with Add Webhook and choose its events in subscriptions
MethodJSON 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​

ParameterDescription / Example
eventWhat happened. See the values below.
idThe message ID.
contentThe text.
content_typeThe kind of content — text unless the message is interactive. The values are those of the message object (see List of Messages).
content_attributesData for the content type, as in the message object.
additional_attributesExtra data of the message.
message_typeWho the message is from, as a word. See the values below.
privatetrue for a private note: seen by agents only, never sent to the contact.
source_idThe message's ID on the external channel, or null.
created_atWhen the message was created (ISO 8601, with milliseconds).
accountThe account.
inboxThe inbox.
senderWho sent the message. The fields listed are a contact's (type contact).
conversationThe conversation the message belongs to.
allow_unverified_sslAdded by Online to every payload.

event​

ValueExplanation
message_createdA message was created. Sent for the sources you subscribed to: message_created_customer, message_created_agent, message_created_bot.
message_updatedA message changed — status, content, deletion, …
csat_survey_submittedThe contact answered a CSAT survey.

message_type​

ValueExplanation
incomingFrom the contact.
outgoingFrom an agent, a bot or the API.
activityA system note, such as "Conversation was resolved".
templateA template message.

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.