---
title: "Update a stream"
method: PATCH
path: "/streams/{id}"
tags: ["streams"]
---

# Update a stream

`PATCH /streams/{id}`

Update a stream. When `retryMirror: true`, the resolver also writes a
fresh MirrorIntent for the latest desired state of this stream's YouTube
schedule mirror — used to recover after reauth / quota reset / channel
freeing. retryMirror is a sibling argument rather than a field on
UpdateStreamInput because that input type is generated by ent and
cannot carry non-column fields. Has no effect when the stream has no
existing MirrorIntent (`INVALID_ARG` is returned in that case).

When `input.status` is set, the resolver translates the legacy enum value to
the equivalent lifecycle command and routes it through
`streamlifecycle.Transition()` instead of writing the column directly.
`input.status` is deprecated; frontends should call the command mutations
directly.

Resources are permanently bound to the workspace that created them and
cannot be moved between workspaces.

## Path parameters

- `id` string, required

## Headers

- `Idempotency-Key` string

## Request body

- UpdateStreamRequest — UpdateStreamInput is used for update Stream object. Input was generated by ent.
  - `addPlaylistIDs` string[]
  - `addPreparedPlaylistIDs` string[]
  - `agentModeEnabled` boolean, nullable — Feature flag: run stream in agent mode (/agent) with replica-based orchestration.
  - `audioUploadObjectID` string, nullable
  - `clearAudioUploadObject` boolean, nullable
  - `clearDestination` boolean, nullable
  - `clearFramerate` boolean, nullable
  - `clearName` boolean, nullable
  - `clearPlaylists` boolean, nullable
  - `clearPreparedPlaylists` boolean, nullable
  - `clearQuality` boolean, nullable
  - `clearScheduleEndAt` boolean, nullable
  - `clearScheduleStartAt` boolean, nullable
  - `clearStorageBackend` boolean, nullable
  - `clearStreamBackend` boolean, nullable
  - `clearStreamDuration` boolean, nullable
  - `clearStreamKey` boolean, nullable
  - `clearStreamState` boolean, nullable
  - `clearVideoUploadObject` boolean, nullable
  - `clearYoutubeSettings` boolean, nullable
  - `destinationID` string, nullable
  - `framerate` 'f_24' | 'f_25' | 'f_30' | 'f_60', nullable
  - `name` string, nullable
  - `quality` 'q_720p' | 'q_1080p' | 'q_1440p' | 'q_2160p', nullable
  - `removePlaylistIDs` string[]
  - `removePreparedPlaylistIDs` string[]
  - `runBackupStream` boolean, nullable — Stream preference: enable backup destination streaming in agent mode.
  - `scheduleEndAt` string, date-time, nullable
  - `scheduleStartAt` string, date-time, nullable
  - `storageBackend` 'standard' | 'large', nullable — Storage tier for this stream's media. 'standard' suits typical playlists and is included. 'large' is for big playlists: storage is provisioned to fit your content and grows as you add to it, billed per GiB-month. Takes effect at the next stream start.
  - `streamBackend` 'ffmpeg' | 'manifest', nullable — RTMP publisher backend. Editing is restricted.
  - `streamDestination` 'youtube', nullable
  - `streamDuration` integer, nullable — Stream duration in seconds. 0 = never expires. Copied from user default on creation.
  - `streamKey` string, nullable — DEPRECATED: use destination_id. Kept for backward-compat during destination migration.
  - `streamStateID` string, nullable
  - `videoUploadObjectID` string, nullable
  - `youtubeSettingsID` string, nullable

## Response `200`

Successful response.

- Stream
  - `createdAt` string, date-time, required
  - `framerate` 'f_24' | 'f_25' | 'f_30' | 'f_60', nullable
  - `id` string, required
  - `name` string, nullable
  - `quality` 'q_720p' | 'q_1080p' | 'q_1440p' | 'q_2160p', nullable
  - `state` 'draft' | 'invalid' | 'scheduled' | 'preparing' | 'activating' | 'active' | 'failing' | 'failed' | 'stopping' | 'stopped', nullable

## Other responses

- `401` — Missing or invalid access token.
- `403` — The token lacks the required scope or access to the resource.
- `404` — The resource does not exist or is not visible to the caller.
- `422` — The request body or parameters are invalid.
- `429` — Rate limit exceeded. Retry after the indicated delay.
- `502` — The upstream data service returned an error.

---

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