Skip to navigation
REST ClientFabricCall Flows

update

View as MarkdownOpen in Claude

Replace a call flow resource. Uses PUT for full replacement.

Path parameters

idstringRequiredformat: "uuid"
Unique ID of a Call Flow.

Request

titlestringRequired
The name of the Call Flow. Required on every update, and must not match the name of any Call Flow in the project, including this one. Omitting `title` or resending the current name is rejected with a `422`.
document_versionintegerRequired
The revision number for this update. Must equal the Call Flow's current `document_version` plus one; any other value is rejected with an `out_of_sync` error.
flow_dataobjectOptional
Call Flow Builder state, stored as an opaque JSON object. Omit to keep the current value; an empty object is rejected. If the Call Flow has no stored value yet, you must send one.
relaymlobjectOptional
The calling SWML document this Call Flow should execute. Uses [calling SWML methods](/docs/swml/reference/calling). Omit to keep the current document; an empty object is rejected. If the Call Flow has no stored document yet, you must send one.

Response

idstringRequiredformat: "uuid"
Unique ID of the Call Flow.
project_idstringRequiredformat: "uuid"
Unique ID of the Project.
display_namestringRequired
Display name of the Call Flow Fabric Resource
typeenumRequired
Type of the Fabric Resource
Allowed values:
created_atdatetimeRequired
Date and time when the resource was created.
updated_atdatetimeRequired
Date and time when the resource was updated.
call_flowobjectRequired
Call Flow data.

Response Example

Response
{
"id": "993ed018-9e79-4e50-b97b-984bd5534095",
"project_id": "1313fe58-5e14-4c11-bbe7-6fdfa11fe780",
"display_name": "Updated Welcome Call Flow",
"type": "call_flow",
"created_at": "2024-05-06T12:20:00Z",
"updated_at": "2024-05-06T12:25:00Z",
"call_flow": {
"id": "993ed018-9e79-4e50-b97b-984bd5534095",
"title": "Updated Welcome Call Flow",
"flow_data": {},
"relayml": {
"sections": {
"main": [
{
"play": {
"url": "https://cdn.signalwire.com/swml/audio.mp3"
}
}
]
},
"version": "1.0.0"
},
"document_version": 2
}
}

Example

from signalwire.rest import RestClient
client = RestClient(
project="your-project-id",
token="your-api-token",
host="your-space.signalwire.com",
)
updated = client.fabric.call_flows.update("flow-id", title="Updated IVR Flow")
print(f"Updated: {updated['display_name']}")