Skip to main content
PUT
Replace 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
workflow_id
string
required

Body

application/json

Identical to the create body and validated by the same validateWorkflowSpec — this is a FULL REPLACE, not a merge: every omitted field reverts to its default (e.g. omitting active re-activates, omitting entry_conditions clears them). PATCH is accepted on this path and behaves identically. version is incremented server-side; it cannot be set.

name
string
required
Required string length: 1 - 120
entry_dataset
string
required
Pattern: ^[a-zA-Z][a-zA-Z0-9_]{0,62}$
steps
object[]
required

Same nine step types and same limits as createWorkflow (<= 32 steps including branch sub-steps; branch depth <= 3; no delay/wait_for_event inside a branch; delay and wait timeout <= 365 days; steps <= 262144 bytes serialized).

Minimum array length: 1
slug
string
active
boolean
default:true
entry_conditions
object[]

One condition dialect (#165): {path, op, value}, or {path, equals} as shorthand for op "equals". Refused at save: both forms at once, a missing value (except exists), gt/gte/lt/lte with a non-number, contains or regex with a non-string, a regex that does not compile or is unbounded, in without a list of 1-100 scalars, any other object or array value, an unknown key. A {{placeholder}} value is refused here: nothing resolves it, so it would be compared as literal text.

Response

Replaced; version incremented.

ok
enum<boolean>
required
Available options:
true