Skip to main content

PATCH Update stream

PATCH /stream/{id} can be used to modify a stream object. It is a single endpoint that can update any of the mutable properties of a stream. Specifically:

  • record
  • suspended
  • multistream.targets

All fields in the request payload are optional, and any field that is not included will keep the same value as before in the saved object.

A 204 No Content status response indicates the stream was successfully updated.

Turn recording on

curl -X PATCH https://livepeer.studio/api/stream/{id} \
-H 'content-type: application/json' \
-H 'authorization: Bearer {api-key}' \
-d '{ "record": true }'

Suspend stream

curl -X PATCH https://livepeer.studio/api/stream/{id} \
-H 'content-type: application/json' \
-H 'authorization: Bearer {api-key}' \
-d '{ "suspended": true }'

Edit Multistream Targets

curl -X PATCH 'https://livepeer.studio/api/stream/{id}' \
-H 'content-type: application/json' \
-H 'authorization: Bearer {api-key}' \
-d '{
"multistream": {
"targets": [
{ "id" :"0bf161f3-95bd-4971-a7b1-4dcb5d39e78a", "profile": "source" },
{ "id" :"95bd0bf1-61f3-a7b1-4971-39e78a4dcb5d", "profile": "720p", "videoOnly": true }
]
}
}'

Update all fields

curl -X PATCH 'https://livepeer.studio/api/stream/{id}' \
-H 'content-type: application/json' \
-H 'authorization: Bearer {api-key}' \
-d '{
"record": false,
"suspended": false,
"multistream": {
"targets": []
}
}'