curl --request POST \
--url https://{projectID}.texterchat.com/server/api/v2/whatsapp/templates/send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"templateName": "inbox_marketing_98",
"to": "972521234567"
}
'{
"success": true,
"text": "Hi John.\nThis is an example of a template body with 2 variables.",
"sentAsSessionMessage": false,
"messageId": "690883c5962e17ab3033f92f"
}Send Template Message
Send an existing, approved template message to a recipient. You can provide dynamic variables, header media, and metadata about the recipient, and you can override predefined behaviors such as the action performed after the recipient replies.
curl --request POST \
--url https://{projectID}.texterchat.com/server/api/v2/whatsapp/templates/send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"templateName": "inbox_marketing_98",
"to": "972521234567"
}
'{
"success": true,
"text": "Hi John.\nThis is an example of a template body with 2 variables.",
"sentAsSessionMessage": false,
"messageId": "690883c5962e17ab3033f92f"
}Send template messages
Phone number formats: to is flexible - 0521234567, 972521234567, +972 52-123-4567 etc. are all accepted and normalized.
Unsubscribed recipients / skipped sends: if the recipient unsubscribed from template messages - or the chat matches skipChatConditions.statuses - the message is not sent and the API responds with HTTP 200, success: false and an explanatory error (e.g. "Recipient unsubscribed from template messages on ...").
Path variants: the same operation is also available as POST /whatsapp/templates/{templateName}/send (template name in the path; unknown template returns 404 instead of 400), and both forms accept the recipient progressively in the path - /send/{accountId}, /send/{accountId}/{to}, or /send/{chatId} with a 24-character chat ID.
All status values, type enums and the ID cheat sheet: Enums & Common Fields.Authorizations
API token generated in Texter: gear icon → Developers → API Tokens. When creating a token, assign it the scopes required by the endpoints you plan to call - each endpoint lists its required scopes.
Body
The template's unique name (ID) to send
^[a-zA-Z0-9_-]+$Recipient's phone number
The sender's WhatsApp account number. If not provided while multiple channels exist, the template is sent from the default channel
Template localization code to send (e.g. en, he). Auto-selected when the template has a single localization. With multiple localizations and no language, your project's default language is tried (he for Israeli projects, otherwise en); 400 only if that localization does not exist
Values for template body variables ({{1}}, {{2}}, ...) in order. Required if the template includes variables. Values must not contain line breaks, tabs, or 5+ consecutive spaces
Header content to use when sending (overrides the template default). Media headers: type + url, plus filename for documents. Text headers with a {{1}} variable: {"type": "text", "text": ["value"]} (max one parameter)
Show child attributes
Show child attributes
Data to update on the chat when sending
Show child attributes
Show child attributes
Button payload values. Required if the template includes a variable in a URL button (inject the variable value) or was made with a Flow form. Non-English values for URL payloads should be URL-encoded
Show child attributes
Show child attributes
Defines behavior after the recipient replies (overrides the template defaults). When chatStatus is BOT, the replyText, responsibleAgent and responsibleDepartment fields are ignored; when chatStatus is ASSIGNED, either responsibleAgent or responsibleDepartment is required (400 otherwise)
Show child attributes
Show child attributes
Attempt to send as a regular session message instead of a template when the 24-hour window is open (no template fee)
Show child attributes
Show child attributes
Groups individual API calls into a single entry in the Bulk Reports dashboard. Use a consistent title across multiple requests to aggregate their statistics under one report
1 - 255Replace the actual template parameters in the database with these values (useful for sensitive data like OTP codes). Requires body, must have the same number of items as body, and cannot be combined with sessionMessage (each violation returns 400)
If true, extra parameters in body are ignored instead of failing the request
Replace missing parameters with a single whitespace instead of failing
Whether to skip the HEAD-request accessibility check of header.url. Defaults to true - the check only runs when you explicitly send false (and the header differs from the template's stored default)
Skip sending entirely when the chat is currently in one of the given statuses
Show child attributes
Show child attributes
Skip applying the reply action when the chat is currently in one of the given statuses
Show child attributes
Show child attributes
Response
The result of the send operation. Note: an unsubscribed recipient also returns HTTP 200 but with success: false
Whether the template message was successfully sent
The final rendered message text after inserting all variable values
Whether the message was sent as a session message instead of a template message
Unique identifier of the message created in Texter
Error description, present when success is false