Update SWML Script
PUT/resources/swml_scripts/:id
Updates a SWML Script by ID.
Request
Path Parameters
id uuidrequired
The ID of the SWML Script
- application/json
Body
required
namestring
Example:
Booking Assistant
contentsstring
A SWML document. For more information on SWML, please go to https://developer.signalwire.com/swml
Example:
{"version":"1.0.0","sections":{"main":[{"play":"say:Hello from SignalWire!"}]}}
Responses
- 200
- 422
A SWML Script
- application/json
- Schema
- Example (from schema)
Schema
iduuid
Example:
993ed018-9e79-4e50-b97b-984bd5534095
project_iduuid
Example:
1313fe58-5e14-4c11-bbe7-6fdfa11fe780
display_namestring
Example:
Reception
typestring
Example:
swml_script
created_atdate-time
Example:
2024-01-02T00:00:00Z
updated_atdate-time
Example:
2024-01-02T00:00:00Z
swml_script
object
iduuid
A unique identifier for the SWML Script
contentsstring
A SWML document. For more information on SWML, please go to https://developer.signalwire.com/swml
Example:
{"version":"1.0.0","sections":{"main":[{"play":"say:Hello from SignalWire!"}]}}
request_urluri
Example:
https://example.signalwire.com/relay-bins/2537c89e-2606-48c2-b3c2-bb601d863d1e
display_namestring
Example:
Booking Assistant
{
"id": "993ed018-9e79-4e50-b97b-984bd5534095",
"project_id": "1313fe58-5e14-4c11-bbe7-6fdfa11fe780",
"display_name": "Reception",
"type": "swml_script",
"created_at": "2024-01-02T00:00:00Z",
"updated_at": "2024-01-02T00:00:00Z",
"swml_script": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"contents": {
"version": "1.0.0",
"sections": {
"main": [
{
"play": "say:Hello from SignalWire!"
}
]
}
},
"request_url": "https://example.signalwire.com/relay-bins/2537c89e-2606-48c2-b3c2-bb601d863d1e",
"display_name": "Booking Assistant"
}
}
Unprocessable Entity
- application/json
- Schema
- Example (from schema)
Schema
typestringrequired
codestringrequired
messagestringrequired
attributestring
urlurirequired
{
"type": "validation_error",
"code": "invalid_parameter",
"message": "Name must be present",
"attribute": "name",
"url": "https://developer.signalwire.com/rest/signalwire-rest/overview/error-codes#invalid_parameter"
}