SWML Scripts
Create SWML Script
Creates a SWML Script
Permissions
The API token used to authenticate must have the following scope(s) enabled to make a successful request: Voice, Messaging, Fax, or Video.
Learn more about API scopes.
post/api/fabric/resources/swml_scripts
Request body
Example request
{
"name": "Welcome Script",
"script_type": "calling",
"contents": {
"sections": {
"main": [
{
"answer": {
"max_duration": 3600,
"codecs": "PCMU,PCMA,OPUS",
"username": "user123",
"password": "securepassword"
}
}
]
}
},
"status_callback_url": "https://example.com/status"
}Response
The request has succeeded.