Developers

Contacts, channels & templates API

Updated 31 May 2026

Alongside sending messages, the API lets you push contacts into Baat and look up the channels and templates you’ll reference when sending. All three endpoints authenticate with the X-API-KEY header.

A note on field casing: the send-message endpoint uses snake_case, while the contacts, channels and templates endpoints below use camelCase. The examples reflect this.

Create a contact

POST https://api.baat.ai/v1/remote/contacts?ignore-duplicate=true

Requires the contacts:write scope. The optional ignore-duplicate query parameter (default true) controls behaviour when a contact with the same phone number already exists — set it to false to receive a 409 Conflict instead of silently skipping.

curl -X POST "https://api.baat.ai/v1/remote/contacts" 
  -H "X-API-KEY: bk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" 
  -H "Content-Type: application/json" 
  -d '{
    "name": "Aarav Sharma",
    "phone": { "countryCode": "91", "number": "9876543210" },
    "email": "[email protected]",
    "tags": [{ "name": "vip" }],
    "marketingOptIn": true,
    "acquisitionSource": "shopify-import"
  }'
FieldTypeDescription
namestringContact’s display name.
phoneobjectPhone object: countryCode (e.g. "91") and number.
emailstringOptional email address.
tagsarrayTags to apply, each an object with a name.
customFieldsobjectMap of custom field values.
marketingOptInbooleanWhether the contact has opted in to marketing.
acquisitionSourcestringWhere the contact came from.
preferredLanguagestringPreferred language code.

Returns 201 Created with the created contact (including its generated id). A duplicate phone number with ignore-duplicate=false returns 409 Conflict.

List channels

GET https://api.baat.ai/v1/remote/account/channels

Requires read access to channels. Returns the WhatsApp Cloud API channels connected to your organization. Use a channel’s numeric id as channel_id when sending messages.

[
  {
    "id": 123,
    "type": "WAC_API",
    "phoneNumber": "+91 80 1234 5678",
    "status": "ACTIVE",
    "organizationId": 4567
  }
]

List templates for a channel

GET https://api.baat.ai/v1/remote/account/channels/{channelId}/whatsapp-templates

Requires the templates:read scope. Returns the approved templates on a channel, paginated with a cursor.

Query paramDefaultDescription
limit50Maximum templates to return.
afterPagination cursor; pass the cursor from the previous response to fetch the next page.
{
  "cursor": "QVFIU…",
  "data": [
    { "name": "order_shipped_v2", "language": "en", "status": "APPROVED" }
  ]
}

The usual flow is: list channels → pick a channel_idlist templates on that channel → pick a template → send via POST /m1/whatsapp/messages.

Scopes & errors

Each endpoint returns 401 Unauthorized for a missing/invalid key and 403 Forbidden if the key lacks the required scope (contacts:write, channels:read, or templates:read respectively).

Need a hand?

Our team answers on WhatsApp, usually within a business day.

Contact support Book a demo