POST/webhooks/your-whatsapp-web-endpoint
Inbound WhatsApp Web callback
This is not an API you call. Rasel POSTs to the HTTPS URL you configure in developer settings. Respond HTTP 2xx within 10 seconds. Failures retry up to 3 times. Media is metadata only; file bytes are not included.
When to use it. When your system must receive incoming messages from WhatsApp Web sessions linked to the account.
Code example
Correct: Inbound text message
curl --location 'https://raselsms.com/webhooks/your-whatsapp-web-endpoint' \--header 'Authorization: Bearer YOUR_WEBHOOK_API_KEY' \--header 'X-API-Key: YOUR_WEBHOOK_API_KEY' \--header 'X-Rasel-Event: whatsapp_web.message.received' \--header 'X-Rasel-Delivery-Id: 6800del123def4567890aaaa' \--header 'Content-Type: application/json' \--data '{"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}}'Incorrect: Incorrect: your server returns 500
curl --location 'https://raselsms.com/webhooks/your-whatsapp-web-endpoint' \--header 'Authorization: Bearer YOUR_WEBHOOK_API_KEY' \--header 'Content-Type: application/json' \--data '{"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 will retry. Return 2xx even if you process later.
Response example
200 — Inbound text message
{ "ok": true}500 — Incorrect: your server returns 500
{ "error": "internal"}Rasel will retry. Return 2xx even if you process later.
HTTP request
POST /webhooks/your-whatsapp-web-endpoint
Request Headers
No fields documented for this section.
Request body
| Field | Type | Description | Example |
|---|---|---|---|
| event | enum | Webhook event name. * | |
| timestamp | string | Event or message timestamp in ISO 8601. * | |
| data | object | Primary payload for list and snapshot endpoints. * | |
| data.accountId | string | WhatsApp Web session name on an inbound event. * | |
| data.conversationKey | string | Conversation key on an inbound event. * | |
| data.remoteChatId | string | Remote chat id on the provider. * | |
| data.remoteMessageId | string | Provider message id. * | |
| data.from | object | Who sent the inbound message. * | |
| data.from.jid | string | WhatsApp JID of the inbound sender. | |
| data.from.phone | string | Phone of the inbound sender when available. | |
| data.from.displayName | string | Sender display name on the inbound event. | |
| data.isGroup | boolean | True when the inbound chat is a group. * | |
| data.text | string | Inbound message text. * | |
| data.messageType | string | Inbound message classification. * | |
| data.timestamp | string | Inbound event time in ISO 8601. * | |
| data.hasMedia | boolean | True when the inbound message includes media. * | |
| data.mediaType | string | Inbound media kind. | |
| data.mimetype | string | Inbound media MIME type. | |
| data.fileName | string | Inbound media file name. |
Status Codes
| Status | Description |
|---|---|
| 200 | Success. |
Cases to handle
- Only incoming messages are forwarded. Outbound messages and historical sync events are skipped.
- Configure the URL from Developer settings → WhatsApp Web webhook, then send a test event.
Try it
This is an inbound webhook. Rasel sends it to your URL — you cannot call it from here.