Skip to main content
POST
Rate limit tier: general, 600 requests/min. See Rate limits. Creates a workflow from a strongly-typed graph, in one atomic transaction. The body is {name, description, nodes, edges}. The node types are parse, extract, classify, splitter, validate, if_else, slack_alert, edit and knowledge. Nodes says what each one does, Node schemas lists every node’s fields, and Field types covers the field types. A body that violates graph topology is rejected with 400 TOPOLOGY_INVALID. A missing parse node and an orphaned extract node both violate it. detail.violations lists each broken rule with the offending node ids. Fetch the stored graph back with GET /v3/workflows/{workflow_id}/. That response carries a server-assigned persistent_id on every field.
Build the workflow in the anyformat platform instead, and iterate faster: configure fields visually and test against sample documents. Then copy the workflow id and run documents through the API.

Authorizations

Authorization
string
header
required

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

Body

application/json

Public-surface workflow create body — typed graph of parse / classify / splitter / extract / validate nodes.

A validate node carries rules; each rule is either AI-evaluated (kind="ai" + a natural-language description) or deterministic (kind="deterministic" + a structured check, evaluated in pure Python with no model call).

Uses PublicNode (public request models with only the fields callers may set); the domain AnyNode also carries filter (worker-only) and executor-injected / staff-only fields, so the public bodies pin a stricter node schema. Call :meth:to_domain before 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 | PublicSlackAlertNode · object | PublicEditNode · object | KnowledgeNode · 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 | PublicSlackAlertNode · object | PublicEditNode · object | KnowledgeNode · 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.