WhatsApp API for messages, broadcasts and templates
Otobiz gives you one REST API for WhatsApp: 49 endpoints for messages, broadcasts and templates, called with one Bearer key.
Three steps to your first call
Make an API key
In Otobiz, open API keys and make one. It acts with the role you pick, and is shown once.
# The key from Otobiz, under API keys
export OTOBIZ_API_KEY="otbz_..."
curl https://app.otobiz.ai/api/v1/account \
-H "Authorization: Bearer $OTOBIZ_API_KEY"
Connect WhatsApp by link
Ask for a connect link and open it. Nothing is connected until you finish the steps there.
What Otobiz does on WhatsApp# The answer carries "url": open it to connect WhatsApp
curl https://app.otobiz.ai/api/v1/connect-sessions \
-H "Authorization: Bearer $OTOBIZ_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "kind": "whatsapp" }'
# Reply in a WhatsApp chat
curl https://app.otobiz.ai/api/v1/conversations/$CHAT_ID/messages \
-H "Authorization: Bearer $OTOBIZ_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: reply-1042" \
-d '{ "text": "Your order ships today." }'
# Write first, or after 24 hours, with an approved template
curl https://app.otobiz.ai/api/v1/conversations/$CHAT_ID/messages \
-H "Authorization: Bearer $OTOBIZ_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: update-1042" \
-d '{ "template": { "name": "order_update", "lang": "en", "params": ["1042"] } }'
WhatsApp endpoints by job
49 endpoints work on WhatsApp, read from the API's own spec. Every path starts with https://app.otobiz.ai/api/v1.
Chats and messages
22 endpoints| Method | Path | What it does |
|---|---|---|
| GET | /inbox/conversations | List chats |
| GET | /inbox/conversations/{conversationId}/messages | Read a conversation's messages |
| POST | /inbox/conversations/{conversationId}/messages | Send a message |
| POST | /inbox/conversations | Start a chat |
| PATCH | /inbox/conversations/{conversationId}/messages/{messageId} | Edit a sent message, or move a scheduled one |
| Method | Path | What it does |
|---|---|---|
| POST | /conversations/{id}/ai-reply/send | Send the AI's reply |
| GET | /inbox/availability | Who is away, and your own availability |
| PATCH | /inbox/availability | Set your own availability |
| GET | /inbox/conversations | List chats |
| POST | /inbox/conversations | Start a chat |
| GET | /inbox/conversations/requests | List message requests |
| GET | /inbox/conversations/{conversationId} | Get a conversation |
| GET | /inbox/conversations/{conversationId}/contact-profile | Get a Messenger chat's language, time zone and gender |
| POST | /inbox/conversations/{conversationId}/events | Record an event on a chat: a fact the agent grounds on, or one it tells the customer about |
| GET | /inbox/conversations/{conversationId}/members | List who is in a group conversation |
| GET | /inbox/conversations/{conversationId}/messages | Read a conversation's messages |
| POST | /inbox/conversations/{conversationId}/messages | Send a message |
| GET | /inbox/conversations/{conversationId}/messages/{messageId} | Get a message |
| PATCH | /inbox/conversations/{conversationId}/messages/{messageId} | Edit a sent message, or move a scheduled one |
| POST | /inbox/conversations/{conversationId}/messages/{messageId}/reactions | React to a message |
| DELETE | /inbox/conversations/{conversationId}/messages/{messageId}/reactions | Take the brand's reaction off a message |
| POST | /inbox/conversations/{conversationId}/messages/{messageId}/retry | Send a failed message again |
| POST | /inbox/conversations/{conversationId}/typing | Show the customer you are typing |
| GET | /inbox/items | List what waits in the Inbox |
| GET | /inbox/labels | List the brand's inbox labels |
| POST | /inbox/labels | Create an inbox label |
| POST | /inbox/messages/search | Search messages |
Broadcasts
16 endpoints| Method | Path | What it does |
|---|---|---|
| POST | /broadcasts | Create a draft broadcast |
| POST | /broadcasts/{broadcastId}/recipients | Add recipients to a draft broadcast |
| POST | /broadcasts/test | Send a test of a broadcast to one address |
| POST | /broadcasts/{broadcastId}/send | Send, schedule, resume or retry a broadcast |
| GET | /broadcasts/{broadcastId} | Get a broadcast |
| Method | Path | What it does |
|---|---|---|
| GET | /broadcasts | List broadcasts |
| POST | /broadcasts | Create a draft broadcast |
| GET | /broadcasts/calendar | Upcoming occasions, each with a send day and a counted audience |
| PATCH | /broadcasts/calendar/choices | Follow, hide or clear a moment, for every year |
| GET | /broadcasts/recommendations | Who to send to next: counted audiences from your customers and campaigns |
| GET | /broadcasts/senders | List the accounts a broadcast can send from |
| GET | /broadcasts/settings | Get the brand's broadcast settings |
| PATCH | /broadcasts/settings | Change the brand's broadcast settings |
| POST | /broadcasts/test | Send a test of a broadcast to one address |
| GET | /broadcasts/{broadcastId} | Get a broadcast |
| PATCH | /broadcasts/{broadcastId} | Update a broadcast |
| DELETE | /broadcasts/{broadcastId} | Delete a draft broadcast |
| POST | /broadcasts/{broadcastId}/cancel | Cancel a broadcast |
| GET | /broadcasts/{broadcastId}/recipients | List a broadcast's recipients |
| POST | /broadcasts/{broadcastId}/recipients | Add recipients to a draft broadcast |
| POST | /broadcasts/{broadcastId}/send | Send, schedule, resume or retry a broadcast |
Message templates
11 endpointsCreate, edit and delete your WhatsApp templates. A new or edited one goes to WhatsApp for review; a send names an approved one in its template field.
| Method | Path | What it does |
|---|---|---|
| GET | /whatsapp/templates | List message templates |
| POST | /whatsapp/templates | Create a WhatsApp template |
| PATCH | /whatsapp/templates/{templateId} | Edit a WhatsApp template (re-enters review) |
| DELETE | /whatsapp/templates/{templateId} | Delete a WhatsApp template |
| GET | /whatsapp/templates/{templateId} | Get a message template |
| Method | Path | What it does |
|---|---|---|
| GET | /whatsapp/pricing-analytics | Meta's message volume and cost for a WhatsApp number |
| GET | /whatsapp/templates | List message templates |
| POST | /whatsapp/templates | Create a WhatsApp template |
| POST | /whatsapp/templates/draft | Write a WhatsApp template draft with AI |
| GET | /whatsapp/templates/insights | Meta's figures for marketing templates |
| GET | /whatsapp/templates/next-name | Next free version of a template name |
| POST | /whatsapp/templates/sync | Sync WhatsApp templates from Meta |
| GET | /whatsapp/templates/{templateId} | Get a message template |
| PATCH | /whatsapp/templates/{templateId} | Edit a WhatsApp template (re-enters review) |
| DELETE | /whatsapp/templates/{templateId} | Delete a WhatsApp template |
| POST | /whatsapp/templates/{templateId}/activate | Use a stopped or paused WhatsApp template again |
On every channel
The same four jobs sit beside every channel's own endpoints.
Connect the channel
- POST/connect/sessions
- GET/connect/sessions/{sessionId}
- GET/connections
- POST/connections/{connectionId}/disconnect
Contacts
- GET/contacts
- POST/contacts
- PATCH/contacts/{contactId}
- PATCH/contacts/{contactId}/consent
Files to attach
- POST/files
- GET/files/{fileId}
Webhooks
- POST/webhooks/settings
- POST/webhooks/test
- GET/webhooks/logs
What WhatsApp takes
WhatsApp's own limits, as Otobiz enforces them on every call.
- Message text
- Up to 4,096 characters.
- Files
- Images to 5 MB, video to 16 MB, audio to 16 MB and documents to 100 MB (PDF, Word, Excel, PowerPoint or TXT).
- Buttons
- Up to 3 reply buttons; also a list, a link button, a location request and a media carousel.
- Reply window
- 24 hours from the customer's last message. After it, send an approved template.
- Delivery status
- Sent, delivered and read.
What every send carries
The rules your team works under in Otobiz apply to your code too.
Consent checked
Every send checks the contact's consent first. A refused send answers 409 with the reason.
Opt-outs hold
A person who opted out is on the suppression list, and no call can message them.
No double sends
Send an Idempotency-Key header and a retry is safe. The key is remembered for 24 hours.
One answer per customer
A send takes the chat over from an automation in flight, so the customer never gets two replies.
Approval where you ask
A send from an AI agent's key waits for a reviewer and answers 202 approval_required.
Every send recorded
Each send lands in your activity feed, and validateOnly=true runs every check without sending.
The 24-hour window
Inside 24 hours of the customer's last message, free text goes. After it, the send needs a template.
Approved templates
Create a template, wait for WhatsApp to approve it, then name it in the send to write first.
What comes back
POST /inbox/conversations/{conversationId}/messages answers
- 200
- Sent, a note or a scheduled message written, or, with validateOnly=true, the passed check
- 202
- Accepted: it goes out shortly (status
queued) - 402
- The brand has no active plan. Replies are paused
- 403
- Your role cannot send replies
- 409
- An automated reply is mid-send, this Idempotency-Key is in flight, or this person cannot be messaged here (
first_contact_not_allowed,suppressed,reconnect_required) - 429
- Too many requests (
rate_limited)
The event that follows
Otobiz posts each event to your endpoint, signed. The event id is stable, so dedupe on it.
A shortened sample from the API's own examples. The docs list every field.
{
"id": "evt_00000000008008000000000000",
"type": "message.received",
"apiVersion": "v1",
"createdAt": "2026-10-09T09:30:00.000Z",
"data": {
"object": {
"id": "msg_01j2jxbb4pex5vsknk084sn041",
"conversationId": "cnv_01j2jxbb4pex5vsknk084sn03g",
"channel": "whatsapp",
"direction": "inbound",
"role": "reply",
"status": "received",
"body": "Is the large box in stock?",
"createdAt": "2026-11-18T09:30:00.000Z"
}
}
}
{
"id": "evt_00000000008008000000000000",
"type": "message.sent",
"apiVersion": "v1",
"createdAt": "2026-10-09T09:30:00.000Z",
"data": {
"object": {
"id": "msg_01j2jxbb4pex5vsknk084sn040",
"conversationId": "cnv_01j2jxbb4pex5vsknk084sn03g",
"channel": "whatsapp",
"direction": "outbound",
"role": "reply",
"status": "delivered",
"body": "Yes, the large box is in stock. Shall I keep one for you?",
"createdAt": "2026-11-18T09:31:00.000Z"
}
}
}
Register an endpoint
Name the events you want. A test call sends a sample to check your server.
Developer docs# Register where the events go
curl https://app.otobiz.ai/api/v1/webhook-endpoints \
-H "Authorization: Bearer $OTOBIZ_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "name": "My server", "url": "https://example.com/otobiz", "events": ["message.received", "message.sent"] }'
Let an AI app do it
The same operations are tools on the Otobiz MCP server, so an AI app can work WhatsApp with no code.
ClaudeAssistantsServer https://mcp.otobiz.ai
› Set up Otobiz from otobiz.ai/agents/claude
ChatGPTAssistantsServer https://mcp.otobiz.ai
› Set up Otobiz from otobiz.ai/agents/chatgpt
GrokAssistantsServer https://mcp.otobiz.ai
› Set up Otobiz from otobiz.ai/agents/grok
Claude CodeCoding toolsServer https://mcp.otobiz.ai
› Set up Otobiz from otobiz.ai/agents/claude-code
CodexCoding toolsServer https://mcp.otobiz.ai
› Set up Otobiz from otobiz.ai/agents/codex
CursorCoding toolsServer https://mcp.otobiz.ai
› Set up Otobiz from otobiz.ai/agents/cursor
VS CodeCoding toolsServer https://mcp.otobiz.ai
› Set up Otobiz from otobiz.ai/agents/vscode
AntigravityCoding toolsServer https://mcp.otobiz.ai
› Set up Otobiz from otobiz.ai/agents/antigravity
Devin DesktopCoding toolsServer https://mcp.otobiz.ai
› Set up Otobiz from otobiz.ai/agents/devin
✓ otobiz registered · https://mcp.otobiz.ai
✓ signed in over OAuth · no key pasted
✓ get_current_brand · your business, your role
› Draft replies to my unread DMs. Show me each one before you send it.
✓ list_inbox_conversations · your unread DMs
✓ search_tools "draft replies" · create_reply_draft
✓ call_tool create_reply_draft · one draft per chat
✓ drafts ready · nothing sent until you say yes
No fee per call. You pay for your plan.
WhatsApp comes with Pro, Growth, Business and Enterprise. A call pays only for what it causes, such as a message sent. The API and the MCP server come with it.
Common questions
Make an Otobiz API key, connect WhatsApp by link, then call POST /api/v1/conversations/{id}/messages with the key as a Bearer token.
Call POST /api/v1/connect-sessions with the kind whatsapp. The answer carries a link: open it, finish the steps, and the channel is connected.
Up to 4,096 characters. Free text goes inside 24 hours of the customer's last message.
Yes. The API creates, edits and deletes your templates and sends each one to WhatsApp for review. A send names an approved one to write first or after the 24-hour window.
No. There is no fee per call. You pay for the Otobiz plan that opens WhatsApp, and for what a call causes, such as a message sent.
Yes. The Otobiz MCP server gives an AI app 75 WhatsApp tools, the same operations as the API, and you sign in from the app.
Try it on real customer chats
Connect Instagram, WhatsApp or any other channel and start replying today.


