deployVersion

View as MarkdownOpen in Claude

Deploy a specific version of a call flow resource.

Path parameters

idstringRequired
The unique identifier of the Call Flow.

Request

Deploy by document versionobjectRequired
OR
Deploy by version IDobjectRequired

Response

idstringRequiredformat: "uuid"
The unique identifier of the deployed Call Flow Version.
created_atstringRequired
The creation timestamp.
updated_atstringRequired
The last update timestamp.
document_versionintegerRequired
The document version.
flow_dataobjectOptional
Call Flow Builder state, stored as an opaque JSON object.
relaymlobjectOptional
The calling SWML document deployed by this version. Uses [calling SWML methods](/docs/swml/reference/calling).

Response Example

Response
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"created_at": "2024-05-06T12:20:00Z",
"updated_at": "2024-05-06T12:25:00Z",
"document_version": 2,
"flow_data": {},
"relayml": {
"sections": {
"main": [
{
"play": {
"url": "https://cdn.signalwire.com/swml/audio.mp3"
}
}
]
},
"version": "1.0.0"
}
}

Example

import { RestClient } from "@signalwire/sdk";
const client = new RestClient({
project: "your-project-id",
token: "your-api-token",
host: "your-space.signalwire.com"
});
const result = await client.fabric.callFlows.deployVersion("call-flow-id", {
call_flow_version_id: "version-id",
});
console.log(`Deployed version: ${result.id}`);