Developers

API reference & error codes

Updated 13 November 2026

A one-page reference for the Baat developer API. For step-by-step guides, see the other articles in this section.

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

Base URLs

EnvironmentHost
Productionhttps://api.baat.ai
Staginghttps://stageapi.baat.ai

Authentication

Pass your key in the X-API-KEY header on every request. Keys look like bk_live_ followed by 34 characters and are issued per organization.

X-API-KEY: bk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Endpoints

MethodPathScopePurpose
POST/m1/whatsapp/messagesmessages:sendSend a template message, or a text message inside the 24-hour window
GET/m1/orgs/{orgId}/messagesmessages:readRead the messages in a conversation
POST/v1/remote/contactscontacts:writeCreate or update a contact
GET/v1/remote/account/channels/{channelId}/whatsapp-templatestemplates:readList the templates on a channel, in every status

Request and response fields use snake_case.

API keys and webhooks are managed in the dashboard, under Settings → Developers, not through these endpoints.

HTTP status codes

CodeMeaning
200 OKRequest succeeded (reads).
201 CreatedResource created (e.g. a contact).
202 AcceptedMessage accepted and queued for delivery.
400 Bad RequestThe request is invalid, or a required header is missing
401 UnauthorizedThe API key is unknown, inactive or expired
403 ForbiddenThe key does not have the scope the endpoint needs. The send endpoint returns "status": "insufficient_scope"
409 ConflictThe contact already exists and you set ignore-duplicate=false
500 Internal Server ErrorSomething failed on Baat’s side. A message may already be queued, so check before you retry a send

There are no published rate limits.

Webhook delivery

AspectDetail
MethodPOST with Content-Type: application/json
Signature headerX-Baat-Signature: sha256= — HMAC-SHA256 of the raw body, keyed with the signing secret.
Eventscontact.created, contact.updated, conversation.opened, conversation.closed, flow_response.submitted
Payload{ event, occurred_at, organization_id, data }
RetriesUp to 8 attempts, with waits growing from 10 minutes to 7 days (about 13 days in all), then marked Failed

Make webhook handlers safe to run twice, and verify the X-Baat-Signature on every webhook. Keep API keys and signing secrets out of source control, and revoke a key the moment it may have been exposed.

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