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
| Name | Type | Description |
|---|---|---|
| stream_idRequired | string | Stream UUID |
| restream_idRequired | integer | Restream ID (id in the list) |
Request body
Restream settings
| Name | Type | Description |
|---|---|---|
| background_id | string | 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. |
| platformRequired | string | Target platform; custom is any RTMP/RTMPS server. Required, also on update. |
| resolution | string | 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_urlRequired | string | The platform's RTMP/RTMPS ingest URL. Required, also on update. Returned as url. |
| stream_key | string | 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
| Name | Type | Description |
|---|---|---|
| restarted | boolean | True when the restream was running and restarted with the new settings. |
| success | boolean | Always true. |
| Name | Type | Description |
|---|---|---|
| message | string | Error code or human-readable error details. |
| success | boolean | Always false for error payloads. |
| Name | Type | Description |
|---|---|---|
| message | string | Error code or human-readable error details. |
| success | boolean | Always false for error payloads. |
| Name | Type | Description |
|---|---|---|
| message | string | Error code or human-readable error details. |
| success | boolean | Always false for error payloads. |
| Name | Type | Description |
|---|---|---|
| message | string | Error code or human-readable error details. |
| success | boolean | Always false for error payloads. |
| Name | Type | Description |
|---|---|---|
| message | string | Error code or human-readable error details. |
| success | boolean | Always false for error payloads. |
| Name | Type | Description |
|---|---|---|
| message | string | Error code or human-readable error details. |
| success | boolean | Always false for error payloads. |