curl --request GET \
--url https://api.messaging.phonovation.com/whatsapp/1/templates \
--header 'Authorization: <api-key>'import requests
url = "https://api.messaging.phonovation.com/whatsapp/1/templates"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://api.messaging.phonovation.com/whatsapp/1/templates");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "<api-key>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.get("https://api.messaging.phonovation.com/whatsapp/1/templates")
.header("Authorization", "<api-key>")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.messaging.phonovation.com/whatsapp/1/templates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.messaging.phonovation.com/whatsapp/1/templates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"results": [
{
"id": "111",
"businessAccountId": 222,
"name": "media_template",
"language": "en",
"status": "APPROVED",
"category": "MARKETING",
"structure": {
"header": {
"format": "IMAGE"
},
"body": {
"text": "example {{1}} body"
},
"footer": {
"text": "exampleFooter"
},
"type": "MEDIA"
},
"quality": "HIGH",
"platform": {
"entityId": "entityId",
"applicationId": "applicationId"
},
"createdAt": "2024-01-01T00:00:00.000+0000",
"lastUpdatedAt": "2024-01-01T00:00:00.000+0000"
}
],
"paging": {
"page": 0,
"size": 99,
"totalPages": 1,
"totalResults": 1
}
}Get account WhatsApp templates
Retrieve all templates associated with your account based on the provided filter criteria.
Required scope: Enable one of: whatsapp:manage.
curl --request GET \
--url https://api.messaging.phonovation.com/whatsapp/1/templates \
--header 'Authorization: <api-key>'import requests
url = "https://api.messaging.phonovation.com/whatsapp/1/templates"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://api.messaging.phonovation.com/whatsapp/1/templates");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "<api-key>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.get("https://api.messaging.phonovation.com/whatsapp/1/templates")
.header("Authorization", "<api-key>")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.messaging.phonovation.com/whatsapp/1/templates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.messaging.phonovation.com/whatsapp/1/templates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"results": [
{
"id": "111",
"businessAccountId": 222,
"name": "media_template",
"language": "en",
"status": "APPROVED",
"category": "MARKETING",
"structure": {
"header": {
"format": "IMAGE"
},
"body": {
"text": "example {{1}} body"
},
"footer": {
"text": "exampleFooter"
},
"type": "MEDIA"
},
"quality": "HIGH",
"platform": {
"entityId": "entityId",
"applicationId": "applicationId"
},
"createdAt": "2024-01-01T00:00:00.000+0000",
"lastUpdatedAt": "2024-01-01T00:00:00.000+0000"
}
],
"paging": {
"page": 0,
"size": 99,
"totalPages": 1,
"totalResults": 1
}
}Authorizations
This is the most secure authorization type and the one with the most flexibility.
API keys can be generated by calling the dedicated API method. Furthermore, API keys can have a limited scope and cover only some API methods. Lastly, they can be revoked at any time. This range of possibilities makes API keys well suited for separating the API access rights across multiple applications or use cases. Finally, the loss of an API key is easily manageable.
You can manage your API keys from GUI, or programmatically with dedicated API.
API key Authorization header example:
Authorization: App 003026bbc133714df1834b8638bb496e-8f4b3d9a-e931-478d-a994-28a725159ab9
Query Parameters
List of registered WhatsApp senders numbers separated by comma. Must be in international format.
List of template statuses, separated by commas.
APPROVED, IN_APPEAL, PENDING, REJECTED, PENDING_DELETION, DELETED, REINSTATED, FLAGGED, FIRST_PAUSED, SECOND_PAUSED, DISABLED, ARCHIVED, UNKNOWN Template name.
List of languages for the templates, separated by commas.
af, sq, ar, ar_EG, ar_AE, ar_LB, ar_MA, ar_QA, az, bn, bn_IN, bg, ca, zh_CN, zh_HK, zh_TW, hr, cs, da, nl, nl_BE, en, en_GB, en_US, en_AE, en_AU, en_CA, en_GH, en_IE, en_IN, en_JM, en_MY, en_NZ, en_QA, en_SG, en_UG, en_ZA, et, fil, fi, fr, fr_BE, fr_CA, fr_CH, fr_CI, fr_MA, ka, de, de_AT, de_CH, el, gu, ha, he, hi, hu, id, ga, it, ja, kn, kk, rw_RW, ko, ky_KG, lo, lv, lt, mk, ms, ml, mr, nb, fa, pl, pt_BR, pt_PT, pa, ro, ru, sr, si_LK, sk, sl, es, es_AR, es_CL, es_CO, es_CR, es_DO, es_EC, es_HN, es_MX, es_PA, es_PE, es_ES, es_UY, sw, sv, ta, te, th, tr, uk, ur, uz, vi, zu, unknown List of template categories, separated by commas.
MARKETING, AUTHENTICATION, UTILITY Application ID used in outbound send requests. It is also returned in notification events. For more details, refer to the documentation.
Entity ID used in outbound send requests. It is also returned in notification events. For more details, refer to the documentation.
Current page number.
Number of items per page.
1 <= x <= 100Sorting criteria in the format property,direction. Can be ascending (ASC) or descending (DESC). Available properties: category, language, name, status, templateId
Response
List of all filtered templates
The list of the results for this page.
The list of the results for this page.
- DefaultMarketingTemplateApiResponse
- DefaultTemplateApiResponse
- AuthenticationTemplateApiResponse
Show child attributes
Show child attributes
Contains information about the page.
Show child attributes
Show child attributes