Message sent

Incoming webhook deliveries are authenticated with HMAC signature headers (X-Chatway-Signature and X-Chatway-Timestamp), not your Chatway API key.

An agent sent a new message.

Triggered when an agent sends a message from the dashboard or API (including POST /messages).

Internal notes, reminders, and system messages are not included.

data.agent is always present on this event. Dashboard sends use the signed-in agent. API sends use the agent_id on the stored message (include agent_id in POST /messages for agent-originated replies).

Use message.sent to add agent replies to an external transcript or record response activity. Match the message with data.message.id, the conversation with data.conversation.id, and the sender with data.agent.id. Your own agent-originated API reply can generate this event. To avoid a reply loop, start automatic visitor replies from Message received. Use Get Agent when you need the sending agent's details.

For signature verification and retries, see Webhooks overview.

postWebhookmessage.sent

Headers

X-Chatway-Eventstring required

Event name for this delivery.

X-Chatway-Webhook-Idstring uuid required

Unique webhook subscription ID.

X-Chatway-Delivery-Idstring required

Unique ID for this HTTP delivery attempt (del_ + 32 hex characters). A new value is sent on each retry.

X-Chatway-Delivery-Attemptstring required

Attempt number for this event (1 on first try). Sent as a decimal string in the header.

X-Chatway-Timestampstring required

Unix timestamp in seconds when the request was signed. Sent as a decimal string in the header.

X-Chatway-Signaturestring required

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.

Payload

idstring required

Stable event ID (evt_…). Same across HTTP retries for this notification.

eventstring required

Event name. For this webhook, always message.sent.

occurred_atstring date-time required

When the business event occurred.

versionstring required

Payload schema version.

Example payload

{
  "id": "evt_1234567890abcdef1234567890abcdef",
  "event": "message.sent",
  "data": {
    "message": {
      "id": "a1b2c3d4-e5f6-4789-a012-3456789abcde",
      "content": "Happy to help! Let me look into that for you.",
      "attachments": [],
      "created_at": "2026-02-04T10:32:00Z"
    },
    "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": "john@example.com",
      "phone": "+1XXXXXXXXXX"
    },
    "agent": {
      "id": "26fa75f2-7ac1-47b4-84e1-b943491ba4da",
      "name": "Sarah Chen",
      "email": "sarah@example.com"
    }
  },
  "occurred_at": "2026-02-04T10:32:00Z",
  "version": "2026-09"
}

Response

Return any 2xx status to acknowledge receipt.

Changes

Webhooks have no change history: a webhook is keyed by its event name rather than a path and method, so no recorded change can name it.