Developers
Developers overview & quickstart
Updated 31 May 2026
The Developers section (under Build → Developers in the left navigation) is where you connect Baat to your own code. Use it to send WhatsApp messages from your backend, sync contacts from your CRM, and receive real-time events whenever something happens in your Baat account.
What you can do with the API
-
Send messages — fire approved WhatsApp template messages to any number from your own systems (order updates, OTPs, shipping alerts).
-
Sync contacts — push new or updated contacts into Baat from your store, CRM or ops tooling.
-
Read channels & templates — look up your connected WhatsApp numbers and approved templates so you can reference them when sending.
-
Receive webhooks — get an HTTP callback the moment a contact is created, a conversation opens or closes, or a WhatsApp Flow form is submitted.
The three tabs
| Tab | What it’s for |
|---|---|
| API keys | Create, scope, rotate and revoke the keys that authenticate your API calls. |
| Webhooks | Register endpoint URLs that Baat will POST events to in real time, each with its own signing secret. |
| Logs & usage | Inspect every webhook delivery attempt — event, endpoint, status, retry count and the last error. |
Base URL & authentication
All API requests go to the Baat API host, over HTTPS:
Production: https://api.baat.ai
Staging: https://stageapi.baat.ai
Every request is authenticated with an API key passed in the X-API-KEY request header:
X-API-KEY: bk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Baat keys authenticate with the X-API-KEY header — not an Authorization: Bearer header. Keys are issued per organization and carry the scopes you select when you create them.
Quickstart — your first message in 5 minutes
Once you understand the flow, sending your first message is four short steps.
1. Create an API key
Go to Developers → API keys → Create key, name it, and select the messages:send scope (plus channels:read and templates:read for the lookups below). Copy the secret — it is shown only once.
2. Find your channel ID
List the WhatsApp channels connected to your account:
curl https://api.baat.ai/v1/remote/account/channels
-H "X-API-KEY: bk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
Note the numeric id of the channel you want to send from.
3. Find a template ID
List the approved templates on that channel:
curl https://api.baat.ai/v1/remote/account/channels/{channelId}/whatsapp-templates
-H "X-API-KEY: bk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
Pick a template and note its ID.
4. Send the message
curl -X POST https://api.baat.ai/m1/whatsapp/messages
-H "X-API-KEY: bk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
-H "Content-Type: application/json"
-d '{
"phone_number": "+919876543210",
"contact_name": "Aarav",
"channel_id": 123,
"template_id": "your-template-id",
"message": {
"message_type": "template",
"body_params": ["Aarav", "#10482"]
}
}'
A successful call returns 202 Accepted with a message ID:
{ "success": true, "message_id": "a1b2c3d4", "status": "queued" }
That’s it — the message is queued for delivery. Next, read Creating and managing API keys to understand scopes, and Webhooks: real-time events to listen for replies and contact changes.