SWML Scripts

Retrieves one stored SWML Script by resource ID so you can inspect the instructions used by its calling or messaging handler. Use List SWML Scripts to discover IDs, or a SWML Webhook when instructions must come from your server at request time.

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.

get/api/fabric/resources/swml_scripts/{id}

Request

  • Base URL
    https://{Your_Space_Name}.signalwire.com
  • URL
    https://{Your_Space_Name}.signalwire.com/api/fabric/resources/swml_scripts/{id}
  • Auth
    HTTP basic

Path parameters

idstring uuid required

Universal Unique Identifier.

Unique ID of a SWML Script.

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.

Example response

{
  "display_name": "Welcome Script",
  "type": "swml_script",
  "created_at": "2024-05-06T12:20:00Z",
  "updated_at": "2024-05-06T12:20:00Z",
  "swml_script": {
    "display_name": "Booking Assistant",
    "script_type": "calling",
    "request_url": "https://example.com/swml_script",
    "contents": {
      "version": "1.0.0",
      "sections": {
        "main": [
          {
            "play": {
              "url": "https://cdn.signalwire.com/swml/audio.mp3"
            }
          }
        ]
      }
    },
    "status_callback_url": "https://website.com/status",
    "status_callback_method": "POST"
  }
}

Changes

    • breaking

      the /// response's property type changed from no type to object for status

    • breaking

      the /// response's property type changed from no type to object for status

    • info

      removed from the /// response property allOf list for the response status

    • info

      removed from the /// response property allOf list for the response status

    • info

      added 'unevaluatedProperties' constraint to the /// response property for the status

    • info

      added 'unevaluatedProperties' constraint to the /// response property for the status

    • breaking

      the //////////// response's property type changed from no type to object for status

    • breaking

      the //////////////////////////// response's property type changed from array to no type for status

    • breaking

      the //////////////////////////// response's property type changed from array to no type for status

    • breaking

      the ///////////////////////// response's property type changed from array to no type for status

    • breaking

      the ///////////////////////// response's property type changed from array to no type for status

    • breaking

      the //////////////////////// response's property type changed from array to no type for status

    • breaking

      the //////////////////////// response's property type changed from array to no type for status

    • breaking

      the ///////////////////// response's property type changed from array to no type for status

    • breaking

      the ///////////////////// response's property type changed from array to no type for status

    • breaking

      the //////////////////////////// response's property type changed from array to no type for status

    • breaking

      the //////////////////////////// response's property type changed from array to no type for status

    • breaking

      the ///////////////////////// response's property type changed from array to no type for status

    • breaking

      the ///////////////////////// response's property type changed from array to no type for status

    • breaking

      the //////////////////////// response's property type changed from array to no type for status

    • breaking

      the //////////////////////// response's property type changed from array to no type for status

    • breaking

      the ///////////////////// response's property type changed from array to no type for status

    • breaking

      the ///////////////////// response's property type changed from array to no type for status

    • breaking

      the //////////// response's property type changed from no type to object for status

    • breaking

      the //////////////////////////// response's property type changed from array to no type for status

    • breaking

      the //////////////////////////// response's property type changed from array to no type for status

    • breaking

      the ///////////////////////// response's property type changed from array to no type for status

    • breaking

      the ///////////////////////// response's property type changed from array to no type for status

    • breaking

      the //////////////////////// response's property type changed from array to no type for status

    • breaking

      the //////////////////////// response's property type changed from array to no type for status

    • breaking

      the ///////////////////// response's property type changed from array to no type for status

    • breaking

      the ///////////////////// response's property type changed from array to no type for status

    • breaking

      the //////////////////////////// response's property type changed from array to no type for status

    • breaking

      the //////////////////////////// response's property type changed from array to no type for status

    • breaking

      the ///////////////////////// response's property type changed from array to no type for status

    • breaking

      the ///////////////////////// response's property type changed from array to no type for status

    • breaking

      the //////////////////////// response's property type changed from array to no type for status

    • breaking

      the //////////////////////// response's property type changed from array to no type for status

    • breaking

      the ///////////////////// response's property type changed from array to no type for status

    • breaking

      the ///////////////////// response's property type changed from array to no type for status

    This list may be incomplete.

Some revisions have not been checked yet.