Skip to main content
POST
Create template

Authorizations

Authorization
string
header
required

Organization API key, sent as Authorization: Bearer boom_org_....

Body

application/json
name
string
required

Template name, unique per WhatsApp account (shared by all its numbers).

Required string length: 1 - 255
language
string
required

WhatsApp language code, e.g. es, en. A regional variant like es_MX or en_US is normalized to its base code.

Required string length: 2 - 10
category
enum<string>
required
Available options:
UTILITY,
MARKETING,
AUTHENTICATION
contentType
enum<string>
required
Available options:
TEXT,
MEDIA,
QUICK_REPLY,
CALL_TO_ACTION,
CARD
content
object
required

Message content. Shape depends on contentType: TEXT { body }; MEDIA { body?, media: [url] }; QUICK_REPLY { body, actions: [{ title, id }] }; CALL_TO_ACTION { body, actions: [{ type: URL|PHONE_NUMBER, title, url|phone }] }; CARD { headerType, headerText|mediaUrl, body, footer?, actions? }. Use {{1}}, {{2}}… for variables. Example (TEXT): { "body": "Hola {{1}}, tu pedido está en camino" }. Example (CALL_TO_ACTION, adds a button): { "body": "Hola {{1}}, tu pedido está en camino", "actions": [{ "type": "URL", "title": "Ver pedido", "url": "https://example.com/orders/{{2}}" }] }. Example (QUICK_REPLY, adds reply buttons): { "body": "¿Te gustó tu compra?", "actions": [{ "title": "Sí", "id": "yes" }, { "title": "No", "id": "no" }] }. Example (CARD, header + optional footer/button): { "headerType": "text", "headerText": "Pedido en camino", "body": "Hola {{1}}, tu pedido ya salió.", "footer": "Gracias por tu compra", "actions": [{ "type": "URL", "title": "Ver pedido", "url": "https://example.com/orders/{{2}}" }] }.

variables
object

Example values for placeholders, e.g. { "1": "Ana" } for {{1}}. Required for every placeholder used.

whatsappAccountId
string

WABA ID of the WhatsApp account to create the template on (whatsappAccount.id from whatsapp_numbers_list), or the account's alias, matched case-insensitively (whatsappAccount.alias, e.g. "Soporte"). The template belongs to that account: every number on it can send it, and numbers on other accounts can't. Works for an account with no active numbers yet. Omit when the organization has a single WhatsApp account; with several, pass this or phoneNumbers.

Minimum string length: 1
phoneNumbers
string[]

Alternative to whatsappAccountId: any WhatsApp number (E.164) on the account to create the template on. One number per account is enough. Numbers on several accounts create one template per account. Omit when the organization has a single WhatsApp account.

Minimum array length: 1
Minimum string length: 1

Response

Success

data
object[]
required

The created template(s) — one per WhatsApp account backing the chosen numbers.