---
title: "Update workflow"
method: PUT
path: "/v1/workflows/{id}"
tags: ["workflows"]
---

# Update workflow

`PUT /v1/workflows/{id}`

Replaces a workflow definition by creating a new version under the same workflow (the old version is untouched). New version is DRAFT unless `activate` is true. Config fields whose value is the redaction placeholder are preserved from the current version.

## Path parameters

- `id` string, required — Workflow (version) identifier.

## Request body

- object — Replace a workflow definition by creating a new version under the same workflow. New version is DRAFT unless activate is true.
  - `workspace_id` string — Optional workspace override. Omit to resolve the workflow's workspace automatically.
  - `name` string, required — Workflow name
  - `description` string, nullable
  - `color` string — Hex color for the workflow, e.g. #2563eb
  - `trigger` object, nullable — The workflow trigger, or null for a trigger-less workflow.
    - `type` string, required — Trigger type. See get_workflow_schema.
    - `config` object, required — Trigger configuration for this trigger type.
  - `first_step_id` string, nullable — Id of the entry step, or null.
  - `steps` object[], required — The step graph.
    - `id` string, required — Caller-assigned step id. `next_step_id` and branch pointers reference these ids; server rewrites them to stored ids.
    - `type` string, required — Step type. See get_workflow_schema for the set.
    - `description` string, nullable
    - `next_step_id` string, nullable — Id of the next step in the chain, or null for a leaf.
    - `position` object, nullable — Optional editor canvas position.
      - `x` number, required
      - `y` number, required
    - `config` object, required — Step configuration for this step type (the `config` object get_workflow returns). Call get_workflow_schema for the per-type shape.
  - `activate` boolean — When true, the version goes live (status ACTIVE). Defaults to false (DRAFT).

## Response `200`

Updated workflow definition (new version)

- object — Full workflow definition: metadata, trigger, and the step graph (steps + derived edges) as the Workflows editor stores it. Embedded secrets are redacted.
  - `data` object, required
    - `workflow_id` string, required
    - `master_id` string, nullable, required
    - `name` string, required
    - `enabled` boolean, required
    - `status` string, required
    - `version` number, required
    - `is_latest` boolean, required
    - `color` string, required
    - `trigger_summary` string, nullable, required
    - `created_at` string, required
    - `updated_at` string, required
    - `description` string, nullable, required
    - `trigger` object, nullable, required
      - `type` string, required
      - `config` object, required
    - `first_step_id` string, nullable, required
    - `steps` object[], required
      - `id` string, required
      - `type` string, required
      - `description` string, nullable, required
      - `position` object, nullable, required
        - `x` number, required
        - `y` number, required
      - `next_step_id` string, nullable, required
      - `config` object, required — Step configuration as stored by the Workflows editor, with any embedded credential material (e.g. HTTP auth header values) redacted.
    - `edges` object[], required
      - `from` string, required
      - `to` string, required
      - `kind` 'next' | 'condition_true' | 'condition_false' | 'filter' | 'branch_true' | 'branch_false', required

## Other responses

- `400` — Invalid request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not found
- `429` — Rate limit exceeded

---

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