Skip to main content
PATCH
Change part of a workflow (merge)

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 string length: 1 - 120
slug
string
active
boolean
default:true
entry_dataset
string
Pattern: ^[a-zA-Z][a-zA-Z0-9_]{0,62}$
entry_conditions
object[]

One element of a workflow's entry_conditions, a branch's conditions or a wait_for_event's conditions: a Condition, or a ConditionGroup. The list itself is AND, so a list with no groups keeps its meaning. Paths in entry_conditions and in a wait_for_event's conditions are bare, because both read the arriving record; a path that starts with entry. is refused with 400, since it could never match. A branch's paths read the instance context, where the entry record is under entry. Only a branch and a wait_for_event may hold {{...}} placeholders in a value; a wait's are resolved from the instance context when the wait starts.

steps
object[]

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). Knowledge graph steps: {type:"graph",action:"context",roots:["{{entry.node_id}}"],depth:2,max_nodes:40,max_bytes:16384,properties:["summary"],output_key:"graph_result"} fetches bounded context; {type:"graph",action:"mutate",mutations:[{operation:"create_node",node_type:"knowledge",display_name:"Summary",properties:{summary:"{{ai_result.summary}}"}}]} queues changes with deterministic IDs. Project graph grants are required. Queued changes are eventually visible; receipt IDs are returned.

Minimum array length: 1

Response

Replaced; version incremented.

ok
enum<boolean>
required
Available options:
true