---
title: "Update a workflow"
method: PATCH
path: "/api/workflows/{workflow_id}/"
tags: ["workflows"]
---

# Update a workflow

`PATCH /api/workflows/{workflow_id}/`

Update a workflow family. `name`, `description`, and `is_starred` are family metadata and propagate to every version. Structural fields edit the current draft; committed-only families must create a new draft first.

## Path parameters

- `workflow_id` string, required

## Headers

- `Authorization` string, required

## Request body

- object
  - `name` string, nullable
  - `description` string, nullable
  - `type` 'automations' | 'monitors' | 'evaluators' | 'reports' | 'exports' | 'ingests' — Workflow category. Defaults to `automations`.
  - `trigger_event_type` 'request_log' | 'trace_completed' | 'customer_budget_limit_reached' | 'credit_low_balance_threshold_reached' | 'spend_cap_warning_threshold_reached' | 'limit_policy_soft_triggered' | 'limit_policy_hard_triggered' | 'on_eval_result_ingested' | 'custom_event' | 'eval_only' | 'scheduled' — Event that triggers the workflow. Use `scheduled` with `schedule_cron`.
  - `schedule_cron` string, nullable — UTC five-field cron expression. Required when `trigger_event_type` is `scheduled`, forbidden for other trigger types, and limited to a minimum five-minute cadence. Timezone prefixes such as `TZ` and `CRON_TZ` are not supported.
  - `is_starred` boolean
  - `tasks` ApiWorkflowsWorkflowIdPatchRequestBodyContentApplicationJsonSchemaTasksItems[]
    - `id` string — Stable task ID. The server generates one when omitted.
    - `type` string, required
    - `label` string, nullable
    - `next` union — ID or IDs of the next task. Sequential links are generated when omitted.
      - string
      - string[]
    - `config` object

## Response `200`

Workflow updated.

- WorkflowsUpdateWorkflowResponse200
  - `id` string, required
  - `workflow_id` string, required
  - `version` integer, required
  - `name` string, nullable
  - `description` string, nullable
  - `version_description` string — Commit message for this version. Set only through the commit endpoint.
  - `type` 'automations' | 'monitors' | 'evaluators' | 'reports' | 'exports' | 'ingests', required — Workflow category. Defaults to `automations`.
  - `trigger_event_type` 'request_log' | 'trace_completed' | 'customer_budget_limit_reached' | 'credit_low_balance_threshold_reached' | 'spend_cap_warning_threshold_reached' | 'limit_policy_soft_triggered' | 'limit_policy_hard_triggered' | 'on_eval_result_ingested' | 'custom_event' | 'eval_only' | 'scheduled' — Event that triggers the workflow. Use `scheduled` with `schedule_cron`.
  - `schedule_cron` string, nullable — UTC five-field cron expression. Required when `trigger_event_type` is `scheduled`, forbidden for other trigger types, and limited to a minimum five-minute cadence. Timezone prefixes such as `TZ` and `CRON_TZ` are not supported.
  - `is_enabled` boolean, required
  - `is_starred` boolean
  - `is_read_only` boolean, required
  - `is_public` boolean
  - `unique_organization_id` string, nullable
  - `has_async_steps` boolean
  - `created_at` string, date-time
  - `updated_at` string, date-time
  - `deployed_version` integer, nullable
  - `tags` ApiWorkflowsWorkflowIdPatchResponsesContentApplicationJsonSchemaTagsItems[]
    - `id` string, required
    - `name` string, required
    - `color` string, nullable
    - `created_at` string, date-time
    - `updated_at` string, date-time
  - `tasks` ApiWorkflowsWorkflowIdPatchResponsesContentApplicationJsonSchemaTasksItems[], required
    - `id` string — Stable task ID. The server generates one when omitted.
    - `type` string, required
    - `label` string, nullable
    - `next` union — ID or IDs of the next task. Sequential links are generated when omitted.
      - string
      - string[]
    - `config` object
  - `graph` ApiWorkflowsWorkflowIdPatchResponsesContentApplicationJsonSchemaGraph
    - `node_count` integer
    - `edge_count` integer
    - `entry_nodes` string[]
    - `terminal_nodes` string[]
    - `nodes` object
  - `has_write_access` boolean — Whether the authenticated caller may edit this workflow family.

## Other responses

- `400` — Invalid request.
- `401` — Authentication failed.
- `404` — Workflow family not found.
- `409` — The family has no editable draft.

---

[API](https://skmtc.net/keywordsai/apis/api-reference.md) · [All operations](https://skmtc.net/keywordsai/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/keywordsai/api-reference/revisions/4e064cf81dae/schema)
