/api/sounds/* plays short notification sounds on the machine running the backend. They are used for audible cues — for example, an agent finishing a long task. Sounds are synthesized by the backend; no audio file upload is involved.
Play a sound (body)
POST /api/sounds/play
{ "sound": "notice" }
Queues playback of a named sound and returns immediately:
{ "ok": true, "sound": "notice", "queued": true }
Unknown names fall back to a default. Common names include notice and error.
Play a sound (path)
POST /api/sounds/{sound}/play
Same as above with the sound name in the path — convenient for a quick curl or a one-liner from an agent:
POST /api/sounds/error/play
Returns { "ok": true, "sound": "error", "queued": true }.
Notes
- Playback happens on the host machine, so it is only audible at the computer running the desktop app / backend.
- The call is fire-and-forget: it queues the sound and returns without waiting for playback to finish.
Leave a Reply