---
title: "Update Workflow V2"
method: PUT
path: "/v1/scenario/{workflow_id}"
tags: ["Scenario Builder"]
---

# Update Workflow V2

`PUT /v1/scenario/{workflow_id}`

Update name, description, agent links, and/or definition (React Flow graph).

## Path parameters

- `workflow_id` string, uuid, required

## Headers

- `X-API-Key` string, required

## Request body

- UpdateWorkflowV2Request — Partial update for workflows_v2.
  - `name` string, nullable — New name for the workflow
  - `agent_ids` integer[], nullable — Set owning agents, or null to clear agent links (must belong to your organization when set).
  - `description` string, nullable — New description (set empty string to clear if your client sends it)
  - `definition` object, nullable — 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 `200`

Successful Response

- WorkflowV2Response — Single workflows_v2 row.
  - `id` string, required — Workflow ID
  - `organization_id` string, nullable — Owning organization ID (set by middleware on create)
  - `agent_ids` integer[] — Linked agent ids when the workflow is agent-scoped
  - `name` string, required — Name of the workflow
  - `description` string, nullable — Description
  - `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
  - `dh_sync_summary` object, nullable — 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.

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/getbluejay/apis/bluejay-api.md) · [All operations](https://skmtc.net/getbluejay/apis/bluejay-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/getbluejay/bluejay-api/versions/f48cef80963f/schema)
