//
API Reference
/- Validate a SVAML payload
Describe the call flow from the SVAML payload
Validate a SVAML payload
This endpoint checks the structure and content of the SVAML commands to ensure they conform to the expected schema and rules. It can operate in different validation modes, such as strict or lenient, depending on the requirements.
Security
BasicAuth or SinchOAuth2
Controls how strictly the SVAML payload is validated.
Default:"NORMAL"
| Enum Value | Description |
|---|---|
| NORMAL | Applies the same validation rules used when initiating a call. Unknown or extra properties are ignored. |
| STRICT | Applies stricter validation rules. Returns errors for any properties that are not recognised or not expected in the given context. |
- Endpoint which enables consuming the Voice API globally - Redirected by Sinch to the closest region.https://voice.api.sinch.com/v2/projects/{projectId}/svaml/validate
- North America 1 - Easthttps://us1.voice.api.sinch.com/v2/projects/{projectId}/svaml/validate
- South America 1 - Easthttps://br1.voice.api.sinch.com/v2/projects/{projectId}/svaml/validate
- Europe 1 - Centralhttps://eu1.voice.api.sinch.com/v2/projects/{projectId}/svaml/validate
- Asia Pacific 1 - Southeasthttps://sg1.voice.api.sinch.com/v2/projects/{projectId}/svaml/validate
- https://au1.voice.api.sinch.comhttps://au1.voice.api.sinch.com/v2/projects/{projectId}/svaml/validate
curl -i -X POST \
-u '<username>:<password>' \
'https://voice.api.sinch.com/v2/projects/{projectId}/svaml/validate' \
-H 'Content-Type: application/json' \
-d '{
"validationType": "STRICT",
"svaml": {
"callName": "incoming",
"commands": [
{
"command": "answer"
},
{
"command": "messages",
"messages": [
{
"type": "SAY",
"say": {
"text": "Welcome to ACME support.",
"voiceName": "Emma"
}
}
]
}
]
}
}'Validation performed
true if the submitted SVAML payload passed validation; false if one or more errors were found.
Response
{ "isValid": true }
We'd love to hear from you!
Rate this content: