Run workflow
run_workflowRun a workflow now and return the outcome: status, content_type, the workflow's output (decoded as a string; read it per content_type), and a trace_summary of which steps ran. Pass version= to test an unpublished draft (the number returned by create_workflow_version); omit for the published version. For per-block detail when debugging, call get_workflow_run_traces with the returned run_id. A workflow that runs as a chain (continuation) answers with its first run and returns chain: the rest of the job runs in the background as further runs, and its chain_id is this run_id; follow it with list_runs(chain_id) until a run says continues false.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | No | the workflow slug to run (provide this or workflow_id) | |
| input | No | JSON bound as the workflow's $input for this run | |
| version | No | explicit version to run; 0 (default) runs the last published version. To test a draft you just created but have not published, pass the version number returned by create_workflow or create_workflow_version | |
| datafile | No | optional: a datafile slug to bind as the workflow's host context ($datafile / $data) for this run — mirroring how a dynamic endpoint binds one, so you can test a workflow that reads $datafile without wrapping it in an endpoint. Binds the datafile's current stored content (its JSON must be an object). A trailing @latest/@published is ignored. | |
| workflow_id | No | the workflow id to run (provide this or slug) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | No | present only when this run started (or continued) a chain: more runs of this workflow are queued and run in the background | |
| error | No | ||
| output | No | ||
| run_id | Yes | ||
| status | Yes | ||
| message | No | ||
| content_type | Yes | ||
| trace_summary | No | ||
| trace_truncated | No |