Send Template Message
curl --request POST \
--url https://api.zixflow.com/api/v1/campaign/rcs/message/template \
--header 'Content-Type: application/json' \
--data '
{
"to": "<string>",
"botId": "<string>",
"templateName": "<string>",
"variables": {},
"source": "<string>",
"linkWithRecord": true,
"reportURL": "<string>",
"submissionStatus": true
}
'import requests
url = "https://api.zixflow.com/api/v1/campaign/rcs/message/template"
payload = {
"to": "<string>",
"botId": "<string>",
"templateName": "<string>",
"variables": {},
"source": "<string>",
"linkWithRecord": True,
"reportURL": "<string>",
"submissionStatus": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
to: '<string>',
botId: '<string>',
templateName: '<string>',
variables: {},
source: '<string>',
linkWithRecord: true,
reportURL: '<string>',
submissionStatus: true
})
};
fetch('https://api.zixflow.com/api/v1/campaign/rcs/message/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://api.zixflow.com/api/v1/campaign/rcs/message/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 => json_encode([
'to' => '<string>',
'botId' => '<string>',
'templateName' => '<string>',
'variables' => [
],
'source' => '<string>',
'linkWithRecord' => true,
'reportURL' => '<string>',
'submissionStatus' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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://api.zixflow.com/api/v1/campaign/rcs/message/template"
payload := strings.NewReader("{\n \"to\": \"<string>\",\n \"botId\": \"<string>\",\n \"templateName\": \"<string>\",\n \"variables\": {},\n \"source\": \"<string>\",\n \"linkWithRecord\": true,\n \"reportURL\": \"<string>\",\n \"submissionStatus\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.zixflow.com/api/v1/campaign/rcs/message/template")
.header("Content-Type", "application/json")
.body("{\n \"to\": \"<string>\",\n \"botId\": \"<string>\",\n \"templateName\": \"<string>\",\n \"variables\": {},\n \"source\": \"<string>\",\n \"linkWithRecord\": true,\n \"reportURL\": \"<string>\",\n \"submissionStatus\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zixflow.com/api/v1/campaign/rcs/message/template")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"to\": \"<string>\",\n \"botId\": \"<string>\",\n \"templateName\": \"<string>\",\n \"variables\": {},\n \"source\": \"<string>\",\n \"linkWithRecord\": true,\n \"reportURL\": \"<string>\",\n \"submissionStatus\": true\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Message sent successfully"
}
{
"status": false,
"message": "Invalid data Provided"
}
{
"status": false,
"message": "Unauthorised"
}
RCS Campaign
Send Template Message
POST
/
api
/
v1
/
campaign
/
rcs
/
message
/
template
Send Template Message
curl --request POST \
--url https://api.zixflow.com/api/v1/campaign/rcs/message/template \
--header 'Content-Type: application/json' \
--data '
{
"to": "<string>",
"botId": "<string>",
"templateName": "<string>",
"variables": {},
"source": "<string>",
"linkWithRecord": true,
"reportURL": "<string>",
"submissionStatus": true
}
'import requests
url = "https://api.zixflow.com/api/v1/campaign/rcs/message/template"
payload = {
"to": "<string>",
"botId": "<string>",
"templateName": "<string>",
"variables": {},
"source": "<string>",
"linkWithRecord": True,
"reportURL": "<string>",
"submissionStatus": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
to: '<string>',
botId: '<string>',
templateName: '<string>',
variables: {},
source: '<string>',
linkWithRecord: true,
reportURL: '<string>',
submissionStatus: true
})
};
fetch('https://api.zixflow.com/api/v1/campaign/rcs/message/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://api.zixflow.com/api/v1/campaign/rcs/message/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 => json_encode([
'to' => '<string>',
'botId' => '<string>',
'templateName' => '<string>',
'variables' => [
],
'source' => '<string>',
'linkWithRecord' => true,
'reportURL' => '<string>',
'submissionStatus' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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://api.zixflow.com/api/v1/campaign/rcs/message/template"
payload := strings.NewReader("{\n \"to\": \"<string>\",\n \"botId\": \"<string>\",\n \"templateName\": \"<string>\",\n \"variables\": {},\n \"source\": \"<string>\",\n \"linkWithRecord\": true,\n \"reportURL\": \"<string>\",\n \"submissionStatus\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.zixflow.com/api/v1/campaign/rcs/message/template")
.header("Content-Type", "application/json")
.body("{\n \"to\": \"<string>\",\n \"botId\": \"<string>\",\n \"templateName\": \"<string>\",\n \"variables\": {},\n \"source\": \"<string>\",\n \"linkWithRecord\": true,\n \"reportURL\": \"<string>\",\n \"submissionStatus\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zixflow.com/api/v1/campaign/rcs/message/template")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"to\": \"<string>\",\n \"botId\": \"<string>\",\n \"templateName\": \"<string>\",\n \"variables\": {},\n \"source\": \"<string>\",\n \"linkWithRecord\": true,\n \"reportURL\": \"<string>\",\n \"submissionStatus\": true\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Message sent successfully"
}
{
"status": false,
"message": "Invalid data Provided"
}
{
"status": false,
"message": "Unauthorised"
}
Send RCS Template Message
This API enables you to send RCS template messages to users who have a live session. Only approved templates are supported for message sending.Request Body Parameters
This is the unique identifier associated with the RCS bot. Find the BOT ID on
the Zixflow RCS Settings page. RCS
Settings
If the “linkWithRecord” is set to true, the source from which the WhatsApp
message is sent should be mentioned; otherwise, it defaults to API.
Specify whether to associate the current message with a record and display it
in the inbox. Set it to “true” for linking with a record; otherwise, it
defaults to “false.”
(Optional) Indicates whether to wait for the submission status. Set it to
“true” if you want to wait for the submission status; otherwise, it defaults
to “false.”
Response
Response Examples
{
"status": true,
"message": "Message sent successfully"
}
{
"status": false,
"message": "Invalid data Provided"
}
{
"status": false,
"message": "Unauthorised"
}