Skip to main content
POST
Send a template message

Autorizaciones

X-API-Key
string
header
requerido

Merchant API key for authentication

Cuerpo

application/json

Public request body for a template send.

Only event_id is shape-checked here. Everything else is validated by the service in the order the contract declares, so a replay of an already-seen event_id short-circuits before any other field is judged.

event_id
string
requerido

Your identifier for the event. Idempotency key and lookup key for the status endpoint; must be stable across retries. The charset is bounded because this value travels in the status URL

Pattern: ^[A-Za-z0-9._-]{8,128}$
Ejemplo:

"CART-8F3A21"

phone
string
requerido

Destination phone in strict E.164 (+ country code, 8-15 digits). A number outside the format is rejected with 422 — the country code is never inferred

Ejemplo:

"+51987654321"

template
TemplateRef · object
requerido

Approved template to send, by name and language

variables
Variables · object

Template variable values, keyed exactly as required_variables lists them in GET /v1/templates: by position on a positional template ("1" fills {{1}}), by name on a template authored with named placeholders ("name" fills {{name}}). A missing or unknown key is a 422

Ejemplos:
occurred_at
string<date-time> | null

ISO 8601 UTC timestamp of the originating event. An event older than the freshness window is discarded instead of sent

Ejemplo:

"2026-08-11T13:22:05Z"

metadata
TemplateMessageMetadata · object | null

Optional attribution metadata

Respuesta

No new send was produced: the event_id had already been received and the stored state is returned, or the event settled without being sent

event_id
string
requerido

The event_id sent in the request

status
enum<string>
requerido

Current status of the send. A send that was taken answers accepted; poll the status endpoint for what became of it. sent, delivered, read and failed come from delivery receipts, and discarded means it was never sent

Opciones disponibles:
accepted,
in_progress,
sent,
delivered,
read,
failed,
discarded
status_detail
string | null

Reason behind a failed or discarded status, or the delivery_not_observable note on an accepted one. Not a closed set, and may be absent. stale, paused, account_not_eligible, no_sender_number, send_failed, send_cancelled and delivery_not_observable are ours and stable — the last one means the send went to a store this deployment cannot read, so the status will not settle here; when the provider refused the delivery it carries provider_error_<code> with the provider's own numeric code (for example provider_error_131049), and that catalogue changes without notice. Branch on status, log this, and treat an unrecognised or missing value as a generic failure

Ejemplo:

"stale"