Workflows
Create, toggle, and run workflows via the API.
The workflow object#
A workflow is a named graph. The graph holds { nodes, edges }; kind is automation (default) or crew.
{
"id": "uuid",
"name": "Urgent issues → Slack",
"graph": { "nodes": [...], "edges": [...] },
"kind": "automation",
"is_active": true,
"workspace_id": "uuid",
"created_at": "...",
"updated_at": "..."
}List & read#
GET /api/v1/workflows/ # list (optional ?kind=)
GET /api/v1/workflows/with-stats # + status, run count, last/next run
GET /api/v1/workflows/{workflow_id} # one workflowCreate#
name is required; graph defaults to empty. Returns 201 with the created workflow.
POST /api/v1/workflows/
{
"name": "Daily standup digest",
"description": "Summarise GitHub activity to Slack",
"graph": { "nodes": [...], "edges": [...] },
"kind": "automation"
}Update & version#
PUT /workflows/{id} replaces the workflow. When the graph changes, RunMyCrew auto-snapshots the previous version so you can roll back:
GET /api/v1/workflows/{id}/versions
POST /api/v1/workflows/{id}/versions/{version_id}/restoreRun#
Trigger a manual run. Optionally override the graph or pass input data. Returns the new execution id — poll it via the Runs API.
POST /api/v1/workflows/{workflow_id}/run
{ "input_data": { "issue": 4821 } }
# → { "execution_id": "uuid" }Toggle, duplicate, delete#
PATCH /api/v1/workflows/{id}/toggle # flip is_active
POST /api/v1/workflows/{id}/duplicate # deep copy
DELETE /api/v1/workflows/{id} # 204
PATCH /api/v1/workflows/batch # reorder / move between folders