curl --request POST \
--url https://api.messaging.phonovation.com/ccaas/voice/2/waiting-strategies \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Test Sender Waiting Strategy",
"maximumWaitTime": {
"unit": "SECONDS",
"value": 5
},
"greetingMessage": {
"enabled": true,
"audioSourceType": "TTS",
"ttsAudioSource": {
"text": "Greetings!",
"language": "en-gb",
"voice": {
"name": "Emma",
"gender": "FEMALE"
},
"speechRate": 1
},
"fileAudioSource": null
},
"musicOnHold": {
"enabled": false,
"fileAudioSource": null
},
"announcementMessage": {
"enabled": true,
"audioSourceType": "TTS",
"ttsAudioSource": {
"text": "Greetings!",
"language": "en-gb",
"voice": {
"name": "Emma",
"gender": "FEMALE"
},
"speechRate": 1
},
"fileAudioSource": null,
"repeatInterval": {
"unit": "SECONDS",
"value": 3
}
},
"maximumWaitTimeMessage": {
"enabled": true,
"audioSourceType": "TTS",
"ttsAudioSource": {
"text": "Greetings!",
"language": "en-gb",
"voice": {
"name": "Emma",
"gender": "FEMALE"
},
"speechRate": 1
},
"fileAudioSource": null
},
"conditionType": "SENDER",
"condition": {
"senders": [
{
"clientType": "PSTN",
"identifier": "123456789"
},
{
"clientType": "WEBRTC",
"identifier": "conversations"
}
]
}
}
'{
"id": "e2cea358-0347-4d23-9d82-af00f8f5c5b2",
"name": "Test Sender Waiting Strategy",
"maximumWaitTime": {
"unit": "SECONDS",
"value": 5
},
"greetingMessage": {
"enabled": true,
"audioSourceType": "TTS",
"ttsAudioSource": {
"text": "Greetings!",
"language": "en-gb",
"voice": {
"name": "Emma",
"gender": "FEMALE"
},
"speechRate": 1
},
"fileAudioSource": null
},
"musicOnHold": {
"enabled": false,
"fileAudioSource": null
},
"announcementMessage": {
"enabled": true,
"audioSourceType": "TTS",
"ttsAudioSource": {
"text": "Greetings!",
"language": "en-gb",
"voice": {
"name": "Emma",
"gender": "FEMALE"
},
"speechRate": 1
},
"fileAudioSource": null,
"repeatInterval": {
"unit": "SECONDS",
"value": 3
}
},
"maximumWaitTimeMessage": {
"enabled": true,
"audioSourceType": "TTS",
"ttsAudioSource": {
"text": "Greetings!",
"language": "en-gb",
"voice": {
"name": "Emma",
"gender": "FEMALE"
},
"speechRate": 1
},
"fileAudioSource": null
},
"senders": [
{
"clientType": "PSTN",
"identifier": "123456789"
},
{
"clientType": "WEBRTC",
"identifier": "conversations"
}
],
"conditionType": "SENDER",
"condition": {
"senders": [
{
"clientType": "PSTN",
"identifier": "123456789"
},
{
"clientType": "WEBRTC",
"identifier": "conversations"
}
]
},
"createdAt": "2022-12-10T13:45:00.777+0000",
"updatedAt": "2022-12-10T13:45:00.777+0000"
}Create waiting strategy
Use this method to add a new waiting strategy. To upload an audio file and get value for fileDescriptor field, use Upload audio files endpoint. More info.
Required scope: Enable one of: conversations:manage.
curl --request POST \
--url https://api.messaging.phonovation.com/ccaas/voice/2/waiting-strategies \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Test Sender Waiting Strategy",
"maximumWaitTime": {
"unit": "SECONDS",
"value": 5
},
"greetingMessage": {
"enabled": true,
"audioSourceType": "TTS",
"ttsAudioSource": {
"text": "Greetings!",
"language": "en-gb",
"voice": {
"name": "Emma",
"gender": "FEMALE"
},
"speechRate": 1
},
"fileAudioSource": null
},
"musicOnHold": {
"enabled": false,
"fileAudioSource": null
},
"announcementMessage": {
"enabled": true,
"audioSourceType": "TTS",
"ttsAudioSource": {
"text": "Greetings!",
"language": "en-gb",
"voice": {
"name": "Emma",
"gender": "FEMALE"
},
"speechRate": 1
},
"fileAudioSource": null,
"repeatInterval": {
"unit": "SECONDS",
"value": 3
}
},
"maximumWaitTimeMessage": {
"enabled": true,
"audioSourceType": "TTS",
"ttsAudioSource": {
"text": "Greetings!",
"language": "en-gb",
"voice": {
"name": "Emma",
"gender": "FEMALE"
},
"speechRate": 1
},
"fileAudioSource": null
},
"conditionType": "SENDER",
"condition": {
"senders": [
{
"clientType": "PSTN",
"identifier": "123456789"
},
{
"clientType": "WEBRTC",
"identifier": "conversations"
}
]
}
}
'{
"id": "e2cea358-0347-4d23-9d82-af00f8f5c5b2",
"name": "Test Sender Waiting Strategy",
"maximumWaitTime": {
"unit": "SECONDS",
"value": 5
},
"greetingMessage": {
"enabled": true,
"audioSourceType": "TTS",
"ttsAudioSource": {
"text": "Greetings!",
"language": "en-gb",
"voice": {
"name": "Emma",
"gender": "FEMALE"
},
"speechRate": 1
},
"fileAudioSource": null
},
"musicOnHold": {
"enabled": false,
"fileAudioSource": null
},
"announcementMessage": {
"enabled": true,
"audioSourceType": "TTS",
"ttsAudioSource": {
"text": "Greetings!",
"language": "en-gb",
"voice": {
"name": "Emma",
"gender": "FEMALE"
},
"speechRate": 1
},
"fileAudioSource": null,
"repeatInterval": {
"unit": "SECONDS",
"value": 3
}
},
"maximumWaitTimeMessage": {
"enabled": true,
"audioSourceType": "TTS",
"ttsAudioSource": {
"text": "Greetings!",
"language": "en-gb",
"voice": {
"name": "Emma",
"gender": "FEMALE"
},
"speechRate": 1
},
"fileAudioSource": null
},
"senders": [
{
"clientType": "PSTN",
"identifier": "123456789"
},
{
"clientType": "WEBRTC",
"identifier": "conversations"
}
],
"conditionType": "SENDER",
"condition": {
"senders": [
{
"clientType": "PSTN",
"identifier": "123456789"
},
{
"clientType": "WEBRTC",
"identifier": "conversations"
}
]
},
"createdAt": "2022-12-10T13:45:00.777+0000",
"updatedAt": "2022-12-10T13:45:00.777+0000"
}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
Body
Duration information.
Show child attributes
Show child attributes
Defines which waiting strategy entity the condition applies to. Once defined, cannot be changed.
SENDER, QUEUE Defines how the 'condition' field is built, e.g., if 'SENDER', the condition is an object with an array of senders.
Waiting strategy name.
1 - 128File audio source or TTS audio source information.
Show child attributes
Show child attributes
File audio source information.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
File audio source or TTS audio source information.
Show child attributes
Show child attributes
Response
OK
Unique id of the waiting strategy.
Waiting strategy name.
Duration information.
Show child attributes
Show child attributes
File audio source or TTS audio source information.
Show child attributes
Show child attributes
File audio source information.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
File audio source or TTS audio source information.
Show child attributes
Show child attributes
File audio source or TTS audio source information.
Show child attributes
Show child attributes
Defines which waiting strategy entity the condition applies to. Once defined, cannot be changed.
SENDER, QUEUE Defines how the 'condition' field is built, e.g., if 'SENDER', the condition is an object with an array of senders.
Time at which the waiting strategy was created.
Time stamp when waiting strategy is updated.