Skip to content

Templates

A template is a message Meta has reviewed and approved in advance. It is the only thing you can send to someone who hasn’t messaged you recently, which makes it the starting point of every WhatsApp integration.

GEThttps://api.9bits.net/whatsapp/ng/v1/whatsapp/templates

Terminal window
curl https://api.9bits.net/whatsapp/ng/v1/whatsapp/templates \
-H "Authorization: Bearer $NINEBITS_WA_KEY"
[
{
"name": "order_shipped",
"language": "en",
"category": "UTILITY",
"status": "APPROVED",
"header_type": "none",
"body_text": "Hi {{1}}, your order {{2}} has shipped.",
"variables_count": 2,
"variable_names": [
{ "name": "Customer name", "example": "Jane" },
{ "name": "Order number", "example": "AB123" }
]
}
]

A template is addressed by name and language

Section titled “A template is addressed by name and language”

There is no template id to pass. A send names template_name + language, and both must match exactly.

statusWhat it means
APPROVEDSendable.
PENDINGSubmitted, awaiting Meta. Minutes for utility and authentication; longer for marketing, sometimes indefinitely.
REJECTEDMeta refused it. Fix the copy and submit a new one — a rejection is final for that version.

Meta approves a template for one of your WhatsApp numbers, not for your account as a whole. If you have more than one number, the same template can be approved for one and pending for another, and a number can only send what was approved for it.

That is why a send can be refused with a template you can plainly see is APPROVED — it is approved, just not for the number the message went out from. Pass wa_account_id explicitly and the ambiguity disappears:

{
"to": "2348020000000",
"wa_account_id": 6,
"message_type": "template",
"template_name": "order_shipped",
"language": "en",
"params": ["Jane", "AB123"]
}

wa_account_id is the id from List senders.

params fills the template’s {{1}}, {{2}} … placeholders in array order, and the count must equal variables_count. Send a different number and the message is refused before you are billed.

CategoryTypical use
UTILITYOrder updates, receipts, appointment reminders.
AUTHENTICATIONOne-time codes. Meta writes the copy; you supply the code.
MARKETINGPromotions, offers, anything selling. The expensive one.

The category is fixed by the template, so you commit to the price when you pick which template to send — not at send time. See Broadcasts to price a send before committing to it.

Templates are authored in the dashboard, not through this API. What matters for your integration is the timing: