---
title: "Update Flow"
method: PATCH
path: "/flows/{flow_id}"
tags: ["Apis", "Streaming"]
---

# Update Flow

`PATCH /flows/{flow_id}`

## Request

- Base URL: `https://client.camb.ai/apis`
- URL: `https://client.camb.ai/apis/flows/{flow_id}`
- Auth: API key in header `x-api-key`

Rename a flow or bring its relay online/offline.

## Path parameters

- `flow_id` integer, required

## Request body

- FlowUpdateIn: Partial update of a flow. Only `label` and `active` can change; to change URLs, mode or failover, delete and recreate the flow.
  - `label` string, nullable: New label (unique within your team).
  - `active` boolean, nullable: Set `true` to bring the flow's relay online, `false` to take it offline.

## Response `200`

The updated flow.

- FlowOut
  - `id` integer: Flow identifier.
  - `label` string
  - `mode` 'caller' | 'listener': `caller`: Camb.ai connects out to your SRT endpoint (`primary_url`) and re-serves it. `listener`: Camb.ai hosts an SRT endpoint that your encoder pushes to.
  - `failover` boolean
  - `active` boolean: Whether the flow's relay is currently online.
  - `team_id` integer
  - `key` string: Access key embedded in the flow's URLs.
  - `play_url` string: SRT URL the flow serves. Use it as `source_stream.url` or as a `target_streams[].url`, or play it directly.
  - `push_urls` PushUrl[]: SRT URLs to push into (listener mode). Empty for caller flows.
    - `role` 'primary' | 'backup': Which leg of the flow this URL feeds.
    - `url` string: SRT URL to push to.
  - `passphrase` string, nullable: The flow's SRT encryption passphrase, when one is set.

## Other responses

- `404`: Flow not found.
- `422`: Validation Error

---

[API](https://skmtc.dev/camb/apis/camb-api.md) - [All operations](https://skmtc.dev/camb/apis/camb-api/llms.txt) - [OpenAPI document](https://skmtc.dev/camb/apis/camb-api/revisions/40ebeee64850?raw)
