Skip to main content
PATCH
Rate limit tier: general (600 req/min) — see Rate limits. Replaces a workflow’s typed graph, atomically. The body is the {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_id unchanged — 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_id is 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_id that doesn’t match any field in the current version is rejected with 400.
  • Sending back an unchanged graph cuts no new version.
The response is the updated workflow in the exact GET shape — including the 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.
An invalid graph is rejected with 400 TOPOLOGY_INVALID (same contract as Create workflow); the stored workflow is untouched.

Authorizations

Authorization
string
header
required

API key issued from app.anyformat.ai/api-key. Send as Authorization: Bearer <key>.

Path Parameters

workflow_id
string
required

Body

application/json

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. Restricts the node union to the public types (see WorkflowCreateRequest). Call :meth:to_domain before validating topology or forwarding to the backend.

name
string
required
Minimum string length: 1
Example:

"Invoice or receipt"

nodes
(PublicParseNode · object | ClassifyNode · object | SplitterNode · object | PublicExtractNode · object | PublicValidateNode · object | PublicIfElseNode · object)[]
required
Minimum array length: 1
description
string | null
default:""
edges
Edge · object[]

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.

id
string
required

Unique identifier of the workflow (hyphenated UUID).

Example:

"0686bb97-8c30-70f0-8000-97669e000eb8"

name
string
required

Human-readable name of the workflow.

Example:

"Invoice Processing"

nodes
(PublicParseNode · object | ClassifyNode · object | SplitterNode · object | PublicExtractNode · object | PublicValidateNode · object | PublicIfElseNode · object)[]
required

Typed graph nodes (parse / classify / splitter / extract / validate / if_else).

description
string | null

Optional description of what this workflow extracts.

Example:

"A workflow for processing invoices and retrieving invoice details."

created_at
string<date-time> | null

Timestamp when the workflow was created (ISO 8601).

updated_at
string<date-time> | null

Timestamp when the workflow was last modified (ISO 8601).

edges
Edge · object[]

Directed edges between the graph nodes.