Skip to content
Baatzo home

For developers and agencies

Build on Baatzo

Connect clients through Meta's Embedded Signup, see how Baatzo handles Meta's webhooks, and send login codes, reports and other approved templates from your own software with the Baatzo API.

The API is part of the first release, on Starter, Growth and Pro. Marketing sends, contact and campaign endpoints and webhooks for other events follow on Pro.

Available at launch on every paid plan. Names may change before launch.

curl -X POST "https://api.baatzo.com/v1/messages" \
  -H "Authorization: Bearer $BAATZO_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "to": "+919876543210",
  "template": {
    "name": "fee_reminder",
    "language": "en",
    "variables": {
      "parent_name": "Priya Mehta",
      "amount": "₹4,500",
      "month": "December",
      "due_date": "5 Dec"
    }
  }
}'

How developers and agencies onboard

The same path as any business, with one rule from Meta: each client connects its own number, in its own workspace. Every step in detail.
  1. Step 1

    Create an account

    Sign up with email or Google and verify your email. Turn on two-step verification with an authenticator app: Owners and Admins need it before they can connect WhatsApp or Razorpay.

    YouBaatzoA few minutes
  2. Step 2

    Register the organisation

    Each business gets its own workspace, with its legal name exactly as on its documents, its GSTIN if it has one, and its industry. Baatzo checks the industry against the businesses Meta prohibits or restricts before WhatsApp can be connected. Meta Business Verification is the business's own step: Baatzo guides it, and Meta decides.

    YouBaatzoMetaMeta publishes no timeline for Business Verification
  3. Step 3

    Connect the business's own number

    The business connects its own WhatsApp Business Account through Meta's Embedded Signup, on a new number or keeping the WhatsApp Business app. Meta doesn't allow one account or number to be shared between businesses, so an agency connects each client separately, in that client's workspace.

    YouMetaBaatzoA few minutes, once a connection slot is free
  4. Step 4

    Test on your own phones

    The Template Studio plan is free. Once a template is approved, you can send it to up to 5 of your team's own numbers before any campaign goes out.

    You

Agencies: one login, many workspaces

One login can belong to several workspaces, with a role in each, and switch between them in one click. Client data never mixes between workspaces. The agency console is coming soon.

Agency consoleComing soon

How Baatzo handles Meta's webhooks

Meta tells Baatzo about every message, status and template decision through webhooks. They arrive at api.baatzo.com/webhooks, handled by a process separate from the app, so a slow deploy or a busy inbox can't delay our answer to Meta.
MetaSigns each delivery

Messages, statuses, template decisions and account changes, up to 1,000 updates in one delivery.

api.baatzo.com/webhooksIts own process, apart from the app
  1. 1Verify X-Hub-Signature-256HMAC-SHA256 of the raw bytes, compared in constant time
  2. 2Store the raw eventExactly as it arrived; a repeat is dropped by a hash of its body
  3. 3Answer 200 fastWe aim for 99% of deliveries within 300 ms
WorkersProcess each event once
  1. 4Drop repeatsMessages and statuses by Meta's message ID
  2. 5Move statuses forward onlyA late “delivered” never undoes “read”
  3. 6Update your workspaceInbox, template status and campaign reports
  • Signature doesn't match: 401, never 200
  • Database down: 503, and Meta retries for up to 7 days
  • Raw events kept 30 days, so we can replay them after a fix
How a webhook from Meta travels through Baatzo: verified, stored and answered first, processed afterwards.

Verify the signature on the raw body

Meta signs each delivery in the X-Hub-Signature-256 header: an HMAC-SHA256 of the raw request body, keyed with our app secret. Baatzo checks it against the raw bytes, before any parsing, with a constant-time comparison. A delivery we can't verify gets 401, never 200.

Store it, then answer

A verified delivery is stored exactly as it arrived, then answered with 200. We aim to answer 99% of deliveries within 300 ms. If our database is down we answer 503, and Meta tries again; Meta keeps retrying for up to 7 days.

Process each event once

Workers pick stored events up from a queue. A repeated delivery is dropped by a hash of its body, and repeated messages and statuses by Meta's message ID, so processing the same event twice changes nothing.

Never trust the arrival order

Meta doesn't guarantee order. A message's status only moves forward, so a late “delivered” after “read” fills in the time without moving the status back.

Keep the raw event

Meta has no API for past webhooks, so Baatzo keeps raw events for 30 days and can replay them after a fix.

Meta webhook fields Baatzo subscribes to

You don't subscribe to anything yourself: Baatzo's Meta app receives these for every connected number.

  • messages
  • message_template_status_update
  • template_category_update
  • message_template_quality_update
  • account_update
  • phone_number_name_update
  • phone_number_quality_update
  • user_preferences

The Baatzo REST API

Send login codes, reports and other approved Authentication or Utility templates from your own systems, and track each one, with the same rules and the same prices as the app.

On Starter, Growth and Pro, from launch

API v1 sends approved Authentication and Utility templates, tells you each message's status and sends a signed status webhook. Owners and Admins create the workspace's API keys. Names and fields in the examples may change before launch.

Base URL
https://api.baatzo.com/v1

Workspace API keys

Each API key belongs to one workspace, and only the workspace's Owners and Admins can create one. Send it as a bearer token, and keep it on your server, never in a browser or a mobile app.

Authorization: Bearer <your API key>

Idempotency on every send

Send an Idempotency-Key header, such as a fresh UUID, with every POST /v1/messages. If a network error makes you retry with the same key, Baatzo doesn't send the message twice.

Idempotency-Key: <a new UUID>

Rate limits

Published with the API at launch. Meta's own limits still apply on top: by default up to 80 messages a second per number, and your messaging limit of people per 24 hours.

Conventions

  • Versioned in the path: /v1
  • JSON in and out
  • Errors as { code, message, details }

Endpoints

Send a template message

POST/v1/messagesNeeds Idempotency-Key

Sends an approved Authentication or Utility template to one number, with a value for each variable: a login code, for example, or a report with a link to its PDF. The message is queued at once, and its status follows by the status webhook or from GET /v1/messages/{id}. Marketing templates can't be sent through the API yet.

curl -X POST "https://api.baatzo.com/v1/messages" \
  -H "Authorization: Bearer $BAATZO_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "to": "+919876543210",
  "template": {
    "name": "fee_reminder",
    "language": "en",
    "variables": {
      "parent_name": "Priya Mehta",
      "amount": "₹4,500",
      "month": "December",
      "due_date": "5 Dec"
    }
  }
}'
Response: 202 Accepted
{
  "id": "01937a2e-5c41-7d3a-8f2b-6e9c4a1d0b57",
  "status": "queued",
  "to": "+919876543210",
  "template": {
    "name": "fee_reminder",
    "language": "en",
    "category": "utility"
  },
  "created_at": "2026-12-01T03:30:00Z"
}

Get message status

GET/v1/messages/{id}

Returns a message's status, its timeline, any error with Meta's error code, and whether Baatzo's fee applies.

curl "https://api.baatzo.com/v1/messages/01937a2e-5c41-7d3a-8f2b-6e9c4a1d0b57" \
  -H "Authorization: Bearer $BAATZO_API_KEY"
Response: 200 OK
{
  "id": "01937a2e-5c41-7d3a-8f2b-6e9c4a1d0b57",
  "status": "delivered",
  "to": "+919876543210",
  "category": "utility",
  "timeline": {
    "queued_at": "2026-12-01T03:30:00Z",
    "sent_at": "2026-12-01T03:30:01Z",
    "delivered_at": "2026-12-01T03:30:04Z",
    "read_at": null
  },
  "error": null,
  "charge": {
    "state": "chargeable",
    "baatzo_fee_paise": 2
  }
}

Status webhook

Give Baatzo an HTTPS URL, and each message you send through the API reports every change of status there. Each delivery is signed so you can check it came from us.

Statuses

One delivery for each change
  • sentMeta accepted the message
  • deliveredIt reached the person's phone
  • readThe person opened it, if they share read receipts
  • failedIt couldn't be delivered; the body carries Meta's error code

The signature

X-Baatzo-Signature: sha256=<hex>

An HMAC-SHA256 of the raw request body, keyed with your endpoint's secret, in the same format Meta uses for its own webhooks. Check it against the raw bytes before you parse the JSON.

Retries and handling

Baatzo retries a delivery that doesn't get a 2xx answer. The retry schedule will be published with the API at launch.

Answer 200 quickly and do the work afterwards. A delivery can arrive more than once, so use the event id to process each event once, and don't rely on the order events arrive in.

Verify a delivery (Node.js)
import { createHmac, timingSafeEqual } from "node:crypto"

// rawBody is the request body as bytes, before any JSON parsing.
export function isFromBaatzo(rawBody, signatureHeader, secret) {
  const expected = Buffer.from("sha256=" + createHmac("sha256", secret).update(rawBody).digest("hex"))
  const received = Buffer.from(signatureHeader ?? "")
  return expected.length === received.length && timingSafeEqual(expected, received)
}
Example delivery body
{
  "id": "01937a2f-1b3d-7f02-8c6e-9a5b4d2e1c73",
  "type": "message.status_updated",
  "created_at": "2026-12-01T03:30:04Z",
  "data": {
    "message_id": "01937a2e-5c41-7d3a-8f2b-6e9c4a1d0b57",
    "status": "delivered",
    "category": "utility"
  }
}
Coming soon

Next, on Pro

Coming soon. Join early access to hear when it opens.

On Pro, included at no extra cost when it ships. We haven't published a date.

Get early access
  • Marketing templates

    Send marketing templates through the API. Until then, send marketing as a campaign from the Baatzo web app.

  • Contacts and campaigns

    Add contacts and run campaigns from your own software. Until then, import contacts from CSV or Excel in the web app.

  • Webhooks for other events

    Hear about a customer's message, a template decision or an opt-out at your own URL. Until then, the status webhook covers the messages you send through the API.

Sandbox and testing

API sandboxComing soon

A way to test the API without messaging real customers is coming soon. Until then, send your test messages to your team's own numbers.

Test on your own phones

The Template Studio plan is free. Once a template is approved, you can send it to up to 5 of your team's own numbers before any campaign goes out.

See the Template Studio plan

Security

How Baatzo is built to keep each business's connection, and its customers' data, safe.
  • You never handle Meta's tokens

    Each business's Meta token and number PIN stay on our servers, encrypted with AES-256-GCM, and are decrypted only at the moment of a call to Meta. They are never logged or sent to a browser.

  • Workspaces are walled off

    Every workspace is separated in the database by row-level security, so one client's data can't appear in another's, even for an agency that runs both.

  • Signed webhooks, both ways

    We verify Meta's signature on the raw body and refuse what we can't verify. Our status webhook to your URL is signed the same way, with HMAC-SHA256, so you can check it came from us.

  • Two-step verification for the people who connect

    Owners and Admins must turn on two-step verification before they can connect WhatsApp or Razorpay.

  • Workspace keys, kept on your server

    API keys belong to one workspace, and only its Owners and Admins can create them. Keep them on your server, never in a browser or a mobile app.

Developer questions

बात करो, business बढ़ाओ

The Baatzo API opens at launch

Tell us what you'd build on Baatzo. We'll write to you when Baatzo opens, and help you connect your first client in the meantime.