Skip to main content
Send an approved WhatsApp template to a phone number. Template messages are the only way to initiate a WhatsApp conversation outside the 24-hour session window.

Endpoint

Required ability: messages.send.

Headers

Use multipart/form-data if you upload a header image, video, or document directly (header_image_file, header_video_file, header_document_file).

Path parameters

string
required
Your workspace subdomain.

Body parameters

string
required
Recipient phone number. 8–15 characters.
string
required
Name of the template (as registered with Meta).
string
required
Template language code. 2–10 characters (e.g. en_US).
string
Meta phone-number id to send from. Defaults to the workspace’s primary number.

Header media (pick one pair)

string
URL of a hosted image. Used when the template header type is IMAGE.
file
Upload an image. Max 5120 KB.
string
URL of a hosted video.
file
Upload a video. Max 16384 KB.
string
URL of a hosted document.
file
Upload a document. Max 102400 KB.
string
Display filename for the header document. Max 255 characters.

Variable substitution

string
Value for {{1}} in a text header.
string
Value for {{1}} in the body.
string
Value for {{2}} in the body.
string
Value for {{3}} in the body.
string
Value for {{4}} in the body.
string
Value for {{5}} in the body.
string
Value for {{6}} in the body.
string
Value for {{7}} in the body.
string
Value for {{8}} in the body.
string
Value for {{9}} in the body.
string
Value for {{10}} in the body.
string
Button 0 dynamic parameter.
string
Button 1 dynamic parameter.
string
Button 2 dynamic parameter.
string
One-time password for OTP templates. Max 100 characters.
object
Optional contact payload for creating or updating the contact record behind this send.

Example request

Example response

200 OK

Error responses

Xobito enforces Meta’s approval rule strictly: only templates with status: "APPROVED" can be sent. Use GET /templates to check status before sending.