v77

latestOpenAPI 3.1.0MITraw.githubusercontent.com2026-08-012528701.8 MB
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

OR

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.

idstring uuid required

Universal Unique Identifier.

project_idstring uuid required

Universal Unique Identifier.

display_namestring required

Display name of the SWML Script Fabric Resource

type'swml_script' required

Type of the Fabric Resource

created_atstring date-time required

Date and time when the resource was created.

updated_atstring date-time required

Date and time when the resource was updated.