Webhooks
Webhooks allow you to receive real-time HTTP notifications when events occur in your WazzAPI account, such as message delivery updates or incoming messages.Overview
Instead of polling the API, configure a webhook URL to have WazzAPI push data to your server immediately.Configure Webhook URL
Go to Settings > Webhooks in your Dashboard and enter your endpoint URL.
Security
All webhook payloads are signed with HMAC-SHA256 to ensure authenticity. You should verify this signature before processing any data.Verifying Signatures
The signature is sent in theX-Webhook-Signature header. It is a hex digest of the request body (raw bytes) signed with your Webhook Secret.
Node.js Example
Event Types
Common events you can subscribe to:| Event | Description |
|---|---|
message.sent | Message successfully sent to WhatsApp server. |
message.delivered | Message delivered to the recipient’s device. |
message.read | Recipient read the message (blue ticks). |
message.failed | Message failed to send (check payload for reason). |
session.connected | WhatsApp instance connected successfully. |
session.disconnected | WhatsApp instance disconnected (e.g. phone offline). |
Payload Structure
Retry Policy
If your server fails to respond with a2xx status code, WazzAPI will retry:
- Interval: Exponential backoff (1m, 2m, 4m, etc.)
- Max Retries: 5 attempts
200 OK immediately.