Skip to main content

Overview

Hypersender sends a WhatsApp webhook to your URL whenever something happens on your instance: a new message, a delivery or read receipt, a reaction, a poll vote. You receive it with your own route. The SDK is only needed when you reply. A webhook is a POST with a JSON body and your secret in the Authorization header, so any Node.js framework can handle it. The examples use Express.

Set up the webhook

1

Add the webhook in the dashboard

In the Hypersender dashboard, open your WhatsApp instance and add a webhook with your public HTTPS URL, for example https://example.com/whatsapp/webhook.
2

Set a secret

Set an authorization secret on the webhook. Hypersender sends it in the Authorization header so you can reject requests that did not come from Hypersender. Save the same value as HYPERSENDER_WHATSAPP_WEBHOOK_SECRET.
3

Answer quickly

Reply with a 2xx status right away. If handling an event takes time, store the payload and process it in the background.

Receive and verify webhooks

Compare the secret with timingSafeEqual, not ===, so the comparison takes the same time whether or not the secret matches.

Payload

Every WhatsApp webhook has the same outer shape:
The event-specific fields are in data.payload. Each event page in the WhatsApp webhooks reference shows the full payload.

WhatsApp webhook events

Handle each event

Switch on event and reply with the SDK. This example answers incoming messages and records read receipts:
Always skip message.any events where fromMe is true. Otherwise a bot that replies to every message also replies to its own replies.

Next steps

Last modified on November 24, 2026