Skip to main content
POST
Create a workflow definition

Authorizations

hookie_session
string
cookie
required

The console's sealed session cookie, set by WorkOS AuthKit. Mutating requests also require the X-Requested-With CSRF header.

Path Parameters

project_id
string
required

Body

application/json
name
string
required

Trimmed before validation.

Required string length: 1 - 120
entry_dataset
string
required

A record landing in this dataset via the ingest/cron/ws pipeline can start an instance. Records emitted BY a workflow never start new ones.

Pattern: ^[a-zA-Z][a-zA-Z0-9_]{0,62}$
steps
(emit_event · object | call_ai · object | wait_for_event · object | delay · object | agent_call · object | branch · object)[]
required

Ordered steps. Total count INCLUDING nested branch sub-steps must be <= 32.

Minimum array length: 1
slug
string

Slugified server-side: lowercased, non-alphanumerics collapsed to '-', trimmed, max 48 chars, falling back to 'workflow'. Defaults to a slug of name. Not uniqueness-checked.

active
boolean
default:true

Only the literal false deactivates; anything else (including omission) means active. An inactive workflow starts no instances.

entry_conditions
object[]

Evaluated against the entry record. An empty array matches every record in the dataset.

Response

Created.

id
string
required
ok
enum<boolean>
required
Available options:
true