Developers
Contacts, channels & templates API
Updated 13 November 2026
Besides sending messages, the API lets you add contacts to Baat and list a channel’s templates. Every endpoint takes your API key in the X-API-KEY header, and is part of the Business plan.
All field names use snake_case. A field written in another style, such as countryCode, is ignored without an error.
Create or update a contact
POST https://api.baat.ai/v1/remote/contacts
Needs the contacts:write scope.
curl -X POST "https://api.baat.ai/v1/remote/contacts" \
-H "X-API-KEY: $BAAT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Aarav Sharma",
"phone": { "country_code": "91", "number": "919876543210" },
"email": "aarav@example.com",
"marketing_opt_in": true,
"acquisition_source": "website-form",
"preferred_language": "en"
}'
| Field | Type | Description |
|---|---|---|
name | string | The contact’s name |
phone | object | country_code, such as "91", and number: digits only, starting with the country code, such as "919876543210" |
email | string | Email address |
marketing_opt_in | boolean | Whether the contact agreed to receive marketing messages |
acquisition_source | string | Where the contact came from |
preferred_language | string | Language code, such as en |
Write the number the same way WhatsApp does, with the country code and no +. Baat matches contacts by the exact number, so +919876543210 and 919876543210 would become two contacts.
The call returns 201 Created with the contact, including its id.
If the number already exists: by default Baat updates that contact with the fields you send and keeps the ones you leave out, and still returns 201. Add ?ignore-duplicate=false to the URL to get 409 Conflict instead, and change nothing.
List templates for a channel
GET https://api.baat.ai/v1/remote/account/channels/{channelId}/whatsapp-templates
Needs the templates:read scope. Returns the templates on that channel in every status, so check status before you send one. Results come in pages.
| Query parameter | Default | Description |
|---|---|---|
limit | 50 | The most templates to return |
after | — | The cursor from the previous page, to get the next page |
{
"cursor": "QVFIU…",
"data": [
{
"template_id": "2067036557116441",
"name": "order_shipped_v2",
"language": "en",
"status": "APPROVED",
"category": "UTILITY"
}
]
}
Each template also includes its components. Use template_id, name and language when you send it. On the last page, cursor is null.
Finding your channel ID
The simplest place is the Send via API tab on any template, under Settings → Templates, which shows the channel_id to use.
There is also an endpoint, GET https://api.baat.ai/v1/remote/account/channels, but it needs the channels:read scope, which the Create key form does not offer yet.
Errors
| HTTP | Cause |
|---|---|
401 | The API key is unknown, inactive or expired |
403 | The key does not have the scope the endpoint needs |
400 | The request is invalid, or the X-API-KEY header is missing |
409 | The contact already exists and you set ignore-duplicate=false |