---
title: "Update a flow"
method: PUT
path: "/api/workers/{workerId}/flows/{flowId}"
tags: ["Flows"]
---

# Update a flow

`PUT /api/workers/{workerId}/flows/{flowId}`

## Path parameters

- `workerId` string, required
- `flowId` string, required

## Request body

- UpdateFlowRequest
  - `name` string — Name of the flow
  - `code` string — Flow code
  - `label` string — Optional label for the flow

## Response `200`

Updated flow

- Flows
  - `id` string, required
  - `version` integer, required
  - `name` string, required
  - `label` string, nullable
  - `code` string, required
  - `createdAt` string, date-time, required
  - `updatedAt` string, date-time, required
  - `workerId` string, required
  - `deploymentsIds` string[]

## Other responses

- `400` — Invalid request body
- `401` — Unauthorized
- `404` — Flow not found

## Changes

- **2025-02-04** `ab4ce60666d2` — 2 breaking, 1 info
  - removed the required property `deployments` from the response with the `200` status
  - removed the required property `worker` from the response with the `200` status
  - added the optional property `deploymentsIds` to the response with the `200` status
- **2025-02-04** `78ff4a594abd` — 3 breaking, 20 info
  - the request's body type/format changed from ``/`` to `object`/``
  - the `deployments` response's property type/format changed from `deployments`/`` to `object`/`` for status `200`
  - the `worker` response's property type/format changed from `workers`/`` to `object`/`` for status `200`
  - added the new optional request property `code`
  - …19 more
- **2025-02-04** `a3da5c68a303` — 1 breaking, 3 warning, 1 info
  - the request's body type/format changed from `object`/`` to ``/``
  - removed the request property `code`
  - removed the request property `label`
  - removed the request property `name`
  - …1 more

[Change history](https://skmtc.dev/brainbasehq/apis/brainbase-api/changes/api/workers/:workerId/flows/:flowId/put.md)

---

[API](https://skmtc.dev/brainbasehq/apis/brainbase-api.md) · [All operations](https://skmtc.dev/brainbasehq/apis/brainbase-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/brainbasehq/brainbase-api/revisions/ab4ce60666d2/schema)
