Skip to main content
POST
Create a reusable workflow
Store a definition so you can run it by id, schedule it, or call it from another workflow as a sub_pipeline step.

Authorizations

Authorization
string
header
required

API key in format: Bearer inf_***

Body

application/json
name
string
required

Human-readable name, unique to no one — two workflows in a workspace may share it. Identity is the returned id.

Maximum string length: 120
Example:

"Product shot → upscaled social set"

definition
object
required

The workflow document: its steps, their bindings, and the inputs it declares. Validated by parsePipelineDef at this boundary, so a malformed definition is a 400 here and is never stored. The step union is defined in Zod (schemas/pipeline-definition.schema.ts) rather than as a class, which is why this is published as a free-form object rather than a modelled schema — read that file for the authoritative shape.

description
string

Free text shown beside the workflow in the dashboard. Not interpreted, not passed to any step.

Maximum string length: 2000

Response

Created. Version is always 1.

id
string
required

Workflow UUID. Unchanged by an update.

Example:

"b0e9f2a4-2b1a-4c7d-9a3e-1f5c8d2e4b60"

version
number
required

The version this write left as latest. Always 1 from POST. From PUT it is the previous latest + 1 when the request carried a definition, and the UNCHANGED previous latest when it did not.

Example:

2

name
string
required

The workflow name after the write.

Example:

"Weekly report"