Skip to main content
POST
https://api-ai.zixflow.com
/
api
/
ingest
/
whatsapp
/
v1
/
template
/
send
Send WhatsApp Template
curl --request POST \
  --url https://api-ai.zixflow.com/api/ingest/whatsapp/v1/template/send \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <x-api-key>' \
  --header 'x-workspace-id: <x-workspace-id>' \
  --data '
{
  "recipient": "<string>",
  "phone_id": "<string>",
  "template_name": "<string>",
  "variables": {},
  "language": "<string>",
  "post_back_url": "<string>",
  "post_back_data": "<string>"
}
'
{
  "success": true,
  "message": "WhatsApp request queued successfully",
  "request_id": "f8df74d1-11fa-4485-b164-b9a65358f4fc"
}

Description

This endpoint allows you to send a WhatsApp message using a predefined template. Templates must be approved by WhatsApp and can include variables that are replaced with actual values when the message is sent.

Headers

x-api-key
string
required
Your API key for authentication.
x-workspace-id
string
required
Your workspace ID for authentication.

Body

recipient
string
required
The recipient’s phone number in international format. Must include the country code without the leading plus sign (+) or any spaces, dashes, or other special characters. Format: country code followed by the phone number. Example: 919876543210 (India: country code 91 + number 9876543210).
phone_id
string
required
The unique Phone ID associated with your WhatsApp Business account. You can find this on the Zixflow WhatsApp Settings page or by calling the Get WhatsApp Accounts endpoint.
template_name
string
required
The name of the WhatsApp template to use.
variables
object
Key-value pairs for template variables. Keys should match the variable names in the template, and values will replace the placeholders.
language
string
The language code for the template (e.g., “en”, “en_US”).
post_back_url
string
(Optional) To receive post-back notifications about the sent message as it is delivered or failed. When a message status changes (delivered, failed, etc.), a notification will be sent to this URL. See Postback Notifications for the payload format and field descriptions.
post_back_data
string
(Optional) The data that will be sent back on the post_back_url with the notification. This can be used as an identifier for the sent message if the client wants to track or correlate messages with their own system. See Postback Notifications for how it appears in the notification.

Response

success
boolean
Indicates whether the request was successful. true if the request was accepted and queued, false otherwise.
message
string
Success message when the request succeeded, or error message when it failed.
request_id
string
Present only when success is true. Unique identifier for this request; use it for tracking and for correlating with postback notifications.
{
  "success": true,
  "message": "WhatsApp request queued successfully",
  "request_id": "f8df74d1-11fa-4485-b164-b9a65358f4fc"
}