Skip to main content
PUT
Update Workflow V2
Integration Prompt for AI Agents
Omitted fields are left unchanged. If agent_ids appears in the body (including []), all agent links are replaced; [] clears links. If definition appears, it is fully replaced and validated like POST /v1/scenario (same discriminated node and data types as Create scenario). Sends only the fields you want to change; include definition only when replacing the entire React Flow graph.

Headers

X-Organization-Id
string
X-API-Key
string
required

API key required to authenticate requests.

Path Parameters

workflow_id
string<uuid>
required

Body

application/json

Partial update for workflows_v2.

name
string | null

New name for the workflow

Required string length: 1 - 255
agent_ids
integer[] | null

Set owning agents, or null to clear agent links (must belong to your organization when set).

description
string | null

New description (set empty string to clear if your client sends it)

definition
Definition · object | null

Full React Flow definition when replacing the graph. Same shape as create: each node needs a top-level id; each edge needs a top-level id unique among edges.

Response

Successful Response

Single workflows_v2 row.

id
string
required

Workflow ID

name
string
required

Name of the workflow

definition
Definition · object
required

Stored React Flow graph (start / single / options nodes). Nodes and edges use top-level string id fields; edge id values are unique within the graph.

created_at
string<date-time>
required

Creation timestamp

organization_id
string | null

Owning organization ID (set by middleware on create)

agent_ids
integer[]

Linked agent ids when the workflow is agent-scoped

description
string | null

Description

dh_sync_summary
Dh Sync Summary · object | null

Present on PUT responses when the definition was updated. Keys: updated, created, marked_stale, skipped, errors.

warnings
string[]

Non-blocking lint warnings emitted at save time (e.g. node text referencing an unknown {{trait_name}}). Empty when the definition is clean or no agents are linked.