Send an approved WhatsApp marketing template to one or more recipients through Meta's Marketing Messages API. The request and the response have the same shape as Send WhatsApp text template: identify the template with event and supply its variables per recipient by section (header, body, buttons).
Requirements. The sender must be a WhatsApp Business number with marketing enabled in TextPeak. The template must be a saved template: an inline message_template is refused. For a template with an image header, use Send WhatsApp marketing template with media.
Errors. HTTP 403 with 0x35 (marketing_not_enabled) rejects the whole request when no sender of the channel has marketing enabled. Otherwise each recipient is checked on its own, and a failed one comes back as an entry in the HTTP 200 response: 0x35 when its sender does not have marketing enabled, or a validation error when its sender is not a WhatsApp Business number, it carries media, or it uses an inline message_template.
Template variables. template_variables has up to three sections. Send only the ones your template has placeholders in:
header: values for a text header,{ "1": "4821" }.body: values for the body text,{ "1": "John", "2": "4821" }. A named placeholder such as{{first_name}}is keyed by its name:{ "first_name": "John" }.buttons: a list with one item per button, in the template's button order:[ { "1": "track-1001" } ].
Response. HTTP 200 with a task_id and one entry per message. status is false when any message failed: failed entries come first and carry error (hex code) and details; accepted entries carry message_uuid (and conversation_uuid on two-way channels). Match entries by internal_id. Final delivery status is sent asynchronously to your configured webhook.
Authentication: channel token in the Authorization header (see Authentication in the API Overview).
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||