Skip to main content
POST
Send a template

Authorizations

Authorization
string
header
required

An org API key: Authorization: Bearer oak_….

Headers

Idempotency-Key
string | null

Path Parameters

template_id
string
required

Body

application/json

Send an APPROVED template to one recipient or a list of them.

recipients accepts a single object or an array with identical semantics — sending to one person should not require wrapping it — and the response is a PublicBroadcast either way.

recipients
PublicSendRecipient · object
required

One person to send to, plus what this template needs filled for them.

Exactly one of contact_id / phone. A phone that matches no contact creates one (see the endpoint docstring) — the honest consequence of addressing a CRM-backed product by phone number.

variables is keyed by the authored token"1" for a positional template, "discount_code" or "contact.first_name" for a named one. Positional-vs-named is a property of the template and mixing the two is fatal at Meta, so this is deliberately not an ordered array. GET /v1/templates/{id}/send-requirements lists the exact keys.

channel_id
string | null

Response

Successful Response

A queued template send. Counts are derived from the messages it produced, so they move as the worker fans the batch out; they always sum to requested.

id
string
required
template_id
string
required
template_name
string
required
template_language
string
required
channel_id
string
required
status
enum<string>
required

Derived campaign status shown in the UI. stopped_low_balance and cancelled mirror the stored state; the other two are computed from the counts (no stored value — chunked async means no single worker knows it sent the last recipient).

Available options:
in_progress,
completed,
stopped_low_balance,
cancelled
requested
integer
required
sent
integer
required
failed
integer
required
pending
integer
required
origin
string
required
created_at
string<date-time>
required