Skip to main content
POST

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.

Example:

"org_3fKq9TzQ1mN8vB2xR7cLpA"

Body

application/json
name
string
required

Lowercase letters, numbers and underscores only. Unique per language in your workspace.

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

"order_ready"

category
enum<string>
required

utility for something the customer is expecting (an order or appointment update), marketing for promotions, authentication for one-time codes.

Available options:
utility,
marketing,
authentication
language
string
default:en

A language WhatsApp templates support, such as en, en_US or hi.

Example:

"en"

body
string

The message, with blanks numbered {{1}}, {{2}} … in order. A blank cannot be at the very start or end, two cannot sit next to each other, and there must be enough words around them. Required unless category is authentication, where WhatsApp writes the body.

Maximum string length: 1024
Example:

"Hello {{1}}, your Kesar Naturals order {{2}} is packed and on its way."

samples
string[]

One example value per body blank, in order. WhatsApp's reviewers read the template with these filled in, so every blank needs one.

Maximum array length: 20
Example:
header
object | null

The line or media above the body. null means no header.

One line of small print, with no blanks. A marketing template needs a way to opt out — "Reply STOP to opt out" here, or a quick-reply button.

Maximum string length: 60
Example:

"Reply STOP to opt out"

buttons
object[] | null

The template's buttons, in order.

Maximum array length: 10
auth
object

An authentication template's settings. WhatsApp writes the message itself ("123456 is your verification code."), so these are all you choose.

agent
string | null

The agent the template belongs to (ag_…). Leave it out for the agent on your connected WhatsApp number (or your oldest agent).

Example:

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

submit
boolean
default:false

true also sends it to WhatsApp for review, as Submit Template does. If that is refused, the draft is kept and message says why.

Response

Saved. The template as Get Template shows it, plus message: saved as a draft, sent for review, or saved as a draft with the reason the submission was refused.

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
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."