Delivery Status Webhook
Track what happens to messages you send. Rapiwa POSTs a delivery receipt to your device's Webhook URL as each message progresses.
- Direction: Rapiwa → your server
- Method:
POSTwith a JSON body
Payload — message-status
{
"session_id": "1024",
"message_id": "3EB0A1B2C3…",
"status": "delivered"
}
| Field | Description |
|---|---|
session_id | The device that sent the message |
message_id | The message these receipts refer to (matches the message_id from your send) |
status | sent · delivered · read |
Status lifecycle
sent ──▶ delivered ──▶ read
| Status | Meaning |
|---|---|
sent | Accepted by WhatsApp's servers (one tick) |
delivered | Delivered to the recipient's device (two ticks) |
read | Recipient opened the chat (blue ticks) |
More than the legacy API
The legacy API only forwarded read. Rapiwa forwards sent and delivered too, so you get the full lifecycle. If you only care about read receipts, filter for status === "read".
Correlating with bulk sends
Bulk sends return only a queued acknowledgement — the real message_id for each recipient arrives here, on the status webhook, as each queued send completes. Persist message_id → recipient as receipts arrive to build per-recipient delivery reporting.
Example handler
app.post('/rapiwa/webhook', (req, res) => {
const { message_id, status } = req.body
if (status) {
updateMessageStatus(message_id, status) // your DB
}
res.sendStatus(200)
})
Both inbound messages and status receipts arrive at the same Webhook URL — branch on the payload shape: a status field means it's a delivery receipt; a from field means it's an inbound message.