Restreams

Change a restream

PATCH
https://api.tunio.ai/v1/stream/{stream_id}/restreams/{restream_id}

Saves new settings for a restream. A running restream restarts with them (restarted: true). platform and server_url are always required; omit stream_key, background_id or resolution to keep the saved value. A background cannot be removed once set.

Path parameters

NameTypeDescription
stream_idRequiredstringStream UUID
restream_idRequiredintegerRestream ID (id in the list)

Request body

Restream settings

NameTypeDescription
background_idstring
UUID of a looped video background from GET /v1/restream-backgrounds; omit for none. A UUID that does not exist or is not available to the account gives 400 error_background_not_found. Returned as video_source. On update, omitting it keeps the saved background; a background cannot be removed.
platformRequiredstring
Target platform; custom is any RTMP/RTMPS server. Required, also on update.
resolutionstring
Background resolution: 720, 1080, 2k or 4k, one the background offers (default 1080). A value above the plan's max_resolution is sent at max_resolution. On update, omitting it keeps the saved one.
server_urlRequiredstring
The platform's RTMP/RTMPS ingest URL. Required, also on update. Returned as url.
stream_keystring
The platform's stream key. Required to create; omit on update to keep the saved one.
Request example
01{
02 "background_id": "string",
03 "platform": "youtube",
04 "resolution": "1080",
05 "server_url": "rtmp://a.rtmp.youtube.com/live2",
06 "stream_key": "string"
07}

Responses

NameTypeDescription
restartedboolean
True when the restream was running and restarted with the new settings.
successboolean
Always true.
NameTypeDescription
messagestring
Error code or human-readable error details.
successboolean
Always false for error payloads.
NameTypeDescription
messagestring
Error code or human-readable error details.
successboolean
Always false for error payloads.
NameTypeDescription
messagestring
Error code or human-readable error details.
successboolean
Always false for error payloads.
NameTypeDescription
messagestring
Error code or human-readable error details.
successboolean
Always false for error payloads.
NameTypeDescription
messagestring
Error code or human-readable error details.
successboolean
Always false for error payloads.
NameTypeDescription
messagestring
Error code or human-readable error details.
successboolean
Always false for error payloads.