Whatsapp template

Description

Summary: Sends a WhatsApp template message to one or more recipients via the TextPeak Streams API.
Details: This endpoint triggers the delivery of a pre-approved WhatsApp template message to a list of recipients. Template messages are structured messages registered with WhatsApp (e.g., welcome messages, appointment reminders, OTP notifications) and are identified by an event name. Each recipient can receive a personalized version of the template through dynamic template_variables that populate placeholders in the template's header, body, and footer sections. The sender field specifies the originating WhatsApp Business number. Authentication is performed via a stream token passed in the Authorization header.

Authentication & Scopes

Authentication is handled via a stream token provided in the Authorization header. No OAuth scopes are defined; access is granted or denied based on the validity of the token.

MethodDetails
Stream TokenPass your token directly in the Authorization header value (not as a Bearer token).

Headers

HeaderRequiredDescription
AuthorizationYesThe stream token that verifies your access to the API.
Content-TypeYesMust be set to application/json. The API only accepts JSON-formatted request bodies.

Parameters

This endpoint does not use path or query parameters.

Request Body

The request body is a JSON object specifying the sender, the template event, and the list of recipients with their personalized variables.

FieldTypeRequiredDescription
senderstringYesThe WhatsApp Business phone number used to send the template message, in international format (e.g., "447404751731").
eventstringYesThe registered template event name that identifies which pre-approved WhatsApp template to use (e.g., "dialer_first_call_welcome").
recipientsarrayYesAn array of recipient objects. Each object defines a target recipient and the template variables to personalize the message for them.

Recipient Object

FieldTypeRequiredDescription
internal_idstringNoAn optional internal identifier for the recipient, used for tracking or correlation on your side.
recipient_phonestringYesThe recipient's phone number in international format (e.g., "972507445456").
template_variablesobjectNoAn object containing key-value pairs that populate dynamic placeholders in the template. Organized by template section.

Template Variables Object

SectionTypeDescription
HEADERobjectKey-value pairs for dynamic placeholders in the template header section (e.g., {"1": "John"}).
BODYobjectKey-value pairs for dynamic placeholders in the template body section (e.g., {"1": "Order #1234", "2": "March 23"}).
FOOTERobjectKey-value pairs for dynamic placeholders in the template footer section.

Examples

This endpoint currently has no saved examples.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string
recipients
array of objects
recipients
string
Response
200
Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here!