Skip to main content
POST
Submit Template

Authorizations

Authorization
string
header
required

Your API key (ta_live_…) from Settings → API keys, sent as Authorization: Bearer <key>. Keep it on a server: it can message every customer you have. A key is full, build or read-only; a request its level does not allow is refused with 403.

Headers

Thinnest-Workspace
string

Developers only: the customer workspace this request acts in — its org_… id from POST /customers. Leave it out to act in your own workspace. Refused with 404 (Workspace not found.) when the id is unknown, is not one of your customers, or is not an org_… id; 410 when that customer was deleted (restore it with POST /customers/{id}/restore until it is erased); 403 when the key belongs to one customer workspace (it cannot act as another); 400 when your workspace is not a developer workspace. /customers/* and GET /customers/usage are your own workspace's and refuse the header with 400: call them without it.

Example:

"org_3fKq9TzQ1mN8vB2xR7cLpA"

Path Parameters

name
string
required

The template's name: lowercase letters, numbers and underscores.

Pattern: ^[a-z0-9_]{1,512}$

Query Parameters

language
string

The template's language code. Needed only when the name exists in more than one language; without it such a name is a 409 that lists them.

Response

Sent for review. The template as it now is (status: "pending"), plus message.

The template, plus a sentence about what just happened.

name
string
required

The template's name — what Send Message and Create Campaign take.

Example:

"order_ready"

language
string
required

Its language code.

Example:

"en"

category
enum<string>
required

WhatsApp's category, which decides its price and its rules.

Available options:
utility,
marketing,
authentication
status
enum<string>
required

draft until submitted, pending while WhatsApp reviews it, then approved or rejected. WhatsApp may later pause an approved template that recipients flag. Only approved can be sent.

Available options:
draft,
pending,
approved,
rejected,
paused
agent
string
required

The agent the template belongs to (ag_…).

Example:

"ag_5c4a5f93-2b1e-4c0a-9d3f-7e8a1b2c3d4e"

body
string
required

The message, with {{1}}, {{2}} … for the blanks. For an authentication template, the sentence WhatsApp writes around the code.

variableCount
integer
required

How many body values a send must carry, in order: the highest {{n}} in the body.

Required range: x >= 0
variableLabels
object[]
required

The example given for each body blank.

buttonVariableCount
integer
required

How many button values a send must carry: one per link button whose address ends in a blank.

Required range: x >= 0
headerKind
enum<string>
required

The header. image, video or document means a send must pass a media link for it.

Available options:
none,
text,
image,
video,
document
agentMaySend
boolean
required

Whether an agent may send this template during a call or chat (its send_whatsapp tool). Only a Utility template with no blank in a link button can be. Every language of a name agrees. Change it with Update Template, sending agentMaySend alone.

createdAt
string<date-time>
required

When it was created.

headerText
string | null
required

A text header's words. null for any other header.

The footer line. Empty when there is none.

buttons
object[]
required

The template's buttons, in order.

reviewNote
string | null
required

Why WhatsApp refused it, when it did. null otherwise.

message
string
required

What happened: saved as a draft, sent for review, or — with submit: true — saved as a draft with the reason the submission was refused.

Example:

"Saved as a draft."