Skip to main content
POST
Create a workflow (owner and twin come from the session, never the body)

Authorizations

x-access-token
string
header
required

JWT token passed in x-access-token header

Body

application/json
name
string
required
Maximum string length: 120
instruction
string
required
Maximum string length: 32000
enabled
boolean
model
string

'' (Default) or an id in the caller's current GET /workflow-models menu; anything else is 400 MODEL_NOT_AVAILABLE.

Maximum string length: 120
reasoning
enum<string>
Available options:
,
off,
low,
medium,
high,
xhigh
schedule
object

When a workflow runs, in its own IANA timezone (wall-clock: a daily 09:00 stays 09:00 across daylight saving). Only the fields of its kind are read; unknown fields are dropped. A time that does not exist on a spring-forward day fires at the first valid minute after it; a repeated time on a fall-back day fires once, at the earlier instant.

Response

Created. nextRunAt is computed in the schedule's timezone (null when manual or disabled).

success
boolean
workflow
object

An agentsv2 workflow — its own collection, nothing shared with the v1 workflows under /api/user/agents/workflows. A run starts a new session in the owner's daemon for this twin with the instruction as its first prompt, and ends when streaming ends.