Announcements
Update an announcement
PUT
https://api.tunio.ai/ v1/ announcements/ {announcement_id}Update an existing announcement. Only the fields sent change; start_date and end_date sent as null remove that end of the date window. Changing message, model_id or speed regenerates the voice: the state goes back to voice_pending, and interval schedules skip the announcement until it is completed again. Changing only background_uuid or background_volume remixes the existing voice (mix_pending). An uploaded announcement accepts only title, has_audio_warning, start_date and end_date. An announcement that is being generated or converted cannot be edited (409).
路径参数
| 名称 | 类型 | 说明 |
|---|---|---|
| announcement_idRequired | string | Announcement ID |
请求体
Updated announcement data
| 名称 | 类型 | 说明 |
|---|---|---|
| background_uuid | string | New background music: a background_id from GET /v1/announcements/backgrounds, or an empty string to remove the background. TTS announcements only. |
| background_volume | number | New background music volume, 0..1. TTS announcements only. |
| end_date | string (date-time) | Last day the announcement may play (RFC3339). Omit it to keep the current value; null removes the end limit. |
| has_audio_warning | boolean | Play the alert tone before and after the announcement. |
| message | string | New text for the voice (max 500 characters). Regenerates the voice. TTS announcements only. |
| model_id | string | New voice (model_id from GET /v1/tts/models). Regenerates the voice. TTS announcements only. |
| speed | number | New tempo multiplier of the voice. Regenerates the voice. TTS announcements only. |
| start_date | string (date-time) | First day the announcement may play (RFC3339). Omit it to keep the current value; null removes the start limit. |
| title | string | New announcement title (max 255 characters). |
请求示例
01{02 "background_uuid": "string",03 "background_volume": 0.3,04 "end_date": "2027-12-31T00:00:00Z",05 "has_audio_warning": true,06 "message": "Updated weather message",07 "model_id": "string",08 "speed": 1,09 "start_date": "2027-01-01T00:00:00Z",10 "title": "Updated Weather Update"11}
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| success | boolean | True when the request completed without errors. |
| 名称 | 类型 | 说明 |
|---|---|---|
| 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. |
| 名称 | 类型 | 说明 |
|---|---|---|
| message | string | Error code or human-readable error details. |
| success | boolean | Always false for error payloads. |
| 名称 | 类型 | 说明 |
|---|---|---|
| message | string | Error code or human-readable error details. |
| success | boolean | Always false for error payloads. |
| 名称 | 类型 | 说明 |
|---|---|---|
| message | string | Error code or human-readable error details. |
| success | boolean | Always false for error payloads. |
| 名称 | 类型 | 说明 |
|---|---|---|
| message | string | Error code or human-readable error details. |
| success | boolean | Always false for error payloads. |
| 名称 | 类型 | 说明 |
|---|---|---|
| message | string | Error code or human-readable error details. |
| success | boolean | Always false for error payloads. |