Skip to main content

WhatsApp Webhook

Receives delivery status callbacks from the Meta WhatsApp Cloud API.

Verification (GET)

Meta requires webhook verification during setup. When you configure the webhook URL in the Meta Developer Dashboard, Meta sends a verification request.
Query Parameters: Response: Returns the hub.challenge value as plain text (200) if token matches, or 403 if verification fails.

Status Callbacks (POST)

Meta sends delivery status updates as POST requests when message statuses change.
Payload (from Meta):
Status Mapping: Response: Always returns 200 to acknowledge receipt.

Signature Verification

WhatsApp webhooks are verified using HMAC-SHA256 signature verification. Meta signs every POST payload with your app secret and includes the signature in the x-hub-signature-256 header. The platform computes the expected signature using the WHATSAPP_APP_SECRET environment variable and compares it to the header value using crypto.timingSafeEqual to prevent timing attacks. Requests with missing or invalid signatures are rejected with 401.

Environment Variables


Delivery Webhook

Universal delivery status webhook that auto-detects provider payload formats.
Handles delivery status callbacks from multiple providers. The endpoint automatically detects the payload format and normalizes it into a standard event structure.

Supported Providers

You can also pass an X-Provider header (ses, sendgrid, twilio) to explicitly hint the format.

Twilio status-callback form body

Twilio sends delivery status as an application/x-www-form-urlencoded POST. The endpoint detects the format by the presence of the message-SID field (the preferred form) or its legacy alias. See the Twilio Message Status Values reference for the full list of status values. The exact wire-field names are shown in the example below:

Signature Verification

Delivery webhooks are verified using HMAC-SHA256 signature verification. Include the signature in the X-Webhook-Signature header:
The HMAC is computed over the raw request body using the WEBHOOK_SIGNING_SECRET environment variable. Requests with missing or invalid signatures are rejected with 401.

Normalized Events

All provider payloads are normalized to a standard event:

Environment Variables