{
"event": "message.created",
"timestamp": "2025-06-27T14:30:00Z",
"organization_id": "org_123",
"data": {
"id": "msg_456",
"conversation_id": "conv_789",
"content": "Olá!",
"sender": { "type": "contact", "id": "ctt_321" }
}
}
const sig = crypto
.createHmac('sha256', webhookSecret)
.update(rawBody)
.digest('hex');
const valid = `sha256=${sig}` === req.headers['x-chatsense-signature'];
Em erro (não-2xx) ou timeout (>10s): 3 retentativas com backoff — 1min, 5min, 30min. Após 3 falhas, o webhook é desativado automaticamente e você recebe notificação por e-mail.