Auto
EN

Receive WhatsApp Web events

Before you start

Configure an HTTPS receiver on your server and a dedicated webhook key. Persist before acknowledging and deduplicate the delivery ID.

Authorization: Bearer <webhook key> or X-API-Key: <webhook key>. This is the dedicated webhook key, not the Rasel send API key.

  1. Configure an HTTPS URL and webhook key in developer settings.
  2. Verify Bearer or X-API-Key and return 2xx within 10 seconds.
  3. Use accountId and remoteChatId to reply via messages/send.

cURL

curl --request POST 'https://receiver.example/webhooks/your-whatsapp-web-endpoint' \  -H "X-API-Key: $RASEL_WEBHOOK_KEY" \  -H 'Content-Type: application/json' \  -H 'X-Rasel-Event: whatsapp_web.message.received' \  -H 'X-Rasel-Delivery-Id: 6800del123def4567890aaaa' \  --data-binary @- <<'RASEL_JSON'{  "event": "whatsapp_web.message.received",  "timestamp": "2026-09-05T10:04:00.000Z",  "data": {    "accountId": "session-user-whatsapp-1",    "conversationKey": "whatsapp_web:session-user-whatsapp-1:963912345678@s.whatsapp.net",    "remoteChatId": "963912345678@s.whatsapp.net",    "remoteMessageId": "3EB0AABBCCDDEEFF",    "from": {      "jid": "963912345678@s.whatsapp.net",      "phone": "+963912345678",      "displayName": "Ali"    },    "isGroup": false,    "text": "مرحباً، أريد تتبع طلبي",    "messageType": "text",    "timestamp": "2026-09-05T10:04:00.000Z",    "hasMedia": false,    "mediaType": null,    "mimetype": null,    "fileName": null  }}RASEL_JSON

Webhook receivers

Test locally with a mock response first. Confirm the recipient and cost before sending a live request.