SVAML (Sinch Voice API Markup Language) is a JSON-based markup language used to define call flows and control the behavior of voice calls in the Sinch Voice API. It allows developers to specify commands that dictate how calls are handled, including dialing, playing messages, gathering input, and more.
SVAML is used in various contexts within the Voice API, including:
- Call Creation: When initiating outbound calls via the API.
- Webhooks: When responding to call events with commands to control the ongoing call flow.
- Batch Calls: When defining call flows for multiple calls in a batch operation.
This endpoint is useful for understanding the structure and flow of a SVAML payload without executing it. It provides a detailed description of the commands, events, and messages defined in the SVAML.
Security
BasicAuth or SinchOAuth2
- Endpoint which enables consuming the Voice API globally - Redirected by Sinch to the closest region.https://voice.api.sinch.com/v2/projects/{projectId}/svaml/describe
- North America 1 - Easthttps://us1.voice.api.sinch.com/v2/projects/{projectId}/svaml/describe
- South America 1 - Easthttps://br1.voice.api.sinch.com/v2/projects/{projectId}/svaml/describe
- Europe 1 - Centralhttps://eu1.voice.api.sinch.com/v2/projects/{projectId}/svaml/describe
- Asia Pacific 1 - Southeasthttps://sg1.voice.api.sinch.com/v2/projects/{projectId}/svaml/describe
- https://au1.voice.api.sinch.comhttps://au1.voice.api.sinch.com/v2/projects/{projectId}/svaml/describe
curl -i -X POST \
-u '<username>:<password>' \
'https://voice.api.sinch.com/v2/projects/{projectId}/svaml/describe' \
-H 'Content-Type: application/json' \
-d '{
"svaml": {
"callName": "incoming",
"commands": [
{
"command": "answer"
},
{
"command": "messages",
"messages": [
{
"type": "SAY",
"say": {
"text": "Welcome to ACME support.",
"voiceName": "Emma_3"
}
}
]
}
]
}
}'Response
{ "description": "The call is answered and a TTS message is played using the voice Emma_3." }