curl --request GET \
--url https://api.messaging.phonovation.com/ccaas/1/templates \
--header 'Authorization: <api-key>'import requests
url = "https://api.messaging.phonovation.com/ccaas/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/ccaas/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/ccaas/1/templates")
.header("Authorization", "<api-key>")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.messaging.phonovation.com/ccaas/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/ccaas/1/templates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"templates": [
{
"id": "c4391685-b21a-4c21-a470-5453e9382752",
"name": "First template name",
"language": "English",
"languageCode": "en",
"channel": "SMS",
"external": false,
"content": "Simple English text content",
"createdAt": "2024-01-01T00:00:00.000+00:00",
"updatedAt": "2024-01-01T00:00:00.000+00:00",
"tags": [
{
"name": "First template tag",
"createdAt": "2024-01-01T00:00:00.000+00:00",
"updatedAt": "2024-01-01T00:00:00.000+00:00"
}
],
"attachments": []
},
{
"id": "e2fafe40-ea15-49c8-ae9b-aa07131a0096",
"name": "Second template name",
"language": "Spanish",
"languageCode": "es",
"channel": "SMS",
"external": false,
"content": "Simple Spanish text content",
"createdAt": "2024-01-01T00:00:00.000+00:00",
"updatedAt": "2024-01-01T00:00:00.000+00:00",
"tags": [
{
"name": "Second template tag",
"createdAt": "2024-01-01T00:00:00.000+00:00",
"updatedAt": "2024-01-01T00:00:00.000+00:00"
}
],
"attachments": [
{
"id": "e2fafe40-ea15-49c8-ae9b-aa07131a0096",
"fileName": "Second template file",
"fileExtension": "txt",
"fileSize": 1024,
"contentType": "text/plain",
"publicLink": "https://example.com/second-template-file.txt",
"thumbLink": "https://example.com/second-template-file-thumb.png",
"uploadedAt": "2024-01-01T00:00:00.000+00:00"
},
{
"id": "e2fafe40-ea15-49c8-ae9b-aa07131a0096",
"fileName": "Second template image",
"fileExtension": "png",
"fileSize": 2048,
"contentType": "image/png",
"publicLink": "https://example.com/second-template-image.png",
"thumbLink": "https://example.com/second-template-image-thumb.png",
"uploadedAt": "2024-01-01T00:00:00.000+00:00"
}
]
}
],
"pagination": {
"totalItems": 2,
"page": 0,
"limit": 10,
"orderBy": "createdAt:DESC"
}
}{
"requestError": {
"serviceException": {
"messageId": "BAD_REQUEST",
"text": "Page size has to be bigger or equal to zero!"
}
}
}{
"requestError": {
"serviceException": {
"messageId": "UNAUTHORIZED",
"text": "Unauthorized"
}
}
}{
"requestError": {
"serviceException": {
"messageId": "FORBIDDEN",
"text": "Forbidden"
}
}
}{
"requestError": {
"serviceException": {
"messageId": "GENERAL_ERROR",
"text": "Something went wrong. Please contact support."
}
}
}Get templates
Use this method to get a list of templates with pagination and filtering options. Using the filter is optional. The result can be filtered by one or many optional filters described in the parameters. Results are ordered by creation in descending order by default, meaning the newest template will be returned first. More info
Required scope: Enable one of: conversations:manage, conversations:read.
curl --request GET \
--url https://api.messaging.phonovation.com/ccaas/1/templates \
--header 'Authorization: <api-key>'import requests
url = "https://api.messaging.phonovation.com/ccaas/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/ccaas/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/ccaas/1/templates")
.header("Authorization", "<api-key>")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.messaging.phonovation.com/ccaas/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/ccaas/1/templates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"templates": [
{
"id": "c4391685-b21a-4c21-a470-5453e9382752",
"name": "First template name",
"language": "English",
"languageCode": "en",
"channel": "SMS",
"external": false,
"content": "Simple English text content",
"createdAt": "2024-01-01T00:00:00.000+00:00",
"updatedAt": "2024-01-01T00:00:00.000+00:00",
"tags": [
{
"name": "First template tag",
"createdAt": "2024-01-01T00:00:00.000+00:00",
"updatedAt": "2024-01-01T00:00:00.000+00:00"
}
],
"attachments": []
},
{
"id": "e2fafe40-ea15-49c8-ae9b-aa07131a0096",
"name": "Second template name",
"language": "Spanish",
"languageCode": "es",
"channel": "SMS",
"external": false,
"content": "Simple Spanish text content",
"createdAt": "2024-01-01T00:00:00.000+00:00",
"updatedAt": "2024-01-01T00:00:00.000+00:00",
"tags": [
{
"name": "Second template tag",
"createdAt": "2024-01-01T00:00:00.000+00:00",
"updatedAt": "2024-01-01T00:00:00.000+00:00"
}
],
"attachments": [
{
"id": "e2fafe40-ea15-49c8-ae9b-aa07131a0096",
"fileName": "Second template file",
"fileExtension": "txt",
"fileSize": 1024,
"contentType": "text/plain",
"publicLink": "https://example.com/second-template-file.txt",
"thumbLink": "https://example.com/second-template-file-thumb.png",
"uploadedAt": "2024-01-01T00:00:00.000+00:00"
},
{
"id": "e2fafe40-ea15-49c8-ae9b-aa07131a0096",
"fileName": "Second template image",
"fileExtension": "png",
"fileSize": 2048,
"contentType": "image/png",
"publicLink": "https://example.com/second-template-image.png",
"thumbLink": "https://example.com/second-template-image-thumb.png",
"uploadedAt": "2024-01-01T00:00:00.000+00:00"
}
]
}
],
"pagination": {
"totalItems": 2,
"page": 0,
"limit": 10,
"orderBy": "createdAt:DESC"
}
}{
"requestError": {
"serviceException": {
"messageId": "BAD_REQUEST",
"text": "Page size has to be bigger or equal to zero!"
}
}
}{
"requestError": {
"serviceException": {
"messageId": "UNAUTHORIZED",
"text": "Unauthorized"
}
}
}{
"requestError": {
"serviceException": {
"messageId": "FORBIDDEN",
"text": "Forbidden"
}
}
}{
"requestError": {
"serviceException": {
"messageId": "GENERAL_ERROR",
"text": "Something went wrong. Please contact support."
}
}
}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
Optional. Template channel.
SMS, VIBER, FACEBOOK_MESSENGER, WHATSAPP, RCS, EMAIL, LIVE_CHAT, APPLE_BUSINESS_CHAT, LINE, TELEGRAM, VIBER_BOT, FACEBOOK_POST, INSTAGRAM_POST, INSTAGRAM_MESSAGING, GOOGLE_PLAY, KAKAO_SANGDAM Optional. Template language.
Afrikaans, Albanian, Arabic, Azerbaijani, Bengali, Bulgarian, Catalan, Chinese (CHN), Chinese (HKG), Chinese (TAI), Croatian, Czech, Danish, Dutch, English, English (UK), English (US), Estonian, Filipino, Finnish, French, Georgian, German, Greek, Gujarati, Hausa, Hebrew, Hindi, Hungarian, Indonesian, Irish, Italian, Japanese, Kannada, Kazakh, Kinyarwanda, Korean, Kyrgyz (Kyrgyzstan), Lao, Latvian, Lithuanian, Macedonian, Malay, Malayalam, Marathi, Norwegian, Persian, Polish, Portuguese (BR), Portuguese (POR), Punjabi, Romanian, Russian, Serbian, Slovak, Slovenian, Spanish, Spanish (ARG), Spanish (SPA), Spanish (MEX), Swahili, Swedish, Tamil, Telugu, Thai, Turkish, Ukrainian, Urdu, Uzbek, Vietnamese, Zulu Optional. Filter results created after specific date and time. Format: yyyy-MM-dd'T'HH:mm:ss.SSS+0000
Optional. Filter results created before specific date and time. Format: yyyy-MM-dd'T'HH:mm:ss.SSS+0000
Optional. Filter results updated after specific date and time. Format: yyyy-MM-dd'T'HH:mm:ss.SSS+0000
Optional. Filter results updated before specific date and time. Format: yyyy-MM-dd'T'HH:mm:ss.SSS+0000
Content type
TEXT, IMAGE, LOCATION, TEMPLATE, AUDIO, UNKNOWN, VOICE, VIDEO, DOCUMENT, CONTACT, VOICE_CALL, VIDEO_CALL, BUTTON, TYPING_INDICATOR, LIST_PICKER, FILE, LIST_PICKER_RESPONSE, POSTBACK, WA_BUTTON_FEEDBACK, SURVEY_REQUEST, SURVEY_RESPONSE, MEDIA_TEMPLATE, FACEBOOK_TEMPLATE, PRE_CHAT_FORM, LC_QUICK_REPLY, TEXT_WITH_BUTTON, TEXT_WITH_IMAGE_AND_BUTTON, SUGGESTION_RESPONSE, ABC_MULTI_TYPE, FOLLOW, UNFOLLOW, CALL, EMAIL, CARD, CAROUSEL, TEXT_WITH_SUGGESTION, RICH_LINK, TIME_PICKER, TIME_PICKER_RESPONSE, BUTTON_RESPONSE, VIBER_BOT_STICKER, WHATSAPP_STICKER, VIBER_BOT_CAROUSEL, VIBER_BOT_EVENT, VIBER_BOT_VIDEO, VIBER_BOT_FILE, URL, LC_CAROUSEL, INSTAGRAM_STICKER, CALL_START, CALL_HANGUP, CALL_TRANSCRIPT, CALL_FILE, APPLE_CUSTOM_INTERACTIVE_CONTENT, APPLE_AUTH_REQUEST_CONTENT, APPLE_PAY_REQUEST_CONTENT, APPLE_PAY_RESPONSE, AUTHENTICATION_RESPONSE, CLOSE_CONVERSATION, BUTTON_LIST, KAKAO_SANGDAM_SESSION_EXPIRED, INSTAGRAM_TEMPLATE, SHARE, STORY_MENTION, CUSTOM_INTERACTIVE_RESPONSE, INTERACTIVE, INTERACTIVE_LIST_REPLY, INTERACTIVE_BUTTON_REPLY, LC_FORM_RESPONSE, PRODUCT, APPLE_QUICK_REPLY_CONTENT, QUICK_REPLY, WHATSAPP_PRODUCT, WHATSAPP_MULTI_PRODUCT, WHATSAPP_TEXT_WITH_ADDITIONAL_DATA, ORDER, TELEGRAM_CONTACT, FORM_RESPONSE, LINE_TEMPLATE, APPLE_FORM_CONTENT, LINE_POSTBACK_EVENT, LIVE_CHAT_KNOWLEDGE_BASE_ARTICLE, LIVE_CHAT_KNOWLEDGE_BASE_SEARCH, LINE_STICKER, INTERACTIVE_FLOW_REPLY, RCS_TEXT, RCS_FILE, RCS_CARD, RCS_CAROUSEL, BUNDLE, PRIVATE_REPLY_TO_SOCIAL_COMMENT, LIVE_CHAT_BUTTON, TEXT_WITH_RATING, EMPTY, JSON, ROADSIDE_ASSISTANCE, CUSTOM_DATA, WHATSAPP_CALL_PERMISSION_REPLY, TIKTOK_SHARE_POST, TIKTOK_REFERRAL_SHORT_LINK, TIKTOK_REFERRAL_AD, ZALO_GIF, RCS_TEXT_WITH_PDF, TEXT, IMAGE, LOCATION, TEMPLATE, AUDIO, VOICE, VIDEO, DOCUMENT, CONTACT, VOICE_CALL, VIDEO_CALL, CALL, BUTTON, TYPING_INDICATOR, LIST_PICKER, FILE, LIST_PICKER_RESPONSE, POSTBACK, SURVEY_REQUEST, SURVEY_RESPONSE, FACEBOOK_TEMPLATE, PRE_CHAT_FORM, LC_FORM_RESPONSE, LC_QUICK_REPLY, LC_CAROUSEL, LIVE_CHAT_KNOWLEDGE_BASE_ARTICLE, LIVE_CHAT_KNOWLEDGE_BASE_SEARCH, TEXT_WITH_BUTTON, TEXT_WITH_IMAGE_AND_BUTTON, ABC_MULTI_TYPE, CARD, SUGGESTION_RESPONSE, CAROUSEL, LINE_TEMPLATE, TEXT_WITH_SUGGESTION, EMAIL, RICH_LINK, TIME_PICKER, TIME_PICKER_RESPONSE, BUTTON_RESPONSE, WHATSAPP_STICKER, VIBER_STICKER, INSTAGRAM_STICKER, INSTAGRAM_TEMPLATE, CALL_FILE, CALL_TRANSCRIPT, CALL_HANGUP, CALL_START, ABC_CUSTOM_INTERACTIVE_CONTENT, APPLE_PAY_REQUEST_CONTENT, QUICK_REPLY, APPLE_AUTH_REQUEST_CONTENT, APPLE_CUSTOM_INTERACTIVE_CONTENT, BUTTON_LIST, SHARE, INTERACTIVE, KAKAO_SANGDAM_SESSION_EXPIRED, INTERACTIVE_BUTTON_REPLY, INTERACTIVE_LIST_REPLY, WHATSAPP_PRODUCT, WHATSAPP_MULTI_PRODUCT, PRODUCT, APPLE_QUICK_REPLY_CONTENT, APPLE_FORM_CONTENT, ROADSIDE_ASSISTANCE, FORM_RESPONSE, ORDER, LINE_POSTBACK_EVENT, INTERACTIVE_FLOW_REPLY, RCS_TEXT, RCS_FILE, RCS_CARD, RCS_CAROUSEL, PRIVATE_REPLY_TO_SOCIAL_COMMENT, CUSTOM_DATA, WHATSAPP_CALL_PERMISSION_REPLY