List All Templates
curl --request GET \
--url https://app.adsera.in/api/pub/wa/template/all/list \
--header 'x-api-key: <api-key>' \
--header 'x-api-secret: <api-key>'import requests
url = "https://app.adsera.in/api/pub/wa/template/all/list"
headers = {
"x-api-key": "<api-key>",
"x-api-secret": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-api-key': '<api-key>', 'x-api-secret': '<api-key>'}
};
fetch('https://app.adsera.in/api/pub/wa/template/all/list', 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://app.adsera.in/api/pub/wa/template/all/list",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>",
"x-api-secret: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.adsera.in/api/pub/wa/template/all/list"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-api-secret", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.adsera.in/api/pub/wa/template/all/list")
.header("x-api-key", "<api-key>")
.header("x-api-secret", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.adsera.in/api/pub/wa/template/all/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
request["x-api-secret"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": 200,
"success": true,
"error": null,
"templates": [
{
"_id": "60c72b2f9b1d8e001f8a1b2d",
"company": "60c72b2f9b1d8e001f8a1b2a",
"whatsapp": "60c72b2f9b1d8e001f8a1b2c",
"templateId": "8794876541213",
"wabaId": "123456789012345",
"status": "APPROVED",
"format": "NAMED",
"category": "AUTHENTICATION",
"name": "order_confirmation",
"language": "en_US",
"libraryTempName": "<string>",
"components": [
{
"type": "HEADER",
"format": "TEXT",
"limited_time_offer": {
"text": "<string>",
"has_expiration": true
},
"text": "<string>",
"add_security_recommendation": true,
"code_expiration_minutes": 123,
"example": {
"header_handle": [
"<string>"
],
"header_text": [
"<string>"
],
"header_text_named_params": {},
"body_text": [
[
"<string>"
]
],
"body_text_named_params": {}
},
"buttons": [
{
"type": "QUICK_REPLY",
"text": "<string>",
"url": "<string>",
"example": "<string>",
"phoneNumber": "<string>",
"flow_id": "<string>",
"flow_action": "NAVIGATE",
"flow_name": "<string>",
"flow_json": {},
"navigate_screen": "<string>",
"icon": "DOCUMENT",
"otp_type": "COPY_CODE",
"supported_apps": [
{
"package_name": "<string>",
"signature_hash": "<string>"
}
]
}
],
"cards": [
{
"components": "<array>"
}
]
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"totalCount": 25,
"currentPage": 1,
"perPage": 10
}{
"status": 401,
"success": false,
"error": "Unauthorized: Please provide valid API credentials."
}{
"status": 500,
"success": false,
"error": "Internal Server Error!"
}Template
List All Templates
Lists the WhatsApp templates of every WhatsApp account in your company, newest first. Each template includes its whatsapp account (name, phone). Use the template _id with Send a Template Message.
GET
/
api
/
pub
/
wa
/
template
/
all
/
list
List All Templates
curl --request GET \
--url https://app.adsera.in/api/pub/wa/template/all/list \
--header 'x-api-key: <api-key>' \
--header 'x-api-secret: <api-key>'import requests
url = "https://app.adsera.in/api/pub/wa/template/all/list"
headers = {
"x-api-key": "<api-key>",
"x-api-secret": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-api-key': '<api-key>', 'x-api-secret': '<api-key>'}
};
fetch('https://app.adsera.in/api/pub/wa/template/all/list', 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://app.adsera.in/api/pub/wa/template/all/list",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>",
"x-api-secret: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.adsera.in/api/pub/wa/template/all/list"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-api-secret", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.adsera.in/api/pub/wa/template/all/list")
.header("x-api-key", "<api-key>")
.header("x-api-secret", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.adsera.in/api/pub/wa/template/all/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
request["x-api-secret"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": 200,
"success": true,
"error": null,
"templates": [
{
"_id": "60c72b2f9b1d8e001f8a1b2d",
"company": "60c72b2f9b1d8e001f8a1b2a",
"whatsapp": "60c72b2f9b1d8e001f8a1b2c",
"templateId": "8794876541213",
"wabaId": "123456789012345",
"status": "APPROVED",
"format": "NAMED",
"category": "AUTHENTICATION",
"name": "order_confirmation",
"language": "en_US",
"libraryTempName": "<string>",
"components": [
{
"type": "HEADER",
"format": "TEXT",
"limited_time_offer": {
"text": "<string>",
"has_expiration": true
},
"text": "<string>",
"add_security_recommendation": true,
"code_expiration_minutes": 123,
"example": {
"header_handle": [
"<string>"
],
"header_text": [
"<string>"
],
"header_text_named_params": {},
"body_text": [
[
"<string>"
]
],
"body_text_named_params": {}
},
"buttons": [
{
"type": "QUICK_REPLY",
"text": "<string>",
"url": "<string>",
"example": "<string>",
"phoneNumber": "<string>",
"flow_id": "<string>",
"flow_action": "NAVIGATE",
"flow_name": "<string>",
"flow_json": {},
"navigate_screen": "<string>",
"icon": "DOCUMENT",
"otp_type": "COPY_CODE",
"supported_apps": [
{
"package_name": "<string>",
"signature_hash": "<string>"
}
]
}
],
"cards": [
{
"components": "<array>"
}
]
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"totalCount": 25,
"currentPage": 1,
"perPage": 10
}{
"status": 401,
"success": false,
"error": "Unauthorized: Please provide valid API credentials."
}{
"status": 500,
"success": false,
"error": "Internal Server Error!"
}Authorizations
Query Parameters
Was this page helpful?