Stream
Set music override
POST
https://api.tunio.ai/ v1/ stream/ {stream_id}/ overrideOverrides the current music selection with an ad-hoc dynamic filter spec (genres, BPM range, languages, instrumental, music source, collection) for an optional TTL in minutes (clamped to 10..1440, default 60). It supersedes the base music schedule until it expires or is cleared; announcements and jingles keep running. Any subset of filters may be set, but at least one is required. A manual override wins over automated (POS) ones. Re-sending the same filters and ttl_minutes while more than half of the lifetime is left changes nothing and returns the active override; a different ttl_minutes restarts it, so expires_at becomes now plus the new TTL.
Path parameters
| Name | Type | Description |
|---|---|---|
| stream_idRequired | string | Stream UUID |
Request body
Music override request
| Name | Type | Description |
|---|---|---|
| bpm_from | integer | Lower BPM bound, 0 or more; must not be greater than bpm_to. |
| bpm_to | integer | Upper BPM bound, 0 or more. |
| collection_uuid | string | UUID of a music collection of the stream owner. An unknown collection gives 400. |
| genres | array | Genre names from GET /v1/genres, at most 50. |
| [item]Required | string | - |
| is_instrumental | boolean | true for instrumental tracks only, false for vocal tracks only. |
| languages | array | Vocal language codes, at most 50. |
| [item]Required | string | - |
| music_type | string | Music source: "ai", "human" or "mixed" (case-insensitive). |
| ttl_minutes | integer | Lifetime in minutes, clamped to 10..1440. Default 60. Counted from this request: re-sending with another value moves expires_at to now plus the new lifetime, shorter or longer. |
Request example
01{02 "bpm_from": 90,03 "bpm_to": 120,04 "collection_uuid": "string",05 "genres": [06 "lounge",07 "jazz"08 ],09 "is_instrumental": false,10 "languages": [11 "en"12 ],13 "music_type": "ai",14 "ttl_minutes": 6015}
Responses
| Name | Type | Description |
|---|---|---|
| override | object | The active override; null on GET when none is active. |
| bpm_from | integer | Lower BPM bound; omitted when not set. |
| bpm_to | integer | Upper BPM bound; omitted when not set. |
| collection_uuid | string | UUID of a music collection of the account; omitted when not constrained. |
| expires_at | string | When the override expires and the station falls back to its schedule (UTC). |
| genres | array | Genre names from GET /v1/genres; omitted when not constrained. |
| is_instrumental | boolean | true for instrumental tracks only, false for vocal tracks only; omitted when not constrained. |
| languages | array | Vocal language codes; omitted when not constrained. |
| music_type | string | Music source; omitted when not constrained. |
| source | string | Who placed the override: "api" (set through the API or the control panel) or "pos" (an automated point-of-sale rule). |
| 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. |