Request example
This invented payload illustrates a received-message notification. It contains identifiers and metadata, not the message text or a public media URL.agent.message activations. An activation carries agentId and eventId; fetch private content through the agent API. chatId can be null for phone-level events. Fields vary by event type. Available events depend on the installed engine subscriptions; reading this page does not change a linked session.
Verify before parsing
timestamp + '.' + rawBody. The bundled verifier checks a five-minute window, compares HMAC-SHA256 signatures in constant time and bounds the body at 16 KiB.
The repository example examples/node/webhook-receiver.mjs implements private SQLite intake, duplicate-content checks and bounded queue capacity. It starts no outgoing worker. Install it behind your own HTTPS endpoint before configuring the webhook.
Delivery and recovery
- Commit the event to durable storage before responding with 2xx.
- Run long work asynchronously; the sender has an eight-second deadline.
- Expect duplicate and out-of-order delivery. Use the event ID for intake deduplication and a separate persisted business-intent key for each intended effect.
- Do not order work by delivery time. Re-read current authorized state before changing anything.
- Failed callbacks retry eight times in total. Exhausted delivery does not automatically redrive.
- If a send becomes unknown, inspect the original API operation. Replaying the webhook is never permission to resend the WhatsApp message.