Skip to main content

Workflow

Workflows define stages and actions used to track pipeline progress.

📄️ Get Workflow

Retrieves one workflow by `workflowId`, including its stages, actions, visibility, and preferences. The workflow must be visible to you (through one of your teams or roles, your company, or because it has no visibility restriction) unless it is the company's only active workflow or you have company-wide `workflow:manage` permission. Terros staff can get any company's workflow. `rollback` summarizes account rollback: whether it is enabled, its target and protected stages, default stage, and allowed roles. Use `/workflow/list` to discover workflow IDs.

📄️ List Workflows

Lists the workflows in the authenticated company. Workflows visible to you (through your teams or roles, your company, or because they have no visibility restriction) are returned in `workflows` and the rest in `readonly`; users with company-wide `workflow:manage` permission see all of them in `workflows`. Archived workflows are excluded unless `archived` is set. Terros staff signed in as themselves can set `companyId` to list another company's workflows; anyone else gets a `NotAuthorized` error, and an unknown `companyId` gets `NotFound`. Use `/workflow/get` for a single workflow by ID.

📄️ Update Workflow

Updates an existing workflow definition. Send `workflow.workflowId` plus only the fields to change; omitted fields keep their saved value. `workflow.stages` and `workflow.actions` replace the saved lists when sent, so send every stage or action, typically edited from `/workflow/get`. Setting a stage’s `aiConfig.flagRecordings` to true flags recordings made at a location with an account in that stage and ignores AI classification (`aiConfig.enabled`) for that stage; omitted or false is off. To change some actions only, send them in `changedActions` instead: each replaces the saved action with the same `actionId`. Set `dryRun` to validate and see `changes` (each changed field with its `before` and `after`) without saving; the response always includes `changes`. `isMigrated` cannot be changed here. Requires the `workflow:manage` permission on the company or on one of the teams the workflow is visible to; changing `visibleTo` on a versioned workflow requires company-wide permission. Use `/workflow/add` to create a new workflow.