Chatwoot Agent Bot Webhook

View as Markdown
Receives Chatwoot Agent Bot webhook events for the channel. Chatwoot owns the messaging inbox (Facebook, website widget, and others). This Agent replies through the Chatwoot API and maps native bot handoff to conversation pause/resume. Requests are verified via the `X-Chatwoot-Signature` HMAC-SHA256 header using the configured webhook secret unless an `api_key` is present and no secret is set. The route acknowledges immediately (Chatwoot times out in about 5 seconds) and processes events asynchronously.

Path parameters

idstringRequired
The channel id

Headers

X-Chatwoot-SignaturestringOptional

sha256= plus hex HMAC-SHA256 of {timestamp}.{rawBody} keyed with the Agent Bot webhook secret. Required when the webhook URL does not include an api_key, and whenever a webhook secret is configured.

X-Chatwoot-TimestampstringOptional
Unix timestamp used in the HMAC payload.

Request

This endpoint expects an object.
eventstringOptional

Chatwoot event name. Incoming visitor messages use message_created. Staff takeover and assignment use conversation events such as conversation_opened, conversation_status_changed, and conversation_updated.

idintegerOptional

Message id on message_* events. Conversation display id on conversation_* events.

contentstring or nullOptional
Message text. Present on message events. Empty or private notes are ignored.
message_typestringOptional

Incoming visitor messages are incoming (or 0). Staff replies are outgoing (or 1).

privatebooleanOptional

When true, the Agent ignores the message (Chatwoot private note).

accountobjectOptional
senderobjectOptional
Present on message events.
conversationobjectOptional

Nested on message events. Conversation events send id, status, and meta at the top level instead.

statusstringOptional

Top-level conversation status on conversation events.

metaobjectOptional

Top-level conversation meta on conversation events.

Response

Event acknowledged

Errors

400
Bad Request Error
403
Forbidden Error
503
Service Unavailable Error