Skip to main content

Webhooks

Webhooks push signed HTTP POST requests to your server when something important happens—new messages, delivery updates, or device status changes—so you do not have to poll.

Set up a webhook

1

Add your URL

In the dashboard open Developers → Webhooks and add an HTTPS endpoint, or create one with the API (below).
2

Pick events

Subscribe only to what you handle, for example message.received and message.delivered.
3

Verify signatures

Check X-Wazzapi-Signature on every request before you trust the body.

Manage webhooks with the API

ActionMethodEndpoint
ListGET/api/v1/webhooks/subscriptions
CreatePOST/api/v1/webhooks/subscriptions
GetGET/api/v1/webhooks/subscriptions/{id}
UpdatePATCH/api/v1/webhooks/subscriptions/{id}
DeleteDELETE/api/v1/webhooks/subscriptions/{id}
Delivery historyGET/api/v1/webhooks/subscriptions/{id}/events
Test endpointPOST/api/v1/webhooks/subscriptions/{id}/ping
Official SDKs: client.webhook_subscriptions (Python) and client.webhookSubscriptions (Node).

Security

Payloads are signed with HMAC-SHA256. Always verify against the raw body bytes, not a re-serialized JSON string. Delivery headers:
  • X-Wazzapi-Signaturesha256=<hex digest> of the body using your webhook secret
  • X-Wazzapi-Event — event name
  • X-Wazzapi-Event-ID — unique delivery id (use for idempotency)
Node.js
Python
Use a constant-time comparison (as above) so timing attacks are harder.

Events you can subscribe to

EventWhen it fires
message.receivedSomeone messaged your linked number
message.sentWhatsApp accepted your outbound message
message.deliveredThe recipient’s device got the message
message.readThe recipient opened the message
message.failedOutbound send failed
device.connectedA device is healthy again
device.disconnectedA device dropped or needs attention

Example payload

See the API Reference → Webhooks for full event schemas and examples.

Retries

If your endpoint does not return 2xx within about 30 seconds, WazzAPI retries with backoff: 1 min → 5 min → 15 min → 30 min → 1 h → 2 h → 4 h → 8 h → 24 h Return quickly (accept and queue work) so deliveries succeed on the first try.