Official WhatsApp & one API for both channels
Connect a number through Meta's WhatsApp Business Platform — your verified business name, message templates, no QR code to keep alive — and send on it, or on your QR-code number, through one endpoint. Sozuri picks the right number for every message.
- Connect an official number
- The 24-hour window and templates
- Send a message
- Which number a message leaves from
- Response
- List your channels
- Templates
- Receiving messages
- Delivery & read receipts
- Your WhatsApp profile
- Analytics
- One-time codes (OTP)
- Rate limits
- Pricing
- Error responses
Connect an official number
In the dashboard open Project → WhatsApp → Official WhatsApp (Meta) and press Connect with Meta. Meta's own sign-in window opens: log in with Facebook, choose or create your business portfolio and WhatsApp Business Account, and verify the phone number by SMS or voice call. Sozuri finishes the setup and the number appears on the page, ready to send.
You need admin access to the business portfolio, and a payment method on the WhatsApp Business Account — Meta bills its own fees to you directly (see Pricing).
A number on the official platform can't also be linked on the QR-code channel. Sozuri ignores the QR copy of every message, so nothing is answered twice.
The 24-hour window and templates
On the official channel you may send any message to a customer who has written to that number in the last 24 hours. Outside that window only an approved template can be sent — it is how a conversation is started or restarted. Create templates under Official WhatsApp → Templates (or with the API); Meta reviews each one. A free-form send outside the window is refused before it reaches Meta, with the time the window closed.
Send a message
POST /api/v1/whatsapp/messages is the one send endpoint for both WhatsApp channels.
It accepts the official channel's typed shape, and the QR channel's
shape (text, imageUrl, …). Put "channel": "meta" in the body to send
on your official number.
| Field | Required | Type | Description |
|---|---|---|---|
| project | Yes | String | The project name that owns the API key. |
| to | Yes | String | International format, country code first, no + or leading 0 (254700000000). A QR-channel JID ([email protected], [email protected]) or an official-channel user id (KE.1234...) also works — each exists on one channel only. |
| type | For the typed shape | String | text, image, video, audio, document, sticker, location, contacts, interactive, reaction or template, plus an object of the same name: "text": {"body": "…"} (or just "text": "…"), "image": {"link": "https://…", "caption": "…"} (or "id" from an upload), "audio": {"link": "https://….ogg", "voice": true} (a voice note: OGG/OPUS), "template": {"name": "order_ready", "language": "en", "params": {"body": ["Amina"]}}. |
| text, imageUrl, … | For the QR shape | — | The QR channel's fields: text plus at most one media, location or contact field. A contact card and a voice note (voice: true) go out on either channel. |
| channel | No | String | qr or meta to choose the channel yourself. |
| from | No | String | One of your numbers, when you have several — it also decides the channel. |
| replyTo | No | String | The id of the message you are answering; WhatsApp shows it quoted above yours. Works on both channels. On the QR channel the id must be a message of the same chat, or the send is refused with message_not_found. |
Send an Idempotency-Key header (a new UUID per message) and a retry
after a timeout is answered with the first response instead of sending again.
A template (starts a conversation)
curl -X POST https://sozuri.net/api/v1/whatsapp/messages \
-H "Authorization: Bearer $SOZURI_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "project": "your_project_name", "to": "254700000000", "type": "template",
"template": { "name": "order_ready", "language": "en", "params": { "body": ["Amina", "A-1042"] } } }'
A reply (inside the 24-hour window)
curl -X POST https://sozuri.net/api/v1/whatsapp/messages \
-H "Authorization: Bearer $SOZURI_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "project": "your_project_name", "to": "254700000000", "text": "Your order is on its way" }'
Buttons, lists and links (inside the 24-hour window)
These are "type": "interactive" messages, on the official channel only. The id you give a button
or a list row comes back on your webhook as reply.id when the customer taps it
(Receiving messages).
Reply buttons: up to 3, each title up to 20 characters.
{ "project": "your_project_name", "to": "254700000000", "type": "interactive",
"interactive": { "type": "button",
"body": { "text": "Invoice 4821 is KSh 2,400. Pay now?" },
"action": { "buttons": [
{ "type": "reply", "reply": { "id": "PAY_4821", "title": "Pay now" } },
{ "type": "reply", "reply": { "id": "LATER_4821", "title": "Pay later" } } ] } } }
A list: a menu behind a button (action.button, up to 20 characters), with up to
10 rows across all its sections. A row title is up to 24 characters and its description up to 72.
{ "project": "your_project_name", "to": "254700000000", "type": "interactive",
"interactive": { "type": "list",
"body": { "text": "Choose a delivery slot." },
"action": { "button": "See slots", "sections": [
{ "title": "Tomorrow", "rows": [
{ "id": "SLOT_AM", "title": "Morning", "description": "8am to 12pm" },
{ "id": "SLOT_PM", "title": "Afternoon", "description": "2pm to 6pm" } ] } ] } } }
A link button: opens a web page. The label is up to 20 characters.
{ "project": "your_project_name", "to": "254700000000", "type": "interactive",
"interactive": { "type": "cta_url",
"body": { "text": "Track your parcel." },
"action": { "name": "cta_url", "parameters": {
"display_text": "Track", "url": "https://example.com/track/A-1042" } } } }
A carousel: 2 to 10 cards the customer scrolls sideways. Each card has an image or a video
(by link), optional text (up to 160 characters, at most two line breaks) and either one link
button or up to 2 quick-reply buttons. Every card needs the same kind and number of buttons. The message
text (body.text) is required, and a carousel takes no header or footer. Cards are shown in the
order you send them.
{ "project": "your_project_name", "to": "254700000000", "type": "interactive",
"interactive": { "type": "carousel",
"body": { "text": "New this week" },
"action": { "cards": [
{ "header": { "type": "image", "image": { "link": "https://example.com/sofa.jpg" } },
"body": { "text": "3-seater sofa, KSh 45,000" },
"action": { "buttons": [
{ "type": "quick_reply", "quick_reply": { "id": "SOFA_INFO", "title": "Tell me more" } },
{ "type": "quick_reply", "quick_reply": { "id": "SOFA_BUY", "title": "Order" } } ] } },
{ "header": { "type": "image", "image": { "link": "https://example.com/table.jpg" } },
"body": { "text": "Coffee table, KSh 12,500" },
"action": { "buttons": [
{ "type": "quick_reply", "quick_reply": { "id": "TABLE_INFO", "title": "Tell me more" } },
{ "type": "quick_reply", "quick_reply": { "id": "TABLE_BUY", "title": "Order" } } ] } } ] } } }
For link cards, give each card "action": { "name": "cta_url", "parameters": { "display_text": "…",
"url": "https://…" } } instead of buttons. A tapped quick reply arrives like a tapped
reply button.
Ask for their location (inside the 24-hour window)
Shows a Send location button. Their answer arrives on your webhook as a location message.
{ "project": "your_project_name", "to": "254700000000", "type": "interactive",
"interactive": { "type": "location_request_message",
"body": { "text": "Where should we deliver?" },
"action": { "name": "send_location" } } }
Open a Flow (a form inside WhatsApp)
Build and publish the Flow in WhatsApp Manager first, then open it by flow_id or
flow_name. flow_cta is the button text (30 characters at most); with
"flow_action": "navigate", name the first screen. The customer's answers arrive
on your webhook as "type": "interactive" with reply.type flow and the
answers in reply.response (JSON text).
{ "project": "your_project_name", "to": "254700000000", "type": "interactive",
"interactive": { "type": "flow",
"body": { "text": "Book your appointment" },
"action": { "name": "flow", "parameters": {
"flow_message_version": "3", "flow_id": "1234567890", "flow_cta": "Book now",
"flow_action": "navigate", "flow_action_payload": { "screen": "WELCOME" } } } } }
Send a file from your own system (upload it first)
A file with no public link can be uploaded first: POST /api/v1/whatsapp/media, as multipart form
data with the file in file. The answer's id then goes where a link would:
"image": {"id": "…"}. Sozuri reads the kind of file from its contents, not its name. WhatsApp keeps
an uploaded file for 30 days, and it can be sent from the number it was uploaded on: name it with
from when you have several.
curl -X POST https://sozuri.net/api/v1/whatsapp/media \
-H "Authorization: Bearer $SOZURI_API_KEY" \
-F project=your_project_name -F [email protected]
{ "id": "1234567890123456", "type": "document", "mime": "application/pdf", "size": 48211,
"filename": "receipt.pdf", "from": "254700000000", "expiresAt": "2026-12-14T09:30:00+03:00" }
Images are JPEG or PNG, up to 5 MB; video MP4 or 3GP, up to 16 MB;
audio AAC, MP4, MP3, AMR or OGG, up to 16 MB; documents PDF, text or Office, up to
16 MB. A bigger file is 422 file_too_large and another kind
422 unsupported_file, before anything is sent to WhatsApp. 502 not_accepted means
WhatsApp refused the file.
For a template with an image, video or document header, upload an example with -F for=template
(and -F waba_id=… if you have more than one WhatsApp Business Account). The answer is a
handle, which goes into the template you submit:
"header": {"format": "IMAGE", "handle": "…"}. Meta reviews the template with that file. The example
must be a JPEG or PNG image, an MP4 video or a PDF.
Which number a message leaves from
With both channels connected, the first rule that applies decides:
channelorfrom, when you send them.- An address that exists on one channel only (a JID on QR, a user id on the official channel).
- A template → the official channel, the only one with templates.
- A reply → the number the customer last wrote to in the past 24 hours. Automated answers (the AI agent, keyword rules, workflows) always leave from the number the message arrived on.
- Your project's default, set on the Official WhatsApp page.
- Otherwise the QR channel — a free-form message to somebody who has not written would be refused on the official one.
The response says which channel carried the message and why (channel, routed).
Response
{
"status": "accepted",
"channel": "meta",
"routed": "template",
"message": {
"id": "wamid.HBgLMjU0NzAw...",
"to": "254700000000",
"from": "254711000000",
"type": "template",
"status": "pending"
}
}
message.id is the key delivery and read receipts arrive under. On the
official channel an accepted message is pending: sent, delivered and
read follow as Meta reports them.
List your channels
GET /api/v1/whatsapp/channels?project=your_project_name returns what the project has, and
what each channel can do: the message types it sends, when free-form messages are allowed,
and whether it has templates. Add &to=254722000000 and each official number also says
whether that customer's 24-hour window is open, so you know before sending whether only a template will go.
{
"default": null,
"channels": [
{ "channel": "qr", "available": true, "status": "connected", "number": "254700000001",
"sends": ["text", "image", "video", "audio", "document", "sticker", "location", "contacts", "reaction"],
"freeForm": "always", "templates": false },
{ "channel": "meta", "available": true,
"sends": ["text", "image", "video", "audio", "document", "sticker", "location", "contacts", "interactive", "reaction", "template"],
"freeForm": "within 24 hours of the customer's last message", "templates": true,
"numbers": [
{ "number": "254711000000", "phoneNumberId": "1098...", "verifiedName": "Duka Bora", "status": "connected",
"connected": true, "quality": "GREEN", "throughput": "STANDARD", "coexistence": false,
"canSend": "AVAILABLE", "reason": null, "nameStatus": "APPROVED", "messagingLimit": "TIER_1K",
"accountStatus": "connected", "checkedAt": "2026-11-14T08:00:00+03:00",
"window": { "open": true, "closesAt": "2026-11-09T10:12:00+03:00" } } ] }
]
}
window appears only when you pass to. For each official number:
| Field | What it says |
|---|---|
| connected | Sozuri can send on it: the number and its WhatsApp Business Account are both connected. |
| canSend | WhatsApp's own answer: AVAILABLE, LIMITED or BLOCKED (null until it has been checked). A connected number can still be blocked, for example when the account has no payment method. |
| reason | Why, in words: WhatsApp's first reason and what to do about it, or why the number was disconnected. |
| quality | GREEN, YELLOW or RED: how customers have reacted to your messages lately. |
| nameStatus | The review of your display name (APPROVED, PENDING_REVIEW, DECLINED, …). |
| messagingLimit | How many people your business can start conversations with in 24 hours (WhatsApp's tier, such as TIER_1K). |
| checkedAt | When Sozuri last asked WhatsApp. It checks every hour. |
Templates
GET /api/v1/whatsapp/templates lists your templates and their review status;
POST /api/v1/whatsapp/templates submits one for Meta's review (name,
language, category of marketing, utility or
authentication, and its body). Only an APPROVED template can be sent.
A button may open a Flow: {"type": "FLOW", "text": "Book a visit", "flow_id": "…"}
(or flow_name instead of flow_id), with an optional flow_action of
navigate or data_exchange and, for navigate, a navigate_screen.
| Request | What it does |
|---|---|
POST /api/v1/whatsapp/templates/{id} | Edits a template, by the id the list gives (or press Edit beside it under Official WhatsApp → Templates). Send the same fields as a new one, without name and language, which never change. It replaces every part of the template, so include the header, footer and buttons it keeps. Meta reviews it again: the template is PENDING until Meta decides. Only an approved, rejected or paused template can be edited, an approved one cannot change category, and Meta allows an approved template one edit a day and ten in 30 days. |
DELETE /api/v1/whatsapp/templates/{id} | Deletes that template in that one language; the same name in another language stays. Meta does not let the name of a deleted approved template be used again for 30 days. |
An authentication template takes, besides code_expiration_minutes (1 to 90),
security_recommendation and otp_button_text:
otp_type — copy_code (the default), or one_tap / zero_tap, which
fill the code into your own Android app. Those two need supported_apps: up to five of
{"package_name": "com.example.shop", "signature_hash": "K8a/AINcGX7"} (the 11-character hash of
your app's signing key), and take an optional autofill_text. Zero-tap also needs
"zero_tap_terms_accepted": true, your acceptance of Meta's zero-tap terms.
message_send_ttl_seconds (30 to 900) is how long WhatsApp keeps trying to deliver the code; after
that it gives up, which is when an OTP moves on to SMS or a call.
Template values
Give a template's values in template.params. Sozuri checks them against the approved template
before anything is sent, so a missing value is a 422 template_parameters that names the placeholder.
| Field | Type | Description |
|---|---|---|
| header | String / Object | The text for a {{1}} in a text header. For an image, video or document header, {"link": "https://…"} or {"id": "…"} (an uploaded media id). For a location header, {"latitude": …, "longitude": …}, with an optional name and address. |
| body | Array / Object | Positional values in order (["Amina", "A-1042"]) or named ones ({"first_name": "Amina"}). |
| buttons | Object | Keyed by the button's position, counting from 0. A link button whose URL ends in a placeholder takes the end of the link. A copy-code button takes the code. A quick-reply button may take a payload, which comes back when it is tapped. A Flow button may take a token string, or {"flow_token": "…", "flow_action_data": {…}}. The token comes back with the customer's answers, so you can tell which message they answered. The data fills the Flow's first screen and must be an object. Phone-number and WhatsApp-call buttons take nothing. |
| code | String | An authentication template's one-time code, up to 15 characters. Sozuri puts it in the message and on the copy-code button. |
| cards | Array | A carousel: one entry per card, in order, exactly as many as the template has. Each card takes its own header ({"id": "…"} from an upload, or {"link": "https://…"}; every card needs one), and body and buttons as above, counting the card's buttons from 0. |
| offer | Object | A limited-time offer that shows when it ends: {"expires_at": "2026-12-01T18:00:00+03:00"}, a date and time in the future (or a UNIX time in milliseconds). The customer sees a countdown. An offer that shows no end takes nothing here. |
"template": { "name": "book_visit", "language": "en",
"params": { "body": ["Amina"],
"buttons": { "1": { "flow_token": "visit-881", "flow_action_data": { "visit_id": "881" } } } } }
Some templates made in WhatsApp Manager have parts Sozuri cannot fill from params yet: a
product-card carousel, a product header, or a catalogue or product button. Such a template is refused with
422 template_unsupported, which names the part. GET /api/v1/whatsapp/templates says
the same under unsupported, and is null for every template the values can fill. You
can still send it by giving Meta's own components array in template.components
instead of params. Sozuri then checks only that the template is approved, and Meta checks the rest.
Carousel templates
A carousel is a marketing template: a message, then 2 to 10 cards the customer swipes through. Each card has
an image or a video, optional text of up to 160 characters, and one or two buttons (quick reply, link or phone
number). Every card has the same parts: the same kind of picture, text on all or none, and the same buttons in
the same order. Upload each card's example picture with POST /api/v1/whatsapp/media and
for=template, and give its handle:
{ "project": "your_project_name", "name": "new_plants", "language": "en", "category": "marketing",
"body": { "text": "New this week, {{1}}! Swipe to see them.", "examples": ["Amina"] },
"carousel": { "cards": [
{ "header": { "format": "IMAGE", "handle": "4::aW1h...ARa" },
"body": { "text": "Aloe, {{1}}", "examples": ["KES 1,200"] },
"buttons": [ { "type": "QUICK_REPLY", "text": "More like this" },
{ "type": "URL", "text": "Buy", "url": "https://example.com/p/{{1}}", "example": "aloe-01" } ] },
{ "header": { "format": "IMAGE", "handle": "4::aW1h...ARb" },
"body": { "text": "Jade, {{1}}", "examples": ["KES 900"] },
"buttons": [ { "type": "QUICK_REPLY", "text": "More like this" },
{ "type": "URL", "text": "Buy", "url": "https://example.com/p/{{1}}", "example": "jade-02" } ] } ] } }
To send it, give every card its picture and values, in order:
"template": { "name": "new_plants", "language": "en",
"params": { "body": ["Amina"],
"cards": [ { "header": { "id": "1558081531584829" }, "body": ["KES 1,200"], "buttons": { "1": "aloe-01" } },
{ "header": { "link": "https://example.com/jade.jpg" }, "body": ["KES 900"], "buttons": { "1": "jade-02" } } ] } }
Limited-time offer templates
A limited-time offer is a marketing template with a headline of up to 16 characters and, if you choose, a countdown to when the offer ends. It has an optional image or video header, a message of up to 600 characters, no footer, and a link button with an optional coupon-code button before it (a code of at most 15 characters). It does not show on WhatsApp Web or desktop.
{ "project": "your_project_name", "name": "weekend_offer", "language": "en", "category": "marketing",
"header": { "format": "IMAGE", "handle": "4::aW1h...ARc" },
"limited_time_offer": { "text": "Expiring offer!", "has_expiration": true },
"body": { "text": "Hi {{1}}, use code {{2}} for 25% off this weekend.", "examples": ["Amina", "DUKA25"] },
"buttons": [ { "type": "COPY_CODE", "example": "DUKA25" },
{ "type": "URL", "text": "Shop now", "url": "https://example.com/s/{{1}}", "example": "wknd" } ] }
To send it, give the offer's end with offer.expires_at, and the code to copy as button 0:
"template": { "name": "weekend_offer", "language": "en",
"params": { "header": { "id": "2287001" }, "body": ["Amina", "DUKA25"],
"offer": { "expires_at": "2026-11-16T23:59:00+03:00" },
"buttons": { "0": "DUKA25", "1": "wknd" } } }
Receiving messages
Set Your webhook for this number on the Official WhatsApp page. Every message the number
receives is POSTed to it. It is the same envelope as the QR channel's, with the same fields in the same
order; only fromUserId and the reply object are this channel's alone:
{
"event": "message.received",
"channel": "meta",
"from": "254722000000",
"to": "254711000000",
"chatId": "254722000000",
"profileName": "Amina",
"message": { "id": "wamid.HBgL...", "type": "text", "text": "Is my order ready?", "fromMe": false },
"timestamp": "2026-09-27T09:06:40+00:00"
}
to is which of your numbers was written to. A customer who uses a WhatsApp username
may arrive with fromUserId (e.g. KE.1234…) — reply to from through this
API and it reaches them either way. Media arrives with a media object once Sozuri holds a copy of
the file (its url), and a reply carries message.replyTo. Requests are signed exactly
like every Sozuri callback — X-Sozuri-Signature, secret under
Manage API → Callback URLs → Webhook security.
Some message types add one object, and only those types carry it:
message.type | Object | What is in it |
|---|---|---|
location | location | latitude, longitude, and name, address when the pin has them. Same shape as the QR channel. |
contacts | contacts | A list of { "fullName", "phone" }. Same shape as the QR channel. |
interactive, button | reply | What the customer tapped: id is the id you gave the button or list row (or a template quick reply's payload), title what they saw. type is button_reply, list_reply, quick_reply, or flow for a Flow's answers (JSON text in response). |
reaction | reaction | messageId (your message they reacted to) and emoji; an empty emoji means they removed it. Automations never answer a reaction. Same shape as the QR channel. |
system | system | The customer changed their WhatsApp number: type is user_changed_number, newWaId the new number, body WhatsApp's sentence about it. The conversation moves to the new number, so replying to newWaId reaches them in the same thread. Messages already received keep the number they came from. |
| any type | referral | The customer started the chat from your ad or post (Click-to-WhatsApp): sourceType (ad or post), sourceId, sourceUrl, headline, body, mediaType, imageUrl or videoUrl, thumbnailUrl, and ctwaClid, the click id to send back to Meta's Conversions API. Each only when Meta sent it. |
unsupported, or any type | error | WhatsApp could not hand the message's content to Sozuri (a message type it does not support yet, for example): Meta's code, title and detail. Automations never answer it. |
message.type is request_welcome when someone opens a chat with your number for the
first time, before typing anything. It has no text. A workflow can greet them: start it with the
Chat opened trigger. The AI agent and keyword rules answer messages, not this.
message.text still carries words for each of them (the tapped title, the emoji, a described
location or contact), so a receiver that only reads text keeps working. Route on reply.id, not
the title: the title is whatever the customer's language and your template say.
Mark a message read, and show you are typing
POST https://sozuri.net/api/v1/whatsapp/messages/{id}/read, where {id} is
message.id from the webhook above. It marks the message read (blue ticks) and, with
"typing": true, shows the customer a typing indicator while you prepare your answer. The indicator
clears when you reply, or after 25 seconds, so send it only when you are about to answer. It works on both
channels.
curl -X POST https://sozuri.net/api/v1/whatsapp/messages/wamid.HBgL.../read \
-H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{ "project": "YOUR_PROJECT", "typing": true }'
{ "status": "read", "channel": "meta", "messageId": "wamid.HBgL...", "typing": true }
Only messages your project received can be marked: another project's id, or a message you sent, is
404 message_not_found. A number that is not connected is 409 channel_unavailable, and
502 not_accepted means WhatsApp refused it (a message can be marked read up to 30 days after it
arrived). This is separate from the read receipts setting on the WhatsApp page, which decides
whether Sozuri's own automations mark messages read. With it on, the AI agent shows the customer it is typing
while it prepares an answer.
Block someone
POST /api/v1/whatsapp/block with to blocks a person on your official number: they can
no longer write to it, and it cannot write to them. POST /api/v1/whatsapp/unblock lifts it, and
GET /api/v1/whatsapp/blocked lists who the number has blocked (pass the answer's after
back for the next page). Add from when you have several official numbers. A manager can do the same
from the conversation in Official WhatsApp → Conversations.
curl -X POST https://sozuri.net/api/v1/whatsapp/block \
-H "Authorization: Bearer $SOZURI_API_KEY" -H "Content-Type: application/json" \
-d '{ "project": "your_project_name", "to": "254700000000" }'
{ "status": "blocked", "to": "254700000000", "from": "254711000000" }
WhatsApp lets you block only someone who wrote to the number in the last 24 hours:
anyone else is 422 not_blockable. to is their number, or their WhatsApp user id when
they shared no number. A block is not your Do-Not-Disturb list: that list records people who
asked you to stop, and blocking or unblocking someone never changes it.
Delivery & read receipts
Receipts always update the dashboard and the inbox. To have them POSTed to a number's webhook as well, tick Also send delivery statuses under that number's webhook URL on the WhatsApp page. It is off by default and set per number, so a receiver written for messages never starts getting an event it did not ask for. The same setting sends the number's other events below: template reviews, errors, marketing opt-outs and changes to the number's status. Status webhooks are not switched on at Sozuri yet: the setting is saved and takes effect when they are. Each status will then arrive once, signed like your messages:
{
"event": "message.status",
"channel": "meta",
"messageId": "wamid.HBgL...",
"status": "delivered",
"to": "254722000000",
"from": "254711000000",
"timestamp": "2026-09-27T09:07:02+00:00",
"pricing": { "type": "regular", "category": "utility" }
}
timestamp is when WhatsApp says the status happened. A failed message also carries
reason, in words, and error: Meta's own code and title,
which you can look up in Meta's error reference.
{
"event": "message.status",
"channel": "meta",
"messageId": "wamid.HBgL...",
"status": "failed",
"to": "254722000000",
"from": "254711000000",
"reason": "undeliverable",
"timestamp": "2026-09-27T09:07:02+00:00",
"error": { "code": 131026, "title": "Message undeliverable" }
}
pricing appears when Meta reports how it classifies the message: its type
(regular, free_customer_service, free_entry_point…) and
category (marketing, utility, authentication,
service…), as Meta spells them. That is Meta's classification, not Sozuri's fee. Both blocks
appear only when they have something in them, so check for them rather than expecting them.
The same setting also sends template news: when Meta approves, rejects, pauses or flags one of your templates, changes its quality rating or re-categorises it. A template belongs to the account, so each number of it that ticked the box is told, once per webhook URL:
{
"event": "template.status",
"channel": "meta",
"wabaId": "1029384756",
"template": { "id": 812, "name": "order_ready", "language": "en_US", "category": "UTILITY", "status": "PAUSED", "quality": "RED" },
"update": { "type": "status", "event": "PAUSED", "detail": "Paused for 3 hours: low quality." },
"timestamp": "2026-11-10T09:00:00+00:00"
}
template is the template as it is now. update.type says what moved:
status (event is Meta's word: APPROVED, REJECTED,
PAUSED, FLAGGED…, with reason and detail when Meta gave them),
quality (from and to: GREEN, YELLOW,
RED) or category (from and to; pending: true
when Meta has only said it will re-categorise, which changes the price).
When WhatsApp reports an error for the number
WhatsApp sometimes reports an error about the number rather than one message. The same setting sends it to the number's webhook, once:
{
"event": "channel.error",
"channel": "meta",
"to": "254711000000",
"error": { "code": 131000, "title": "Something went wrong", "detail": "Unknown error. Try again." },
"timestamp": "2026-11-13T09:00:00+00:00"
}
error holds Meta's code, title and detail, each when given.
Look the code up in Meta's error reference.
When the number's status changes
When anything in a number's status changes (WhatsApp blocks or limits it, its quality or messaging limit moves,
its display name is decided, or it is disconnected) the same setting sends channel.status to the
number's webhook, once per change. status is the whole status now, with the same fields as
List your channels; changed names what moved and previous
what each was before. Sozuri notices a change when WhatsApp reports it, or at the hourly check at the latest.
{
"event": "channel.status",
"channel": "meta",
"to": "254711000000",
"phoneNumberId": "1098...",
"status": { "connected": true, "status": "connected", "canSend": "BLOCKED",
"reason": "There is no valid payment method on this account. Add a payment method in WhatsApp Manager.",
"quality": "GREEN", "nameStatus": "APPROVED", "verifiedName": "Duka Bora",
"messagingLimit": "TIER_1K", "throughput": "STANDARD", "accountStatus": "connected" },
"changed": ["canSend", "reason"],
"previous": { "canSend": "AVAILABLE", "reason": null },
"timestamp": "2026-11-14T06:00:00+00:00"
}
When someone stops your marketing messages
A customer can tell WhatsApp to stop marketing messages from one of your numbers, and turn
them back on later. While they are stopped, Sozuri refuses a marketing template to them from
that number with 422 marketing_opted_out, before anything is sent. Nothing else changes: utility
and authentication templates, replies inside the 24-hour window, your other numbers and SMS all still reach
them. The stop is listed on your Do-Not-Disturb screen (WhatsApp) as Stopped marketing messages in
WhatsApp, and it lifts when they turn marketing messages back on.
The same setting sends each stop and resume to the number's webhook:
{
"event": "user.preferences",
"channel": "meta",
"from": "254722000000",
"to": "254711000000",
"category": "marketing_messages",
"value": "stop",
"timestamp": "2026-11-11T09:00:00+00:00"
}
value is stop or resume, and timestamp is when they chose
it. Use the timestamp, not the order of arrival, to tell which is newer. A customer with a WhatsApp username
may come with fromUserId instead of from.
Your WhatsApp profile
What customers see when they open a chat with your official number: the business profile, the questions they can
tap to start a chat (ice breakers), the commands that appear when they type
/, and the display name. A project admin can change all of it under
Official WhatsApp → Number → Edit WhatsApp profile, or through the API below. Add
from to any of these when you have several official numbers.
GET /api/v1/whatsapp/profile reads it from WhatsApp:
{
"from": "254711000000",
"profile": { "about": "Fresh bread every morning", "description": "A family bakery.", "address": "Moi Avenue, Nairobi",
"email": "[email protected]", "websites": ["https://example.com"], "vertical": "GROCERY", "photoUrl": "https://…" },
"automation": { "iceBreakers": ["What are your opening hours?"], "commands": [{ "name": "menu", "description": "See today's menu" }], "welcome": null },
"displayName": { "name": "Example Bakery", "status": "APPROVED", "requested": null, "requestedAt": null, "decision": null,
"reason": null, "reasonText": null, "decidedAt": null, "applyBy": null, "canChange": true },
"testMode": false
}
POST /api/v1/whatsapp/profile changes only the fields you send: about (1–139 characters,
shown under the name), description (up to 512), address (256),
email, websites (at most 2, each starting https:// or http://),
vertical (one of ALCOHOL, APPAREL, AUTO, BEAUTY, EDU, ENTERTAIN, EVENT_PLAN, FINANCE, GOVT, GROCERY, HEALTH, HOTEL, NONPROFIT, ONLINE_GAMBLING, OTC_DRUGS, OTHER, PHYSICAL_GAMBLING, PROF_SERVICES, RESTAURANT, RETAIL, TRAVEL) and photo: the handle that
uploading a JPEG or PNG with for=template answers.
curl -X POST https://sozuri.net/api/v1/whatsapp/profile \
-H "Authorization: Bearer $SOZURI_API_KEY" -H "Content-Type: application/json" \
-d '{ "project": "your_project_name", "about": "Open 7am to 9pm", "websites": ["https://example.com"] }'
POST /api/v1/whatsapp/profile/conversation sets iceBreakers (up to
4 questions of 80 characters) and
commands (up to 30, each a one-word name of
32 characters without the slash and a description of
256). WhatsApp allows no emoji in either. A list you send replaces the one on
WhatsApp, and an empty list clears it. A tapped ice breaker or a typed command arrives as an ordinary text
message (Receiving messages). welcome: true asks WhatsApp to tell you when
someone opens a chat with you for the first time, which starts your Chat opened workflows.
curl -X POST https://sozuri.net/api/v1/whatsapp/profile/conversation \
-H "Authorization: Bearer $SOZURI_API_KEY" -H "Content-Type: application/json" \
-d '{ "project": "your_project_name", "iceBreakers": ["What are your opening hours?", "Do you deliver?"],
"commands": [{ "name": "menu", "description": "See the menu" }] }'
Each change answers { "from": "254711000000", "changed": ["about", "websites"] }. WhatsApp shows it within a few minutes.
Change the display name
A new display name is reviewed by Meta. POST /api/v1/whatsapp/profile/display-name with
name sends it for review (Meta allows ten changes in 30 days). The decision appears in
displayName above and on the Number tab: decision is SUBMITTED while
Meta reviews it, then Meta's APPROVED or REJECTED, with reason and
reasonText for a rejection.
An approved name shows once the number is registered again with its six-digit two-step verification PIN, within
14 days of the approval (applyBy): POST /api/v1/whatsapp/profile/display-name/apply with
pin, or Apply the new name on the Number tab. You can set a new PIN in WhatsApp
Manager without knowing the old one. Sozuri uses the PIN once and keeps it nowhere. A number that is also on the
WhatsApp Business app changes its name in the app instead (409 coexistence_number).
Analytics
GET /api/v1/whatsapp/analytics counts what your official numbers sent and received, and what Sozuri
charged for it, from the same records your balance is charged on. The Analytics tab under
Official WhatsApp shows the same figures.
| Parameter | Type | Description |
|---|---|---|
| from, to | Date | YYYY-MM-DD, East Africa Time, both days included. The default is the last 30 days; at most 92 at a time. |
| group | String | day (the default), template, category (Meta's pricing category) or number. |
| number | String | Optional: one of your official numbers (or its phone number id). |
{
"from": "2026-11-01", "to": "2026-11-14", "group": "day", "currency": "KES",
"totals": { "sent": 420, "delivered": 410, "read": 300, "failed": 6, "received": 95, "charged": 380, "fee": "760.00" },
"rows": [
{ "day": "2026-11-01", "sent": 30, "delivered": 29, "read": 20, "failed": 1, "received": 7, "charged": 28, "fee": "56.00" }
]
}
A message counts on the day it was sent. sent is every message WhatsApp accepted;
delivered includes read messages; failed is a message refused or not delivered;
received is messages your customers sent. charged and fee (a decimal
string, in KES) are Sozuri's own fee, taken when a billable message is delivered. Meta bills its charges to
your WhatsApp Business Account directly, so they are not here. With group=category, a message
whose category Meta has not reported yet has "category": null; with group=template,
messages that are not templates are one row with "template": null.
One-time codes (OTP)
An authentication template is what POST /api/v1/otp sends on WhatsApp.
That endpoint takes a code you generate and tries WhatsApp, SMS and a voice call in the order you choose, each
only when the one before did not get the code there. It ends with one otp.status webhook. The
OTP API page has every field, the timings, the statuses and the errors.
Rate limits
Each channel keeps its own per-project limit, and /v1/whatsapp/messages draws on the same
allowance as the channel-specific endpoint: a message routed to QR counts against the QR channel's (deliberately
small) limit, one routed to the official channel against the official one. Separately, Meta lets a number send
80 messages a second — 20 for a number shared with the WhatsApp Business app — and a burst beyond that is
answered 429 throughput_exceeded before it reaches Meta. Both are safe to retry.
Pricing
Meta bills its fee to your WhatsApp Business Account's payment method, per delivered message, by category: marketing, utility and authentication templates, and — from 1 October 2026 — service replies (each number has 1,000 free service messages a month) and utility templates sent inside the 24-hour window. Messages inside a free entry point window (a customer who reached you from a click-to-WhatsApp ad) are free for 72 hours. Sozuri's own per-message fee is taken from your project balance when Meta reports the message delivered, at the rate for the category Meta reports; nothing is charged for a message that was not delivered.
Each connected number may also carry a Sozuri monthly fee. When it does, the Number tab
shows it before you connect, along with the free trial that comes first. We email you when the trial
starts, halfway through it, and before it ends. It is taken from your project
balance (postpay accounts: added to the invoice). If a month cannot be taken, sending from that number
pauses — 402 channel_fee_unpaid — until it is paid: within the hour of a top-up, or straight
away with Pay now on the Number tab. Messages sent to the number are still received.
Marketing Messages API. Meta offers a second way to deliver marketing templates, which it says
reaches more people; Meta prices those messages as marketing_lite.
Once your business has accepted Meta's terms for it in WhatsApp Manager, Sozuri sends your marketing templates
that way automatically, with nothing to change in your requests. The Number tab says whether it is in use.
Utility and authentication templates, and every other message, go the usual way.
Error responses
Errors are { "error": { "code", "message", "status", "channel"? } }:
| Status | Code | What to do |
|---|---|---|
| 409 | not_connected, channel_unavailable | The channel you need is not connected on this project. |
| 422 | window_closed | Send an approved template; error.window says when the window closed. |
| 422 | recipient_opted_out | This person is on your Do-Not-Disturb list for WhatsApp messages from this number (the Ban Number screen, or they asked your AI agent to stop). Nothing was sent. They can still get a reply when they write to you, and an authentication template. A ban on SMS or voice calls does not stop WhatsApp. |
| 429 | spend_limit_reached | The message would go over one of your project's spending limits (WhatsApp messages a day, counting both channels, daily spend, or the monthly budget), set under Billing → Spending limits. Nothing was sent. The message says which limit, how much is used and when it resets: daily limits at midnight East Africa Time, the monthly budget on the 1st. |
| 422 | invalid_message | The message itself needs changes: an unknown type, a recipient that is not a WhatsApp address, or a field over its limit (a button title, a carousel card…). errors names each field. Nothing was sent. |
| 422 | marketing_opted_out | A marketing template to someone who stopped marketing messages from this number in WhatsApp (above). Nothing was sent. Utility and authentication templates still reach them. |
| 422 | template_not_found, template_not_approved, template_parameters | Check the template's name, language and values. |
| 422 | template_unsupported | The template has a part Sozuri cannot fill from params yet (the message names it). Send it with Meta's own components instead. Nothing was sent. |
| 422 | invalid_profile, invalid_automation, invalid_name, same_name | A profile change WhatsApp would refuse; errors names each field. Nothing was changed. |
| 409 | coexistence_number, name_not_approved, name_approval_expired | The display name cannot be changed or applied this way: the number is on the WhatsApp Business app, there is no approved name waiting, or the 14 days have passed. |
| 422 | invalid_pin | The two-step verification PIN is six digits. |
| 422 | invalid_range, invalid_group | Analytics: check the dates (at most 92 days) and the grouping. |
| 502 | not_accepted | WhatsApp did not accept a profile, upload or block request; the message carries WhatsApp's reason. |
| 404 | template_not_found | Editing or deleting: this project has no template with that id (or it was deleted). |
| 409 | template_not_editable | Only an approved, rejected or paused template can be edited. |
| 422 | invalid_template | The template (or the edit) needs changes; errors names each field. |
| 422 | unsupported_on_qr, unsupported_on_meta | That kind of message exists on the other channel only. |
| 422 | address_not_on_channel | The channel or from you named cannot reach that address: a …@s.whatsapp.net, @lid or @g.us address exists only on the QR channel, a user id (KE.…) only on the official one. Leave both out and the address decides. |
| 422 | from_required | The project has several official numbers: say which in from. |
| 402 | insufficient_balance | Top up the project. |
| 402 | channel_fee_unpaid | The number's monthly fee could not be taken, so it is paused. Top up, or press Pay now on the WhatsApp page. Nothing was sent. |
| 429 | rate_limited, throughput_exceeded | Slow down and retry. |
| 503 | channel_off, channel_reconnecting | Temporary — retry shortly. |
| 500 | send_error | Something went wrong on our side and nothing was sent. Retry; if it persists, contact support. |