Skip to content
LogoLogo

Workflow API

POST {STUDIO_URL}/api/rpc/workflows.<procedure>

Procedures

GroupProceduresNeeds
Lifecyclecreate get list update updateGraph publish pause resume delete versions.getworkflow: create to create; Viewer to read; Editor to change, publish, pause, resume; Admin to delete
Runsruns.create runs.get runs.list runs.listAll runs.listNodes runs.getNodeResult runs.stream runs.cancel runs.resumeViewer to read; Editor to start, cancel, resume
Approvalsapprovals.listMine approvals.listHandled approvals.get approvals.answerBeing an approver on the step
Schedulesschedules.list schedules.get schedules.history (read only; last 7 days by default)Viewer
App accountstoolkits.list toolkits.bind toolkits.unbindViewer (your own accounts)
Sharingsharing.share sharing.unshare sharing.grants sharing.searchCandidatesAdmin
AssistantassistantAny member

Start a run and wait for the result

const run = await client.workflows.runs.create({
  workflowId,
  input: { invoiceId: "INV-2041" },
  requestIdempotencyKey: uuidv7(),
  wait: "result", // hold the call up to 30 s; "none" returns at once
});
  • Runs the published version unless you pass a versionId.
  • input is checked against the Trigger's declared inputs.
  • Repeating the same requestIdempotencyKey returns the same run.

Follow progress

for await (const event of client.workflows.runs.stream({
  workflowId,
  runId: run.id,
})) {
  console.log(event); // step and run status changes, no item data
}
 
const result = await client.workflows.runs.getNodeResult({
  workflowId,
  runId: run.id,
  nodeId,
  iteration: 0,
}); // a step's input and output items

Answer an approval

await client.workflows.approvals.answer({
  runId,
  nodeId,
  iteration: 0,
  decision: "approved",
  fields: { reason: "Within policy" },
});

Filters on runs.list / runs.listAll

status[] (RUNNING, SUSPENDED, SUCCEEDED, FAILED, CANCELLED), triggerType[] (MANUAL, SCHEDULE, WORKFLOW), from, to, plus cursor and limit (1–100, default 50).

Pause and resume

workflows.pause stops a workflow's schedules from firing, an emergency stop; workflows.resume turns them back on. Both need Editor. These are API only for now; there is no button in the builder yet.