Rasel / Docs
EN
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

FieldTypeDescriptionExample
eventenumWebhook event name. *
timestampstringEvent or message timestamp in ISO 8601. *
dataobjectPrimary payload for list and snapshot endpoints. *
data.accountIdstringWhatsApp Web session name on an inbound event. *
data.conversationKeystringConversation key on an inbound event. *
data.remoteChatIdstringRemote chat id on the provider. *
data.remoteMessageIdstringProvider message id. *
data.fromobjectWho sent the inbound message. *
data.from.jidstringWhatsApp JID of the inbound sender.
data.from.phonestringPhone of the inbound sender when available.
data.from.displayNamestringSender display name on the inbound event.
data.isGroupbooleanTrue when the inbound chat is a group. *
data.textstringInbound message text. *
data.messageTypestringInbound message classification. *
data.timestampstringInbound event time in ISO 8601. *
data.hasMediabooleanTrue when the inbound message includes media. *
data.mediaTypestringInbound media kind.
data.mimetypestringInbound media MIME type.
data.fileNamestringInbound media file name.

Status Codes

StatusDescription
200Success.

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.