Stream Content Schedule
Replace content schedule
https://api.tunio.ai/ v1/ stream-schedule/ content/ {stream_id}Replaces every content slot of the stream with the given set, atomically. Every referenced item must belong to the caller's library, and no two slots of the set may start at the same time on the same day (the rule of the single-slot endpoint, applied to the whole set). With dry_run=true nothing is written: the response says whether the set is valid, lists the conflicts and the diff against the current schedule. With dry_run=false a conflicting set is refused with 409 and nothing is written. A valid set is applied after the stream's current schedule (music and content) is saved as a private schedule profile, returned as snapshot_profile_id; apply it with POST /v1/schedule-profiles/{profile_id}/apply to roll back. The last 20 automatic snapshots per stream are kept. Slots that do not change keep their slot_id.
Path parameters
| Name | Type | Description |
|---|---|---|
| stream_idRequired | string | Stream ID |
Request body
Complete new schedule
| Name | Type | Description |
|---|---|---|
| dry_run | boolean | DryRun validates and reports the diff without writing anything. |
| slots | array | Slots is the complete new schedule; an empty array clears it. |
| [item]Required | object | - |
01{02 "dry_run": true,03 "slots": [04 {05 "content_id": "3c1e2f90-7d4b-4a8e-9f21-6b5d4c3a2e10",06 "content_type": "announcement",07 "day_of_week": 1,08 "meta": {09 "count": 0,10 "mode": "string",11 "play_current_time": true,12 "precise": true13 },14 "start_time": "10:30"15 }16 ]17}
Responses
| Name | Type | Description |
|---|---|---|
| conflicts | array | Conflicts lists every conflicting pair of requested slots. |
| [item]Required | object | - |
| diff | object | Diff compares the request with the current schedule. |
| added | array | Added lists the slots that are not in the current schedule. |
| removed | array | Removed lists the current slots that the request does not keep. |
| unchanged_count | integer | UnchangedCount is how many current slots stay as they are (and keep their slot_id). |
| dry_run | boolean | DryRun echoes the request. |
| message | string | Message is schedule_conflict on a 409. |
| snapshot_profile_id | string | SnapshotProfileID is the private schedule profile holding the stream's schedule (music and content) as it was
before this write; apply it with POST /v1/schedule-profiles/{profile_id}/apply to roll back. Null on dry runs. |
| success | boolean | - |
| valid | boolean | Valid is false when two requested slots start at the same time on the same day. |
| Name | Type | Description |
|---|---|---|
| message | string | Message contains human readable error details. |
| success | boolean | Success is always false for error payloads. |
| Name | Type | Description |
|---|---|---|
| message | string | Message contains human readable error details. |
| success | boolean | Success is always false for error payloads. |
| Name | Type | Description |
|---|---|---|
| message | string | Message contains human readable error details. |
| success | boolean | Success is always false for error payloads. |
| Name | Type | Description |
|---|---|---|
| message | string | Message contains human readable error details. |
| success | boolean | Success is always false for error payloads. |
| Name | Type | Description |
|---|---|---|
| conflicts | array | Conflicts lists every conflicting pair of requested slots. |
| [item]Required | object | - |
| diff | object | Diff compares the request with the current schedule. |
| added | array | Added lists the slots that are not in the current schedule. |
| removed | array | Removed lists the current slots that the request does not keep. |
| unchanged_count | integer | UnchangedCount is how many current slots stay as they are (and keep their slot_id). |
| dry_run | boolean | DryRun echoes the request. |
| message | string | Message is schedule_conflict on a 409. |
| snapshot_profile_id | string | SnapshotProfileID is the private schedule profile holding the stream's schedule (music and content) as it was
before this write; apply it with POST /v1/schedule-profiles/{profile_id}/apply to roll back. Null on dry runs. |
| success | boolean | - |
| valid | boolean | Valid is false when two requested slots start at the same time on the same day. |
| Name | Type | Description |
|---|---|---|
| message | string | Message contains human readable error details. |
| success | boolean | Success is always false for error payloads. |