Skip to main content
POST
Send One-Time Code

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

Idempotency-Key
string

Any unique string. A retry with the same key within 24 hours returns the first request's answer instead of acting twice.

Maximum string length: 255
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
to
string
required

The number to send the code to. Include the + and the country code (a leading 00 works too). Without a +, a number of ten digits or fewer — or one starting with 0 — is read as an Indian number and 91 is added.

Example:

"+91 98123 45678"

code
string
required

The code you generated, 16 characters at most after trimming.

Required string length: 1 - 16
Example:

"394812"

template
string

Which approved authentication template, by name. Needed only when you have more than one.

Example:

"login_code"

language
string

Which approved language version, exactly as approved — en, hi. Needed only when one template name is approved in several languages.

Example:

"en"

idempotencyKey
string

Same as the Idempotency-Key header, for clients that cannot set headers. The header wins when both are sent.

Response

WhatsApp accepted the code. A replay of an Idempotency-Key returns the first answer, whatever it was, with an Idempotent-Replayed: true header.

sent
boolean
required

WhatsApp accepted the code.

to
string
required

The number it went to, digits only with the country code.

template
string
required

The template it was sent with.

language
string
required

The language version it was sent in.

messageRef
string | null
required

WhatsApp's receipt for the message.