Announcements
Create a new announcement
POST
https://api.tunio.ai/ v1/ announcementsCreate a voiced announcement: Tunio renders the message with the chosen TTS voice (and the background, if any) in the background. The response has state voice_pending; poll GET /v1/announcements/{announcement_id}/status until the state is completed, then audio_url links to the finished audio on the CDN. Schedule it on a stream with POST /v1/announcements/schedules.
Request body
Announcement data
| Name | Type | Description |
|---|---|---|
| background_uuid | string | Optional background music under the voice: a background_id from GET /v1/announcements/backgrounds. An unknown id gives 400 "Invalid background UUID". |
| background_volume | number | Volume of the background music, 0..1. Defaults to 0.3; ignored without background_uuid. |
| end_date | string | Last day the announcement may play (RFC3339). The time part is dropped: the window ends at 23:59:59 of that day. |
| has_audio_warning | boolean | Play the alert tone before and after the announcement. Defaults to false. |
| messageRequired | string | Text the voice reads, required (max 500 characters). |
| model_id | string | Voice (model_id from GET /v1/tts/models, including the caller's cloned voices). If omitted, the default voice is used. An unknown voice gives 400 "Invalid TTS model". |
| speed | number | Tempo multiplier of the voice. Defaults to 1.0. |
| start_date | string | First day the announcement may play (RFC3339). The time part is dropped: the window starts at 00:00 of that day. |
| titleRequired | string | Announcement title shown in the control panel, required (max 255 characters). |
Request example
01{02 "background_uuid": "string",03 "background_volume": 0.3,04 "end_date": "2027-12-31T00:00:00Z",05 "has_audio_warning": false,06 "message": "Today's weather will be sunny with temperatures reaching 25°C",07 "model_id": "string",08 "speed": 1,09 "start_date": "2027-01-01T00:00:00Z",10 "title": "Daily Weather Update"11}
Responses
| Name | Type | Description |
|---|---|---|
| announcement_id | string | ID of the created announcement. |
| state | string | Always voice_pending: the voice is generated in the background. Poll GET /v1/announcements/{announcement_id}/status until it is completed to get audio_url. |
| success | boolean | Always true. |
| Name | Type | Description |
|---|---|---|
| errors | object | Field errors keyed by JSON field name, set with validation_error. |
| max_length | integer | Maximum length in characters, set with "Title is too long" (255) and "Message is too long" (500). |
| message | string | Error: validation_error, "Title is too long", "Message is too long", "Invalid TTS model", "Invalid background UUID" or "Invalid background volume". |
| success | boolean | Always false. |
| 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. |