Workflows

Toggle workflow enabled state

PATCH
/api/workflows/{id}/toggle

Sets the workflow's enabled flag (organization-scoped) without modifying the canvas. Disabled workflows are skipped by the trigger system even when their conditions match.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/api/workflows/string/toggle" \  -H "Content-Type: application/json" \  -d '{    "commandKey": "workflow-toggle-01J2YQAX9XTT1F6XHY98BR3V5K",    "expectedRevision": 3,    "enabled": false  }'
{  "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"  }}