Send approved templates, receive your customers' messages, and answer them in your inbox.
What you can do
- Send an approved template to any WhatsApp user, from Ghala's number, with nothing to connect.
- Receive the messages customers send your own number, in your inbox and as
message.receivedevents. - Answer them in the same thread, within WhatsApp's 24 hour window.
- Read your numbers, their templates and their bot settings.
WhatsApp allows free text only within 24 hours of the customer last writing to you. Anything else, an alert or a code, goes as a template WhatsApp has approved.
Before you start
- To send a template, nothing. A send with your key goes from Ghala's platform number, with a template Ghala offers.
- To receive and answer, connect your own number. An owner or admin does it in the dashboard with WhatsApp's signup.
Send
A send names a template from your list. Each has a display_name to show and a name to send:
curl https://v3.ghala.io/v1/messages/templates \
-H "Authorization: Bearer $GHALA_KEY"Then send it, with your name where this example has order_shipped:
curl https://v3.ghala.io/v1/messages \
-H "Authorization: Bearer $GHALA_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-1042-shipped" \
-d '{"channel": "whatsapp", "to": ["0700000004"], "type": "template", "template": {"name": "order_shipped", "params": ["1042"]}}'/v1/messagesSend messagemessages:send
template.namemust be on your list; any other is400 invalid_valueoncontent.template.name.template.paramsfill the template's placeholders in the order it declares them.- There is no
from: the platform's number sends it.template.languageis ignored; the language is the template's own. - A WhatsApp message has no parts. It is charged as one message at your workspace's WhatsApp rate.
A template for Ghala's number is written in Ghala and approved by WhatsApp, and Ghala adds it to your list. To send a message no template covers, ask us.
Receive
A message a customer sends your number lands in your inbox, and your webhook endpoints receive message.received:
{
"event": "message.received",
"occurred_at": "2026-08-06T09:14:22.104Z",
"data": { "id": "...", "status": "received", "channel": "whatsapp", "from": "255700000009", "to": "255711000000", "body": "Habari", "test": false }
}from is the customer, to is your number. A file the customer sends is kept and served at a signed link the message holds. Answer in the same thread with Inbox and replies.
Statuses
WhatsApp reports read, so a message goes sent, delivered, then read. See Message statuses.
Test mode
A test key's template send is checked like a live one, then goes to the sandbox: free, and nothing reaches a phone. 255700000004 is delivered and then read. Your numbers are live data, so a test key cannot read them. See Test mode.
When it fails
| Status | code | When |
|---|---|---|
400 | invalid_value | a template name that is not on your list |
400 | not_configured | WhatsApp sends are not turned on for your workspace |
403 | forbidden | a test key reading your numbers |
403 | number_suspended | Ghala suspended the number; contact support |
409 | outside_messaging_window | free text to a customer who last wrote more than 24 hours ago; send a template |
All endpoints
/v1/channels/whatsapp/numbersGETGet WhatsApp number/v1/channels/whatsapp/numbers/{number}GETList WhatsApp templates/v1/channels/whatsapp/numbers/{number}/templatesGETGet WhatsApp template/v1/channels/whatsapp/numbers/{number}/templates/{template}GETGet WhatsApp bot/v1/channels/whatsapp/numbers/{number}/bot