WhapiBD API
Use the WhapiBD REST API to send messages from your connected WhatsApp device and track their status. Requests and responses use JSON.
Before making requests, create a workspace, connect a device, and generate an API key from the dashboard.
Authentication
Send your API key as a bearer token with every request. Keep the key private and grant only the scopes your integration needs.
Every key is issued for one connected number and sends as that number. The key is the identity, so you never pass a device ID in the body of a request.
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json/api/v1/messages/sendSend a message
Queue a text, media, or document message from the number your key was issued for. A successful request returns a message ID that you can use to check status.
{
"to": "8801XXXXXXXXX",
"type": "text",
"message": "Hello from WhapiBD"
}{
"success": true,
"message_id": "msg_…",
"status": "queued",
"request_id": "req_…"
}Idempotency: Pass an Idempotency-Key header to safely retry a send request without creating a duplicate message.
Read message records
Use the read endpoints to list recent messages or retrieve one message by its ID. Lists support cursor pagination and can be filtered by status or direction.
/api/v1/messages/api/v1/messages/{message_id}List query parameters: status, direction, and per_page (up to 100). Messages are scoped to the number your key was issued for. The response includes next_cursor when another page is available.
Webhooks
Create a webhook from your dashboard to receive event callbacks. WhapiBD signs webhook deliveries so your server can verify that each event came from your workspace. Delivery attempts and results are visible in the dashboard.
Configure a webhook in your workspace →Endpoint summary
/api/v1/messages/sendSend a text, media, or document/api/v1/messagesList messages/api/v1/messages/{id}Read message status