Update Workflow
Replace a workflow’s typed graph atomically — echo persistent_id to keep field identity across renames
{name, description, nodes, edges} sub-shape of GET /v3/workflows/{workflow_id}/ — the intended loop is GET → mutate → PATCH.
Each update mints a new workflow version; previous versions remain available for historical runs. There is no PUT in v3.
Field identity: persistent_id
Every field in the GET response carries a server-assigned persistent_id. When you PATCH:
- Echo
persistent_idunchanged — including when you rename the field — and the field keeps its identity: analytics history, ground truth, and quality metrics stay attached. - Omit it only for brand-new fields; the server assigns one. A field without
persistent_idis always treated as new — name coincidence with a prior field does not confer identity, so omitting it on an existing field replaces that field with a fresh one and detaches its history. - An echoed
persistent_idthat doesn’t match any field in the current version is rejected with400. - Sending back an unchanged graph cuts no new version.
persistent_ids just assigned to new fields — so the result can be edited and PATCHed again. The echoed graph is this request’s own write result, never the state left by a concurrent update.
400 TOPOLOGY_INVALID (same contract as Create workflow); the stored workflow is untouched.Authorizations
API key issued from app.anyformat.ai/api-key. Send as Authorization: Bearer <key>.
Path Parameters
Body
Public-surface workflow update body — full replacement of the typed graph.
Echo each existing field's persistent_id (from GET) unchanged —
including across renames — to keep the field's identity; omit it for
new fields. Thin subclass for OpenAPI naming (WorkflowUpdateRequest).
Behaviour is fully inherited from WorkflowDefinition in
anyformat.workflow.
1"Invoice or receipt"
1- ParseNode
- ClassifyNode
- SplitterNode
- ExtractNode
- ValidateNode
Response
Successful Response
A workflow with its complete typed graph inline.
{name, description, nodes, edges} is the exact shape
POST /v3/workflows/ accepts — mutate it and feed it back to edit.
Unique identifier of the workflow (hyphenated UUID).
"0686bb97-8c30-70f0-8000-97669e000eb8"
Human-readable name of the workflow.
"Invoice Processing"
Typed graph nodes (parse / classify / splitter / extract / validate).
- ParseNode
- ClassifyNode
- SplitterNode
- ExtractNode
- ValidateNode
Optional description of what this workflow extracts.
"A workflow for processing invoices and retrieving invoice details."
Timestamp when the workflow was created (ISO 8601).
Timestamp when the workflow was last modified (ISO 8601).
Directed edges between the graph nodes.
