Workflows

Update a workflow

PUT
/api/workflows/{id}

Updates editable fields on a Workflow scoped to the caller organization. Nodes, edges, viewport, name, description, and enabled flag are all replaceable. Renames must keep the name unique within the organization.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Partial update - only the supplied fields are written; omitted fields are left untouched.

Response Body

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com/api/workflows/string" \  -H "Content-Type: application/json" \  -d '{    "commandKey": "workflow-save-01J2YQ8V6C4Y2QJ58C2HNGK4F1",    "expectedRevision": 2,    "expectedGraphVersion": 2,    "name": "New Lead Welcome (v2)",    "description": "Greet new leads, assign an agent, and create a follow-up task.",    "enabled": true  }'
{  "success": true,  "message": "Workflow created successfully",  "data": {    "_id": "64d2f9c5e8a1d4e001a0b1c2",    "name": "New Lead Welcome",    "description": "Greet new leads and assign them to a leasing agent.",    "organizationId": "64a1b2c3d4e5f60012345678",    "userId": "64a1b2c3d4e5f60012345679",    "nodes": [],    "edges": [],    "viewport": {      "x": 0,      "y": 0,      "zoom": 1    },    "enabled": false,    "createdAt": "2026-04-12T14:22:10.000Z",    "updatedAt": "2026-04-12T14:22:10.000Z"  }}