Skip to content

Webhook Setup ​

Receive real-time notifications when events occur in DOLU.ai.

Creating a Webhook ​

http
POST /api/v1/webhooks
json
{
  "url": "https://your-server.com/webhook",
  "events": ["message.received", "conversation.created", "deal.won"],
  "secret": "your-webhook-secret"
}

Available Events ​

EventDescription
message.receivedNew message received
message.sentMessage sent
conversation.createdNew conversation started
conversation.closedConversation closed
contact.createdNew contact created
contact.updatedContact updated
deal.createdNew deal created
deal.stage_changedDeal stage changed
deal.wonDeal marked as won
deal.lostDeal marked as lost
task.createdNew task created
task.completedTask completed

Webhook Payload ​

json
{
  "event": "message.received",
  "timestamp": "2026-02-10T12:00:00Z",
  "data": {
    "id": "msg-uuid",
    "conversationId": "conv-uuid",
    "contactId": "contact-uuid",
    "content": "Hello",
    "channel": "whatsapp"
  }
}

Security ​

Verify webhook signatures using the X-Dolu-Signature header:

javascript
const crypto = require('crypto');

function verifySignature(payload, signature, secret) {
  const expected = crypto
    .createHmac('sha256', secret)
    .update(payload)
    .digest('hex');
  return signature === \`sha256=\${expected}\`;
}

Retry Policy ​

Failed webhooks are retried up to 5 times with exponential backoff.

DOLU.ai - AI-Powered CRM Platform