Stream

Set music override

POST
https://api.tunio.ai/v1/stream/{stream_id}/override

Overrides 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.

路径参数

名称类型说明
stream_idRequiredstringStream UUID

请求体

Music override request

名称类型说明
bpm_frominteger
Lower BPM bound, 0 or more; must not be greater than bpm_to.
bpm_tointeger
Upper BPM bound, 0 or more.
collection_uuidstring
UUID of a music collection of the stream owner. An unknown collection gives 400.
genresarray
Genre names from GET /v1/genres, at most 50.
[item]Requiredstring
-
is_instrumentalboolean
true for instrumental tracks only, false for vocal tracks only.
languagesarray
Vocal language codes, at most 50.
[item]Requiredstring
-
music_typestring
Music source: "ai", "human" or "mixed" (case-insensitive).
ttl_minutesinteger
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.
请求示例
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": 60
15}

响应

名称类型说明
overrideobject
The active override; null on GET when none is active.
bpm_frominteger
Lower BPM bound; omitted when not set.
bpm_tointeger
Upper BPM bound; omitted when not set.
collection_uuidstring
UUID of a music collection of the account; omitted when not constrained.
expires_atstring
When the override expires and the station falls back to its schedule (UTC).
genresarray
Genre names from GET /v1/genres; omitted when not constrained.
is_instrumentalboolean
true for instrumental tracks only, false for vocal tracks only; omitted when not constrained.
languagesarray
Vocal language codes; omitted when not constrained.
music_typestring
Music source; omitted when not constrained.
sourcestring
Who placed the override: "api" (set through the API or the control panel) or "pos" (an automated point-of-sale rule).
successboolean
Always true.
名称类型说明
messagestring
Error code or human-readable error details.
successboolean
Always false for error payloads.
名称类型说明
messagestring
Error code or human-readable error details.
successboolean
Always false for error payloads.
名称类型说明
messagestring
Error code or human-readable error details.
successboolean
Always false for error payloads.
名称类型说明
messagestring
Error code or human-readable error details.
successboolean
Always false for error payloads.
名称类型说明
messagestring
Error code or human-readable error details.
successboolean
Always false for error payloads.
名称类型说明
messagestring
Error code or human-readable error details.
successboolean
Always false for error payloads.