Skip to content

Payloads

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.

Describe the call flow from the SVAML payload

Request

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
Path
projectIdstring, (uuid)(Project ID)required

The ID of the project.

Example:5c5bf2b1-35ae-4825-ab89-457e07bb60e6
Bodyapplication/json
svamlobject(SVAML Input)required

The SVAML payload to 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"
              }
            }
          ]
        }
      ]
    }
  }'

Responses

SVAML description provided

Bodyapplication/json
descriptionstring

Human-readable description of the call flow.

Response
{ "description": "The call is answered and a TTS message is played using the voice Emma_3." }