Skip to main content
POST
Send Template Message
Sends an approved WhatsApp template to a phone number — the way to message someone outside the 24-hour session window, where Send Text Message won’t work.
You can’t send a template message from this page. Every template needs different fields — one might just need a name and phone number, another needs a checkout link, a price, or a button URL — so there’s no single request that works for all of them, and the Playground below can’t test one either. Follow the steps below to generate and run your exact request from the API Developer Console instead.

What a send contains

The contact’s first name fills itself in, so a template whose only variable is the first name needs nothing extra. For the others, the name is the token the template uses — for ChatSyncs’ own templates, for example, system-cart-product-list at position 2, giving the field templateVariable-system-cart-product-list-2. A template that uses custom tokens such as #!productlist!# takes the token without the #!: templateVariable-productlist-1.

A URL button with a variable

A URL button can end its link in a variable, such as https://www.chatsyncs.com/{{1}} for a Pay Now button. Its value is sent like any other variable, but it is numbered after the body variables. With four body variables, the button’s variable is number 5:
The value is added to the end of the button’s link (https://www.chatsyncs.com/pay/INV-1001), so it cannot contain spaces. Leave it out and ChatSyncs refuses the send with buttons: URL parameter generates an invalid URL. In Bot Template Get this variable is listed apart from the body ones, under variable_map.button, so count the body variables first and continue from there.

Quick-reply buttons

A quick-reply button runs a bot reply when the customer taps it, and the send can say which: template_quick_reply_button_values is a JSON array with one postback id per quick-reply button, in the order the buttons appear. The ids come from Get Postback List: YES_START_CHAT_WITH_BOT (Chat with robot), UNSUBSCRIBE_QUICK_BOXER (Unsubscribe), and the id of any keyword-reply flow you have built. The field is optional. A template with a quick-reply button is delivered without it, but tapping the button then starts none of your bot replies, so send it whenever the buttons should do something. The API Developer Console always asks you to pick a reply for every quick-reply button before it generates a request.
A variable you leave out is delivered as -. The customer receives Product List : -, so always send a value for every variable that needs one.
A successful send returns the wa_message_id:

What cannot be sent this way

ChatSyncs refuses these, because this request carries nothing for them: Send those from ChatSyncs itself. Templates with a text header, or none, work.

Generate the request

You never need to guess template_id, variable names, or field formats — the console builds the whole request for you, already filled in. The only thing you type at the end is the recipient’s phone number.
1

Open Send Text Message in the API Developer Console

Go to the API Developer Console and click Send Text Message in the sidebar. The template generator lives further down on this same page — it isn’t under Chatbot Manager.
2

Pick your WhatsApp account and template

Scroll down to Generate API End-point: Send Template Message, choose the WhatsApp account to send from, then click the approved template you want to send.
Send Text Message console page scrolled down to the Generate API End-point: Send Template Message section, with the WhatsApp account dropdown and the list of approved templates
3

Fill in that template's variables

A popup lists every variable the template needs — none of them come pre-filled. Type a real value into each one: a product list, a price, a checkout link, a button URL, whatever that specific template calls for.
Template variable popup with empty input fields for each template variable
4

Click Get API end-point

The console generates the exact GET URL and POST curl for that template — apiToken, phone_number_id, template_id, and every variable you just typed are already filled in. The only placeholder left in either request is phone_number.
API end-point generated successfully popup showing the filled-in GET and POST request examples
5

Set the phone number and run it

Copy the POST curl (or the GET URL) out of that popup — apiToken, phone_number_id, template_id, and every variable are already inside it, so there’s nothing left to look up. Replace phone_number with the recipient’s number (country code first, digits only, no +, e.g. 91XXXXXXXXXX for an Indian number), then run it from a terminal or a tool like Postman or Insomnia.

Body

application/x-www-form-urlencoded
apiToken
string
required

Your ChatSyncs API key (not a WhatsApp/Meta access token). Where to find it.

Example:

"API-KEY"

phone_number_id
string
required

The WhatsApp account's phone number ID. Where to find it.

Example:

"PHONE-NUMBER-ID"

template_id
string
required

The template to send: its id from Bot Template Get (the short ChatSyncs number). Not Meta's long template_id. Where to find it.

Example:

"428445"

phone_number
string
required

The recipient phone number, with country code, digits only.

Example:

"PHONE-NUMBER"

template_quick_reply_button_values
string

Optional. For a template with quick-reply buttons: a JSON array with the bot reply each quick-reply button runs when the contact taps it — one entry per quick-reply button, in button order. Each entry is a postback id from Get Postback List, e.g. ["YES_START_CHAT_WITH_BOT"]. Leave it out and the message is still delivered, but tapping its quick-reply buttons starts none of your bot replies. The API Developer Console always asks you to pick one for every quick-reply button.

Example:

"[\"YES_START_CHAT_WITH_BOT\"]"

templateVariable-{name}-{position}
string

A value for one variable, repeated once per variable. {position} is the placeholder number (2 for {{2}}) and {name} is the variable's name, e.g. system-cart-total-price or productlist. The variable at the end of a URL button's link comes after the body variables and continues the count: with four body variables it is templateVariable-payment_link-5. Its value is added to the end of the button's link, so it cannot contain spaces. Not needed for the contact's first name. Single line, no tabs, up to 1024 characters.

Example:

"999"

Response

Standard ChatSyncs response. status is "1" on success and "0" on failure.

status
string

"1" = success, "0" = failure.

message
string

Human-readable result message.