curl --request GET \
--url https://api.messaging.phonovation.com/ccaas/1/templates/{templateId} \
--header 'Authorization: <api-key>'import requests
url = "https://api.messaging.phonovation.com/ccaas/1/templates/{templateId}"
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/{templateId}");
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/{templateId}")
.header("Authorization", "<api-key>")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.messaging.phonovation.com/ccaas/1/templates/{templateId}",
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/{templateId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "c4391685-b21a-4c21-a470-5453e9382752",
"name": "Template name",
"language": "English",
"languageCode": "en",
"channel": "SMS",
"external": false,
"content": "Simple text content",
"createdAt": "2024-01-01T00:00:00.000+00:00",
"updatedAt": "2024-01-01T00:00:00.000+00:00",
"tags": [
{
"name": "Template tag",
"createdAt": "2024-12-10T00:00:00.000+00:00",
"updatedAt": "2024-12-10T00:00:00.000+00:00"
}
],
"attachments": []
}{
"requestError": {
"serviceException": {
"messageId": "UNAUTHORIZED",
"text": "Unauthorized"
}
}
}{
"requestError": {
"serviceException": {
"messageId": "FORBIDDEN",
"text": "Forbidden"
}
}
}{
"requestError": {
"serviceException": {
"messageId": "NOT_FOUND",
"text": "Invalid id 'e43bc422-09c9-4591-8b9d-82debcf04e0d' given! No such entity exists."
}
}
}{
"requestError": {
"serviceException": {
"messageId": "GENERAL_ERROR",
"text": "Something went wrong. Please contact support."
}
}
}Get template
Use this method to get a single template. More info
Required scope: Enable one of: conversations:manage, conversations:read.
curl --request GET \
--url https://api.messaging.phonovation.com/ccaas/1/templates/{templateId} \
--header 'Authorization: <api-key>'import requests
url = "https://api.messaging.phonovation.com/ccaas/1/templates/{templateId}"
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/{templateId}");
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/{templateId}")
.header("Authorization", "<api-key>")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.messaging.phonovation.com/ccaas/1/templates/{templateId}",
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/{templateId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "c4391685-b21a-4c21-a470-5453e9382752",
"name": "Template name",
"language": "English",
"languageCode": "en",
"channel": "SMS",
"external": false,
"content": "Simple text content",
"createdAt": "2024-01-01T00:00:00.000+00:00",
"updatedAt": "2024-01-01T00:00:00.000+00:00",
"tags": [
{
"name": "Template tag",
"createdAt": "2024-12-10T00:00:00.000+00:00",
"updatedAt": "2024-12-10T00:00:00.000+00:00"
}
],
"attachments": []
}{
"requestError": {
"serviceException": {
"messageId": "UNAUTHORIZED",
"text": "Unauthorized"
}
}
}{
"requestError": {
"serviceException": {
"messageId": "FORBIDDEN",
"text": "Forbidden"
}
}
}{
"requestError": {
"serviceException": {
"messageId": "NOT_FOUND",
"text": "Invalid id 'e43bc422-09c9-4591-8b9d-82debcf04e0d' given! No such entity exists."
}
}
}{
"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
Path Parameters
Id of the template to get.
1Response
OK
List of templates.
Template id.
Template name.
Language used when constructing template content.
Language code used when constructing template content.
Available communication channels
SMS, VIBER, FACEBOOK_MESSENGER, WHATSAPP, RCS, UNKNOWN, EMAIL, LIVE_CHAT, UNUSED, VOICE, VIDEO, APPLE_BUSINESS_CHAT, LINE, GOOGLE_BUSINESS_MESSAGES, TELEGRAM, CALLS, INTERNAL, VIBER_BOT, FACEBOOK_POST, INSTAGRAM_POST, TWITTER_POST, INSTAGRAM_MESSAGING, GOOGLE_PLAY, KAKAO_SANGDAM, TWITTER_DM, WHATSAPP_CALLS, VIBER_CALLS, OPEN_CHANNEL, TIKTOK, ZALO, SMS, VIBER, FACEBOOK_MESSENGER, WHATSAPP, RCS, LIVE_CHAT, LINE, APPLE_BUSINESS_CHAT, TELEGRAM, INSTAGRAM_MESSAGING, KAKAO_SANGDAM, VIBER_BOT, EMAIL Boolean flag that indicates whether the template is external, WhatsApp pre-registered, or internal user-defined. If the flag is true, then the template is WhatsApp pre-registered, otherwise, it is user-defined.
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 Template content.
Timestamp when template was created.
Timestamp when template was updated.
List of template tags.
Show child attributes
Show child attributes
List of template attachments.
Show child attributes
Show child attributes