Developers

Developers overview & quickstart

Updated 13 November 2026

The Developers page, under Settings → Developers, is where you connect Baat to your own code. Use it to send WhatsApp messages from your backend, add contacts from your CRM, and receive events when something happens in your Baat account.

Which plan you need

The API and webhooks are part of the Business plan. You can also try them during the free trial.

What you can do with the API

  • Send messages — send approved WhatsApp template messages from your own systems, such as order updates and shipping alerts. Inside the 24-hour customer service window you can also send plain text

  • Add contacts — create or update contacts in Baat from your store, CRM or other tools

  • List templates — look up a channel’s message templates

  • Receive webhooks — get an HTTP call when a contact is created or updated, a conversation opens or closes, or a customer submits a WhatsApp Flow form

The three tabs

TabWhat it is for
API keysCreate, revoke and delete the keys your code uses
WebhooksRegister the URLs Baat sends events to, each with its own signing secret
Logs & usageSee every webhook delivery: the event, the endpoint, its status, how many attempts it took, and the last error

Base URL and authentication

All API requests go to the Baat API over HTTPS:

Production:  https://api.baat.ai
Staging:     https://stageapi.baat.ai

Send your API key in the X-API-KEY header on every request:

X-API-KEY: bk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Baat uses the X-API-KEY header, not an Authorization: Bearer header.

Quickstart: your first message

1. Create an API key

Go to Settings → Developers → API keys, click Create key, name it, and tick Send messages (messages:send). Click Create and copy the secret. It is shown only once.

2. Get a ready-made request

Go to Settings → Templates and open an approved template. Its Send via API tab shows a complete request for that template, in cURL, Node.js or Python, with your channel ID, the template ID, its name and language, and the parameters it expects. Copy it.

3. Send the message

The request looks like this:

curl -X POST https://api.baat.ai/m1/whatsapp/messages \
  -H "X-API-KEY: $BAAT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "phone_number": "919876543210",
    "contact_name": "Aarav",
    "channel_id": 123,
    "template_id": "1234567890123456",
    "message": {
      "template_name": "order_update",
      "language_code": "en",
      "body_params": ["Aarav", "#10482"]
    }
  }'

Write the phone number as digits only, starting with the country code, with no + or spaces.

A successful call returns 202 Accepted:

{ "success": true, "message_id": "a1b2c3d4", "status": "queued" }

202 means Baat has queued the message. To learn whether it was delivered, set up a webhook or check the conversation in your Inbox.

Next, read Sending WhatsApp messages with the API for every field, and Creating and managing API keys for scopes.

Related reading

Where this fits in the wider picture.

Need a hand?

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

Contact support Book a demo