Edit a Workflow
Replace a workflow’s typed graph in a single atomic transaction
PUT /v2/workflows/{workflow_id}/ accepts the same typed graph shape as POST /v2/workflows/ and replaces the workflow’s definition atomically. Each call mints a new workflow version; earlier versions remain attached to past runs.
nodes and edges you want the new version to have, not a delta. To change one field on a 60-field workflow, re-send the full graph with that one field swapped. A round-trippable GET-then-PUT helper is on the SDK roadmap.Recipe — change one field’s data type or options
The Python SDK builds the typed graph for you. The example below recreates a one-extract-node workflow and updates thecategory_taxonomy field to be an enum.
Request body
Same shape asPOST /v2/workflows/ — a typed graph of nodes (parse / classify / splitter / extract) and edges.
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Workflow name |
description | string | No | Optional description |
nodes | Node[] | Yes | At least one node; exactly one must be type="parse" |
edges | Edge[] | No | Directed edges between nodes |
Authorizations
API key issued from app.anyformat.ai/settings. Send as Authorization: Bearer <key>.
Path Parameters
Body
Public-surface workflow update body — full replacement of the typed graph.
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 defines the extraction template — what fields to extract from documents, their types, and validation rules.
Unique identifier of the workflow (UUID).
"0686bb97-8c30-70f0-8000-97669e000eb8"
Human-readable name of the workflow.
"Invoice Processing"
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).
List of extraction field definitions configured for this workflow. null if not yet configured.
