Get real-time notifications when conversations, messages, and handoffs happen in ChatMox, and react instantly from your own systems instead of polling the API.
ChatMox runs as a chat widget on your website. By default, agents work inside the ChatMox dashboard. Webhooks let your other systems react automatically when something important happens - without polling the API.
| Need | Without webhooks | With webhooks |
|---|---|---|
| Slack alert on handoff | Agent watches inbox | Slack message instantly |
| Zendesk ticket on handoff | Manual copy-paste | Ticket from payload |
| CRM sync | Export or manual entry | Updated on each message |
| Billing alerts | Check reports | Receive usage.limit_reached |
Two different things people often confuse:
Management API (you call ChatMox)
GET /webhooks - list webhooksGET /webhooks/events - event typesPOST /webhooks - register URL + eventsPUT /webhooks/{id} - updateDELETE /webhooks/{id} - removePOST /webhooks/{id}/test - send test payloadWebhook events (ChatMox calls you)
conversation.created - A new conversation is startedconversation.message.created - A new message is sentconversation.handoff_requested - A visitor requests a human agentconversation.assigned - A conversation is assigned to an agentconversation.closed - A conversation is closedusage.limit_reached - Monthly usage limit is reachedwebhook.test - test event onlyEvery delivery is POST with Content-Type: application/json.
{
"event": "conversation.message.created",
"brand_id": "550e8400-e29b-41d4-a716-446655440000",
"data": {
"conversation_id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
"session_id": "visitor-abc-123",
"message_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"role": "user",
"content": "I need help with my order",
"created_at": "2026-06-11T14:30:00.000000Z"
},
"timestamp": "2026-06-11T14:30:01+00:00"
}Headers
X-ChatMox-Event - event nameX-ChatMox-Signature - HMAC-SHA256 of raw body using your webhook secretVerify signature
Compare X-ChatMox-Signature against HMAC-SHA256 of the raw request body (before JSON parsing).
$payload = file_get_contents('php://input');
$signature = $_SERVER['HTTP_X_CHATMOX_SIGNATURE'] ?? '';
$secret = 'your-webhook-secret-from-create-response';
$expected = hash_hmac('sha256', $payload, $secret);
if (! hash_equals($expected, $signature)) {
http_response_code(401);
exit('Invalid signature');
}
$event = json_decode($payload, true);
// Process $event['event'] and $event['data']
http_response_code(200);
echo 'OK';conversation.createdConversation createdA visitor starts a new chat session.
Use case: Alert sales when someone chats from /pricing.
conversation.message.createdNew messageUser, bot, or agent sends a message (not internal notes).
Use case: Sync messages to HubSpot or run sentiment analysis.
conversation.handoff_requestedHuman handoff requestedVisitor asks for a human agent.
Use case: Create a Zendesk ticket or page on-call engineers.
conversation.assignedConversation assignedAn agent is assigned from the inbox.
Use case: Track workload or email the customer who is helping them.
conversation.closedConversation closedConversation is closed (optionally with CSAT).
Use case: Send ratings to analytics or resolve external tickets.
usage.limit_reachedUsage limit reachedMonthly message allowance is exhausted.
Use case: Trigger billing automation or internal ops alerts.
See the full CRM & Platform Integration Guide for Slack, Teams, Discord, email, and the Insights API.