Message received
Incoming webhook deliveries are authenticated with HMAC signature headers (X-Chatway-Signature and X-Chatway-Timestamp), not your Chatway API key.
A visitor sent a new message.
Triggered only for visitor messages.
Use message.received to route an incoming question, add it to a transcript, or prepare a reply. Pass data.conversation.id as conversation_id to Create Message when replying. Use data.message.id to identify the message and the envelope id to detect retries. A message can contain attachments without content, so an absent text field does not mean it is empty. Subscribe to Message sent if your transcript also needs agent replies.
For the complete receive-and-reply flow, see the Quickstart.
POST webhook: message.receivedParameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
X-Chatway-Event | header | Yes | string | Event name for this delivery. Example: message.received |
X-Chatway-Webhook-Id | header | Yes | string (uuid) | Unique webhook subscription ID. Example: 9f3c2a1b-4d5e-4f70-8a9b-0c1d2e3f4a5b |
X-Chatway-Delivery-Id | header | Yes | string | Unique ID for this HTTP delivery attempt (`del_` + 32 hex characters). A new value is sent on each retry. Example: del_1b0279b1f28f12c0b9f2a2fdbf3758ee |
X-Chatway-Delivery-Attempt | header | Yes | string | Attempt number for this event (`1` on first try). Sent as a decimal string in the header. Example: 1 |
X-Chatway-Timestamp | header | Yes | string | Unix timestamp in seconds when the request was signed. Sent as a decimal string in the header. Example: 1770201073 |
X-Chatway-Signature | header | Yes | string | `sha256=` followed by the lowercase hex HMAC SHA256 of `{X-Chatway-Timestamp}.{raw request body}`, keyed with your webhook secret. The example is computed for the example body serialized as compact JSON, the example timestamp, and the placeholder secret `whsec_exampleSecretForDocsOnly00000000`. Example: sha256=1ee49edcc1e4bb0e58ed2ec2e054bac3a2cfabdd1546115542b4de0d791ca9b9 |
Request body
Signed JSON envelope for this event.
application/json
id (string, required)— Stable event ID (`evt_…`). Same across HTTP retries for this notification.event (string, required)— Event name. For this webhook, always `message.received`.data (object, required)— Payload for message.received.message (object, required)id (string (uuid), required)— Message ID.content (string)— Message text. May be omitted when attachments are present.attachments (array<object>, required)— Zero or more attachment objects. Each item has `content` (URL), optional `type`, `mime`, `original_file_name`, and `size` (bytes)—see Webhooks overview → Field reference → Attachment.content (string, required)— Public URL of the file (up to 2048 characters).type (string)— Logical type (for example image, file, video).mime (string)— MIME type when known.original_file_name (string)— Original filename when available.size (integer|null)— Size in bytes when known.
created_at (string (date-time), required)— When the message was created.
conversation (object, required)id (string (uuid), required)— Conversation ID.channel (string, required)— Normalized channel.status (string, required)— Conversation status.widget_name (string)— Present when the conversation is tied to a website widget.identifier (string)— Widget identifier when widget_name is present.
visitor (object, required)id (string (uuid), required)— Visitor/contact ID.name (string)— Visitor name. Omitted when empty.email (string|null, required)— Visitor email. Always present; null when unknown.phone (string|null, required)— Visitor phone. Always present; null when unknown.
occurred_at (string (date-time), required)— When the business event occurred.version (string, required)— Payload schema version.
Responses
200
Return any 2xx status to acknowledge receipt.
410
Optional HTTP 410 Gone to signal the endpoint is permanently unavailable. Like every non-2xx response below 500 (including 408 and 429), it is not retried. It does not disable the subscription; turn the webhook off in Chatway Settings if you want deliveries to stop.
Examples
Request body example
{
"id": "evt_1234567890abcdef1234567890abcdef",
"event": "message.received",
"data": {
"message": {
"id": "679f5ba4-3cbf-42eb-86dc-63566cec6b58",
"content": "Hello, I need help",
"attachments": [
{
"content": "https://cdn.example.com/files/invoice.pdf",
"type": "file",
"mime": "application/pdf",
"original_file_name": "invoice.pdf",
"size": 204800
}
],
"created_at": "2026-02-04T10:31:12Z"
},
"conversation": {
"id": "0f46c0a1-8938-40e3-b2b5-bb56f569fcab",
"channel": "website",
"status": "open",
"widget_name": "Main site widget",
"identifier": "eouqtiupanm6uvglwshy"
},
"visitor": {
"id": "9b0c5fe6-35ad-459d-b6ba-4288191f84f1",
"name": "John Doe",
"email": "[email protected]",
"phone": "+1XXXXXXXXXX"
}
},
"occurred_at": "2026-02-04T10:31:12Z",
"version": "2026-09"
}