1. Get your API key
Log in to the WhatsRB Dashboard, go to Settings → API Keys, and create a new key.
2. List your business accounts
Fetch your connected WhatsApp Business accounts to get an account ID:
curl https://whatsrb.com/api/v1/business_accounts \
-H "Authorization: Bearer wrb_live_xxx"
Response:
{
"data": [
{
"id": "acc_01hx...",
"business_name": "Acme Corp",
"phone_number": "+33612345678",
"status": "active"
}
],
"meta": { "total": 1, "plan_limit": 5 }
}
3. Send a message
Use the account ID from the previous step:
curl -X POST https://whatsrb.com/api/v1/business_accounts/acc_01hx.../messages \
-H "Authorization: Bearer wrb_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"message": {
"to": "+33699887766",
"message_type": "text",
"content": "Hello from WhatsRB! 👋"
}
}'
Response:
{
"data": {
"id": "msg_01hz...",
"direction": "outbound",
"to": "+33699887766",
"message_type": "text",
"content": "Hello from WhatsRB! 👋",
"status": "queued",
"wamid": null,
"sent_at": null,
"delivered_at": null,
"read_at": null,
"created_at": "2025-01-01T12:00:00Z"
}
}
4. Track delivery
Message status updates are pushed via webhooks. Register an endpoint (URL must be HTTPS):
curl -X POST https://whatsrb.com/api/v1/webhooks \
-H "Authorization: Bearer wrb_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"webhook": {
"url": "https://yourapp.com/webhooks/whatsrb",
"events": ["message.received", "message.status", "message.failed"]
}
}'
The response includes a secret (shown only once) for verifying payloads:
{
"data": {
"id": 1,
"url": "https://yourapp.com/webhooks/whatsrb",
"events": ["message.received", "message.status", "message.failed"],
"active": true,
"secret": "whsec_xxxxxxxxxxxx"
}
}
WhatsRB will POST to your URL for each matching event:
{
"event": "message.status",
"data": { ... },
"timestamp": "2025-01-01T12:00:05Z"
}
Verify the request with the X-Webhook-Signature header and your secret. See Webhooks for the full event list and signature verification.
Supported events: message.received · message.status · message.failed · session.connected · session.disconnected · session.failed · quota.warning · quota.exceeded
Next steps