Skip to main content
PATCH
Update Code 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.

Example:

"org_3fKq9TzQ1mN8vB2xR7cLpA"

Path Parameters

id
string<uuid>
required

The template's id — a bare uuid, as the list gives it.

Body

application/json

Any subset of the create fields. Fields left out keep their values.

name
string

Lowercase letters, digits and underscores.

Maximum string length: 512
Pattern: ^[a-z0-9_]{1,512}$
language
enum<string>

A WhatsApp template language code.

Available options:
en,
hi,
mr,
bn,
ta,
te,
kn,
ml,
gu,
pa,
ur,
ar,
es,
pt_BR,
fr,
de,
it,
nl,
ru,
tr,
id,
ms,
th,
vi,
fil,
ja,
ko,
zh_CN,
zh_TW,
he,
sw,
en_GB,
en_US
expiryMinutes
integer

How long the code lasts.

Required range: 1 <= x <= 90
securityRecommendation
boolean

Adds "For your security, do not share this code."

button
enum<string>

How the code gets into your app.

Available options:
copy_code,
one_tap
apps
object[]

The Android apps a one_tap code is handed to. Replaces the list.

Response

The draft as saved.

id
string<uuid>
required

The template's id (a bare uuid).

name
string
required

The template's name — what template on Send One-Time Code takes.

language
string
required

Its language code.

status
enum<string>
required

draft: yours to change. pending: with WhatsApp for review. approved: sends. rejected: see reviewNote. paused: WhatsApp paused it.

Available options:
draft,
pending,
approved,
rejected,
paused
reviewNote
string | null
required

WhatsApp's reason, when it gave one.

settings
object | null
required

The three choices. Null only for a template saved before these settings existed.

preview
object | null
required

What the customer reads, in WhatsApp's words, with a sample code.

agent
string
required

The agent the template belongs to (ag_…).

createdAt
string<date-time>
required

When it was created.