Announcement Schedules
Create an announcement schedule
POST
https://api.tunio.ai/ v1/ announcements/ schedulesSchedule an announcement on a stream, repeating every interval minutes. An announcement has one schedule per stream: an existing schedule of the same announcement on the same stream is replaced. Without playback the announcement plays between songs (after_track).
Request body
Schedule data
| Name | Type | Description |
|---|---|---|
| announcement_idRequired | string | Announcement to schedule (announcement_id from GET /v1/announcements). |
| intervalRequired | integer | Repeat period in minutes, at least 1. |
| playback | object | How the announcement goes on air. Omit it for after_track (plays between songs). When sent, mode is required;
duck, fade_down and fade_up apply to voiceover only. A voice-over needs a plan with advanced stream sound,
otherwise it plays between songs. |
| duck | number | Voice-over only: music level under the voice, 0..1 (0 mutes the music, 1 leaves it as is). Omit it for the
default, 0.2. |
| fade_down | number | Voice-over only: seconds the music takes to go down before the voice, 0..10. Omit it for the default, 0.8. |
| fade_up | number | Voice-over only: seconds the music takes to come back after the voice, 0..10. Omit it for the default, 1.5. |
| mode | string | Required whenever playback is sent. after_track waits for the song on air to end, cut interrupts the song,
voiceover reads the announcement over the song (needs a plan with advanced stream sound, otherwise it plays
after the song). |
| stream_idRequired | string | Stream that plays the announcement (stream_id from GET /v1/streams). |
Request example
01{02 "announcement_id": "string",03 "interval": 60,04 "playback": {05 "duck": 0.2,06 "fade_down": 0.8,07 "fade_up": 1.5,08 "mode": "voiceover"09 },10 "stream_id": "string"11}
Responses
| Name | Type | Description |
|---|---|---|
| schedule | object | The created schedule. |
| announcement | object | The scheduled announcement. |
| interval | integer | Repeat period in minutes. |
| playback | object | How the announcement goes on air; absent when the schedule uses the default after_track (plays between songs). |
| schedule_id | string | Schedule ID. |
| stream | object | The stream that plays the announcement. |
| 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. |