| Call | Does |
|---|---|
| run({ input }) | Starts a run and returns it. |
| runs() | Its run history. |
| runStep(id, context) | Runs one step alone, changing nothing. |
| update(patch) | Changes it. Revalidated whole. |
| destroy() | Deletes it. |
idstringIts identifier.
dataobjectThe definition: name, trigger, steps, edges.
The usual sequence
const workflow = await api.workflows.create(definition);
await workflow.runStep("write", { input: { since: "2026-10-01" } }); // try one step
const run = await workflow.run({ input: { since: "2026-10-01" } }); // then the chain
await run.wait();workflow = api.workflows.create(definition)
workflow.run_step("write", input={"since": "2026-10-01"}) # try one step
run = workflow.run(input={"since": "2026-10-01"}) # then the chain
run.wait()Test a step before deploying a chain
runStep() runs one step with whatever context you give it and changes no run. It is far cheaper than discovering at the fifth step that the second one produced the wrong shape.
The object updates itself
update() replaces data on the object with what came back, so the instance you hold stays current.