Get List Of Templates
curl --request GET \
--url https://api.example.com/api/v1/campaign/whatsapp/templates/{phoneId} \
--header 'Content-Type: application/json' \
--data '
{
"limit": 123,
"offset": 123
}
'import requests
url = "https://api.example.com/api/v1/campaign/whatsapp/templates/{phoneId}"
payload = {
"limit": 123,
"offset": 123
}
headers = {"Content-Type": "application/json"}
response = requests.get(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({limit: 123, offset: 123})
};
fetch('https://api.example.com/api/v1/campaign/whatsapp/templates/{phoneId}', 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.example.com/api/v1/campaign/whatsapp/templates/{phoneId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => json_encode([
'limit' => 123,
'offset' => 123
]),
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.example.com/api/v1/campaign/whatsapp/templates/{phoneId}"
payload := strings.NewReader("{\n \"limit\": 123,\n \"offset\": 123\n}")
req, _ := http.NewRequest("GET", 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.get("https://api.example.com/api/v1/campaign/whatsapp/templates/{phoneId}")
.header("Content-Type", "application/json")
.body("{\n \"limit\": 123,\n \"offset\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/campaign/whatsapp/templates/{phoneId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"limit\": 123,\n \"offset\": 123\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Success",
"data": [
{
"language": "en",
"name": "unsubscribe_response",
"category": "MARKETING",
"components": [
{
"type": "HEADER",
"format": "TEXT",
"text": "Unsubscribe"
},
{
"type": "BODY",
"text": "We're sorry to see you go 💔\n\nYou've been unsubscribed from receiving messages from us.\n\nIf you'd like to again start getting messages, reply with *START*"
}
],
"status": "APPROVED"
}
]
}
{
"status": false,
"message": "file size exceeded"
}
{
"status": false,
"message": "No token provided"
}
Whatsapp Campaign
Get List Of Templates
GET
/
api
/
v1
/
campaign
/
whatsapp
/
templates
/
{phoneId}
Get List Of Templates
curl --request GET \
--url https://api.example.com/api/v1/campaign/whatsapp/templates/{phoneId} \
--header 'Content-Type: application/json' \
--data '
{
"limit": 123,
"offset": 123
}
'import requests
url = "https://api.example.com/api/v1/campaign/whatsapp/templates/{phoneId}"
payload = {
"limit": 123,
"offset": 123
}
headers = {"Content-Type": "application/json"}
response = requests.get(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({limit: 123, offset: 123})
};
fetch('https://api.example.com/api/v1/campaign/whatsapp/templates/{phoneId}', 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.example.com/api/v1/campaign/whatsapp/templates/{phoneId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => json_encode([
'limit' => 123,
'offset' => 123
]),
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.example.com/api/v1/campaign/whatsapp/templates/{phoneId}"
payload := strings.NewReader("{\n \"limit\": 123,\n \"offset\": 123\n}")
req, _ := http.NewRequest("GET", 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.get("https://api.example.com/api/v1/campaign/whatsapp/templates/{phoneId}")
.header("Content-Type", "application/json")
.body("{\n \"limit\": 123,\n \"offset\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/campaign/whatsapp/templates/{phoneId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"limit\": 123,\n \"offset\": 123\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Success",
"data": [
{
"language": "en",
"name": "unsubscribe_response",
"category": "MARKETING",
"components": [
{
"type": "HEADER",
"format": "TEXT",
"text": "Unsubscribe"
},
{
"type": "BODY",
"text": "We're sorry to see you go 💔\n\nYou've been unsubscribed from receiving messages from us.\n\nIf you'd like to again start getting messages, reply with *START*"
}
],
"status": "APPROVED"
}
]
}
{
"status": false,
"message": "file size exceeded"
}
{
"status": false,
"message": "No token provided"
}
Path Params
string
required
This is the unique identifier associated with the sender’s phone number given
by WhatsApp. Find the Phone ID on the Zixflow WhatsApp Settings page next to
the number. Whatsapp
Settings
Query Params
number
required
The number of templates to be returned, set to 10 in this instance. This
parameter restricts the response to a specific quantity of templates.
number
required
The starting point from which the templates are to be fetched within the
entire dataset. In this case, it is set to 0, indicating that retrieval should
commence from the beginning of the dataset.
Response
boolean
Indicates whether the call was successful. true if successful, false if not.
string
success or error response message
array_object
{
"status": true,
"message": "Success",
"data": [
{
"language": "en",
"name": "unsubscribe_response",
"category": "MARKETING",
"components": [
{
"type": "HEADER",
"format": "TEXT",
"text": "Unsubscribe"
},
{
"type": "BODY",
"text": "We're sorry to see you go 💔\n\nYou've been unsubscribed from receiving messages from us.\n\nIf you'd like to again start getting messages, reply with *START*"
}
],
"status": "APPROVED"
}
]
}
{
"status": false,
"message": "file size exceeded"
}
{
"status": false,
"message": "No token provided"
}
⌘I