curl --request GET \
--url https://api.messaging.phonovation.com/ccaas/voice/2/tts/options/placeholders/{ttsPurpose} \
--header 'Authorization: <api-key>'import requests
url = "https://api.messaging.phonovation.com/ccaas/voice/2/tts/options/placeholders/{ttsPurpose}"
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/voice/2/tts/options/placeholders/{ttsPurpose}");
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/voice/2/tts/options/placeholders/{ttsPurpose}")
.header("Authorization", "<api-key>")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.messaging.phonovation.com/ccaas/voice/2/tts/options/placeholders/{ttsPurpose}",
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/voice/2/tts/options/placeholders/{ttsPurpose}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));[
{
"type": "POSITION_IN_QUEUE",
"sayAs": "DEFAULT",
"placeholderValue": "{{QUEUE_POSITION_DEFAULT}}",
"placeholderPaddingSize": 0,
"requiresSSML": false
},
{
"type": "POSITION_IN_QUEUE",
"sayAs": "ORDINAL",
"placeholderValue": "{{QUEUE_POSITION_ORDINAL}}",
"placeholderPaddingSize": 40,
"requiresSSML": true
}
]{
"status": "ERROR",
"message": "Voice not found."
}{
"requestError": {
"serviceException": {
"messageId": "UNAUTHORIZED",
"text": "Unauthorized"
}
}
}{
"requestError": {
"serviceException": {
"messageId": "FORBIDDEN",
"text": "Forbidden"
}
}
}{
"status": "ERROR",
"message": "Unsupported operation requested"
}{
"requestError": {
"serviceException": {
"messageId": "GENERAL_ERROR",
"text": "Something went wrong. Please contact support."
}
}
}Get supported TTS placeholders for purpose
Use this method to retrieve supported TTS placeholders for specified purpose.
Required scope: Enable one of: conversations:manage, conversations:read.
curl --request GET \
--url https://api.messaging.phonovation.com/ccaas/voice/2/tts/options/placeholders/{ttsPurpose} \
--header 'Authorization: <api-key>'import requests
url = "https://api.messaging.phonovation.com/ccaas/voice/2/tts/options/placeholders/{ttsPurpose}"
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/voice/2/tts/options/placeholders/{ttsPurpose}");
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/voice/2/tts/options/placeholders/{ttsPurpose}")
.header("Authorization", "<api-key>")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.messaging.phonovation.com/ccaas/voice/2/tts/options/placeholders/{ttsPurpose}",
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/voice/2/tts/options/placeholders/{ttsPurpose}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));[
{
"type": "POSITION_IN_QUEUE",
"sayAs": "DEFAULT",
"placeholderValue": "{{QUEUE_POSITION_DEFAULT}}",
"placeholderPaddingSize": 0,
"requiresSSML": false
},
{
"type": "POSITION_IN_QUEUE",
"sayAs": "ORDINAL",
"placeholderValue": "{{QUEUE_POSITION_ORDINAL}}",
"placeholderPaddingSize": 40,
"requiresSSML": true
}
]{
"status": "ERROR",
"message": "Voice not found."
}{
"requestError": {
"serviceException": {
"messageId": "UNAUTHORIZED",
"text": "Unauthorized"
}
}
}{
"requestError": {
"serviceException": {
"messageId": "FORBIDDEN",
"text": "Forbidden"
}
}
}{
"status": "ERROR",
"message": "Unsupported operation requested"
}{
"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
Purpose for which placeholders will be used in text-to-speech.
WAITING_STRATEGY_GREETING_MESSAGE, WAITING_STRATEGY_ANNOUNCEMENT_MESSAGE, WAITING_STRATEGY_MAXIMUM_WAIT_TIME_MESSAGE, WORKING_HOURS_AWAY_MESSAGE, TRANSFER_STRATEGY_MESSAGE, ON_HOLD_MESSAGE, CALLBACK_CONFIRMATION_MESSAGE, WAITING_STRATEGY_GREETING_MESSAGE, WAITING_STRATEGY_ANNOUNCEMENT_MESSAGE, WAITING_STRATEGY_MAXIMUM_WAIT_TIME_MESSAGE, WORKING_HOURS_AWAY_MESSAGE, TRANSFER_STRATEGY_MESSAGE, ON_HOLD_MESSAGE, CALLBACK_CONFIRMATION_MESSAGE Response
OK
Placeholder type. Determines the purpose of the placeholder.
POSITION_IN_QUEUE, POSITION_IN_QUEUE Dictates how resolved value will be spoken when using the placeholder. DEFAULT means that there is no control as to how the value will be spoken and it depends on the TTS engine. ORDINAL means that the value will be spoken as an ordinal number. CARDINAL means that the value will be spoken as a cardinal number.
DEFAULT, ORDINAL, CARDINAL, DEFAULT, ORDINAL, CARDINAL Value to be placed in TTS text field which will be resolved in runtime to an actual value. This value is used to identify the placeholder. For example, {{QUEUE_POSITION_DEFAULT}} is a placeholder for the position in the queue with DEFAULT sayAs option. Here is example Text-to-Speech text: "You are {{QUEUE_POSITION_DEFAULT}} in the queue."
Specifies how many characters will be added by the system in the background to correctly resolve the placeholder. This number is added to current TTS text length and counts toward max TTS text length.
Specifies whether this placeholder requires TTS voice to support SSML.