SWML Scripts
About​
The SWML Resource type is used to create and manage SWML scripts. SWML allows you to write Relay applications using simple statements in a YAML or JSON document.

The Resource selection menu
Details​
A SWML Script Resource has the following details:
- Hosted Scripts
- External URL
Detail | Description |
---|---|
Name Optional | The unique name for the SWML script resource. |
Handle using Optional | Hosted Script is SWML script that will be hosted on SignalWire. |
Primary Script Optional | This is the main SWML script that will run when controlling a call or message. |
Status Change Webhook Optional | As a call or message progresses through the various states of its lifecycle, you can receive updates to your own application. Enter a URL to receive a JSON event when the status of a call or message changes. |
Detail | Description |
---|---|
Name Optional | The unique name for the SWML script resource. |
Handle using Optional | External URL indicates the SWML script lives on a remote server. |
Primary script URL Required | The URL that will respond with a valid SWML script that will run when controlling a call or message. |
Fallback script URL Optional | If the primary script cannot be reached or fails in any way, you can define a fallback script to handle the call or message. Defining a fallback ensures calls and messages are still handled even if your application experiences an issue. |
Status Change Webhook Optional | As a call or message progresses through the various states of its lifecycle, you can receive updates to your own application. Enter a URL to receive a JSON event when the status of a call or message changes. |

Creating a SWML Script Resource
Learn more​
For more information on SWML, please refer to the SWML documentation.