Skip to main content
POST
/
whatsapp
/
send
/
template
Send Template Message
curl --request POST \
  --url https://platform.chatsyncs.com/api/v1/whatsapp/send/template \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data apiToken=API-KEY \
  --data phone_number_id=PHONE-NUMBER-ID \
  --data template_id=396098 \
  --data phone_number=PHONE-NUMBER
import requests

url = "https://platform.chatsyncs.com/api/v1/whatsapp/send/template"

payload = {
"apiToken": "API-KEY",
"phone_number_id": "PHONE-NUMBER-ID",
"template_id": "396098",
"phone_number": "PHONE-NUMBER"
}
headers = {"Content-Type": "application/x-www-form-urlencoded"}

response = requests.post(url, data=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({
apiToken: 'API-KEY',
phone_number_id: 'PHONE-NUMBER-ID',
template_id: '396098',
phone_number: 'PHONE-NUMBER'
})
};

fetch('https://platform.chatsyncs.com/api/v1/whatsapp/send/template', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://platform.chatsyncs.com/api/v1/whatsapp/send/template",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "apiToken=API-KEY&phone_number_id=PHONE-NUMBER-ID&template_id=396098&phone_number=PHONE-NUMBER",
CURLOPT_HTTPHEADER => [
"Content-Type: application/x-www-form-urlencoded"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://platform.chatsyncs.com/api/v1/whatsapp/send/template"

payload := strings.NewReader("apiToken=API-KEY&phone_number_id=PHONE-NUMBER-ID&template_id=396098&phone_number=PHONE-NUMBER")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Content-Type", "application/x-www-form-urlencoded")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://platform.chatsyncs.com/api/v1/whatsapp/send/template")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("apiToken=API-KEY&phone_number_id=PHONE-NUMBER-ID&template_id=396098&phone_number=PHONE-NUMBER")
.asString();
require 'uri'
require 'net/http'

url = URI("https://platform.chatsyncs.com/api/v1/whatsapp/send/template")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "apiToken=API-KEY&phone_number_id=PHONE-NUMBER-ID&template_id=396098&phone_number=PHONE-NUMBER"

response = http.request(request)
puts response.read_body
{
  "status": "1",
  "message": "Template message sent successfully."
}
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.

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. Get this from Bot Template Get, or from the template generator in the API Developer Console -> Send Text Message page. Where to find it.

Example:

"396098"

phone_number
string
required

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

Example:

"PHONE-NUMBER"

Response

200 - application/json

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

status
string

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

message
string

Human-readable result message.