Announcement API
Play a text-to-speech announcement on a Speaker device, optionally combined with audio, video, images, on-screen text or a website.
Endpoint
Section titled “Endpoint”GET/POST https://api-v3.voicemonkey.io/announcePOST is recommended for non-trivial requests (longer speech, JSON body, media URLs). GET is supported for quick browser tests and tools that can only build URLs.
Example request
Section titled “Example request”curl -X POST https://api-v3.voicemonkey.io/announce \ -H "Content-Type: application/json" \ -d '{ "token": "YOUR_TOKEN", "device": "YOUR_SPEAKER_DEVICE_ID", "speech": "Dinner is ready!" }'Parameters
Section titled “Parameters”| Parameter | Required | Description |
|---|---|---|
token | yes | Your API token. See Authentication. |
device | yes | The ID of the Speaker device to announce on. List your devices with GET /devices. |
speech | yes* | The text to speak via TTS. Required unless you’re playing media or showing on-screen text only. Supports {VARIABLE_NAME} placeholders. |
voice | no | Amazon Polly voice ID (e.g. Joanna, Brian, Hans, Celine). Leave blank for the user’s default. Browse the full list in the Playground. |
language | no | BCP-47 language code passed to the Alexa TTS engine (e.g. en-US, de-DE, fr-FR). |
chime | no | Soundbank URL of a built-in Alexa sound to play before the speech (e.g. soundbank://soundlibrary/alarms/air_horns/air_horn_01). The Playground has a dropdown of all supported chimes. |
| Parameter | Required | Description |
|---|---|---|
audio | no | URL (or media://<slug> Media Library reference) of an audio file to play. |
background_audio | no | Audio that plays underneath the speech rather than before/after it. |
audio_tracks | no | Array of audio tracks for advanced sequencing. Easiest to build via the Playground. |
image | no | URL (or Media Library reference) of an image to display on Echo Shows. |
video | no | URL (or Media Library reference) of a video to play on Echo Shows. |
video_repeat | no | How many times to loop the video. -1 for infinite, 0 (or blank) to play once. Looping isn’t guaranteed — actions on the Echo Show may interrupt the session. |
website_url | no | URL of a website to load in the Echo Show’s on-device browser. |
Advanced image display
Section titled “Advanced image display”These map directly onto the APL Image component on screen-enabled Echos. Values include their unit suffix (e.g. 100%, 48dp, 10vw).
| Parameter | Description |
|---|---|
media_scale | none, fill, best-fill, best-fit, best-fit-down. |
media_align | top-left, top, top-right, left, center, right, bottom-left, bottom, bottom-right. |
media_border_radius | Border radius (e.g. 12dp). |
media_width | Width (e.g. 100%, 480dp). |
media_height | Height (e.g. 60vh, 200dp). |
Full-screen text display
Section titled “Full-screen text display”Big centered text shown full-screen on screen-enabled devices (Echo Show / Spot / Hub).
| Parameter | Description |
|---|---|
text_display | The text to display. Pair with the styling params below. |
text_display_colour | Hex font colour (e.g. #FFFFFF). Defaults to white. |
text_display_bg_colour | Hex background colour (e.g. #000000). Defaults to black. |
text_display_size | Font size in dp as a plain number (e.g. 40). Suggested: 24 (Small), 40 (Medium), 120 (Large), 200 (XL). Defaults to 40. |
| Parameter | Description |
|---|---|
character_display | Text to show on the segmented character display of an Echo Dot with Clock. |
You can combine any subset of these — e.g. send speech + image + text_display in one call to talk, show a picture and overlay big text. Omit speech entirely to make the screen the whole response.
Text display example
Section titled “Text display example”curl -X POST https://api-v3.voicemonkey.io/announce \ -H "Content-Type: application/json" \ -d '{ "token": "YOUR_TOKEN", "device": "YOUR_SPEAKER_DEVICE_ID", "text_display": "Dinner is ready!", "text_display_colour": "#FFFFFF", "text_display_bg_colour": "#DC2626", "text_display_size": "64" }'Response
Section titled “Response”Successful calls return 200:
{ "success": true, "data": "OK"}If any var- sidecar updates ran, the response also includes a variableUpdates array — see below.
Setting variables in the same request
Section titled “Setting variables in the same request”Any parameter prefixed with var- is upserted as a variable before the announcement runs, so the new value is available to {NAME} placeholders inside speech (and other text fields) in the same call:
curl -X POST https://api-v3.voicemonkey.io/announce \ -H "Content-Type: application/json" \ -d '{ "token": "YOUR_TOKEN", "device": "YOUR_SPEAKER_DEVICE_ID", "speech": "Hello {NAME}, the camera detected {STATUS}.", "var-NAME": "Joe", "var-STATUS": "motion" }'See Variables API → Setting variables alongside any other API call for the full rules.
Errors
Section titled “Errors”Errors return a JSON body with an error field and an HTTP status code:
| Status | Response body | Meaning |
|---|---|---|
400 | { "error": "MISSING_DEVICE" } | No device parameter supplied. |
404 | { "error": "DEVICE_NOT_FOUND" } | The device ID isn’t on this account. |
401 | { "error": "UNAUTHORIZED" } | No token supplied. |
401 | { "error": "INVALID_TOKEN" } | Token doesn’t match an active token. |
429 | { "error": "THROTTLED", "lockoutUntil": "<ISO>" } | Per-user safety lockout — back off until the timestamp. |
429 | { "error": "MONTHLY_QUOTA_EXCEEDED", "periodEnd": "<ISO>" } | Plan’s monthly request budget exhausted. Wait for the period end or upgrade. |
500 | { "error": "ALEXA_TRIGGER_FAILED" } | Generic upstream Alexa failure — retry with backoff. |
- Use
{VARIABLE_NAME}placeholders insidespeech,website_urland other text fields to interpolate variables. - For long-form TTS, break content into multiple sentences — Alexa handles shorter TTS much more reliably.
- Use the Playground to compose requests visually — it has dropdowns for voices, languages and chimes, and generates ready-to-paste snippets in cURL, Python, JavaScript, Home Assistant YAML and more.