For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Log inSign up
Support
  • Core
    • Overview
    • Authorization
    • Base URL
    • Data formats
    • Paging
    • Error codes
    • Permissions
  • Calling
  • Datasphere
  • Logs
  • Messaging
  • Phone Number Management
  • Platform
  • Resource Management
      • POSTCreate SWML Script
      • DELDelete SWML Script
      • GETGet SWML Script
      • GETList SWML Script Addresses
      • GETList SWML Scripts
      • PUTUpdate SWML Script
LogoLogoSignalWire Docs
Log inSign up
Support
Resource ManagementSWML Scripts

Update SWML Script

|View as Markdown|Open in Claude|
PUT
https://{your_space_name}.signalwire.com/api/fabric/resources/swml_scripts/:id
PUT
/api/fabric/resources/swml_scripts/:id
$curl -X PUT https://{your_space_name}.signalwire.com/api/fabric/resources/swml_scripts/id \
> -H "Content-Type: application/json" \
> -u "<project_id>:<api_token>" \
> -d '{}'
1{
2 "id": "993ed018-9e79-4e50-b97b-984bd5534095",
3 "project_id": "1313fe58-5e14-4c11-bbe7-6fdfa11fe780",
4 "display_name": "Welcome Script",
5 "type": "swml_script",
6 "created_at": "2024-05-06T12:20:00Z",
7 "updated_at": "2024-05-06T12:20:00Z",
8 "swml_script": {
9 "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
10 "display_name": "Booking Assistant",
11 "script_type": "calling",
12 "request_url": "https://example.com/swml_script",
13 "contents": {
14 "version": "1.0.0",
15 "sections": {
16 "main": [
17 {
18 "denoise": {},
19 "play": {
20 "url": "https://cdn.signalwire.com/swml/audio.mp3"
21 }
22 }
23 ]
24 }
25 },
26 "status_callback_url": "https://website.com/status",
27 "status_callback_method": "POST"
28 }
29}
Updates a SWML Script by ID #### 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](/docs/platform/your-signalwire-api-space).
Was this page helpful?
Previous

SWML inbound call webhook

Next
Built with

Updates a SWML Script by ID

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.

Authentication

AuthorizationBasic
SignalWire Basic Authentication using Project ID and API Token. The client sends HTTP requests with the Authorization header containing the word Basic followed by a space and a base64-encoded string of project_id:token. The project ID will be used as the username and the API token as the password. Example: ``` Authorization: Basic base64(project_id:token) ```

Path parameters

idstringRequiredformat: "uuid"
Unique ID of a SWML Script.

Request

This endpoint expects an object.
Update Calling ScriptobjectRequired

Request body to update an existing calling SWML Script. All fields are optional — include only what you want to change.

OR
Update Messaging ScriptobjectRequired

Request body to update an existing messaging SWML Script. All fields are optional — include only what you want to change.

Response

The request has succeeded.
idstringformat: "uuid"
Unique ID of the SWML Script.
project_idstringformat: "uuid"
Unique ID of the Project.
display_namestring
Display name of the SWML Script Fabric Resource
typeenum
Type of the Fabric Resource
Allowed values:
created_atdatetime
Date and time when the resource was created.
updated_atdatetime
Date and time when the resource was updated.
swml_scriptobject
SWML Script data.

Errors

401
Unauthorized Error
404
Not Found Error
422
Unprocessable Entity Error
500
Internal Server Error

SignalWire Basic Authentication using Project ID and API Token.

The client sends HTTP requests with the Authorization header containing the word Basic followed by a space and a base64-encoded string of project_id:token. The project ID will be used as the username and the API token as the password.

Example:

Authorization: Basic base64(project_id:token)