Webhooks
Kaanha AI can send real-time event notifications to your server via outgoing webhooks. This allows you to integrate with any backend system, CRM, or automation tool.Setting Up a Webhook
- Go to Integrations → Webhooks → Add Webhook
-
Enter:
- Name: Descriptive label (e.g., “CRM Sync”)
- URL: Your server endpoint (must be HTTPS, publicly accessible)
- Events: Select which events to subscribe to
- Secret: Optional — used for HMAC signature verification
- Click Save. Kaanha AI will immediately send a test event.
Event Types
| Event | Trigger |
|---|---|
message.received | Contact sends you a message |
message.sent | You send a message |
message.delivered | Message delivered to device |
message.read | Message read by contact |
conversation.opened | New conversation created |
conversation.resolved | Conversation marked resolved |
contact.created | New contact added |
contact.updated | Contact profile updated |
contact.opted_out | Contact sent STOP / unsubscribed |
broadcast.completed | Broadcast finishes sending |
payment.completed | Payment link paid |
Payload Format
All events are delivered asPOST requests with Content-Type: application/json.
Example: message.received
Example: contact.created
HMAC Signature Verification
If you set a Secret on your webhook, Kaanha AI signs every request with HMAC-SHA256. The signature is sent in theX-Kaanha-Signature header:
Verification Example (Node.js)
Retry Policy
If your server returns a non-2xx response, Kaanha AI retries with exponential backoff:| Attempt | Delay |
|---|---|
| 1st retry | 5 seconds |
| 2nd retry | 25 seconds |
| 3rd retry | 2 minutes |
Webhook Logs
View delivery history for each webhook in Integrations → Webhooks → [Name] → Logs:| Column | Description |
|---|---|
| Timestamp | When the delivery was attempted |
| Event | Event type |
| Status | delivered / failed / pending |
| Response Code | HTTP status from your server |
| Duration | Round-trip time in ms |