Skip to main content
Audio and Dictionary routes accept Admin, Manager, and Agent API keys. Both areas store media in the current workspace. Upload only content you are authorized to use.

Audio endpoints

Upload audio

POST /audio-management/upload The API accepts one WAV file up to 50 MiB.
Optional form fields are:
  • title, up to 255 characters;
  • description, up to 500 characters;
  • usageType: welcome, goodbye, question, prompt, hold_music, notification, or other; and
  • tags: an array or comma-separated string.
Example 201 response:
Pending audio can be playable while download is unavailable. Use the returned file.playable and file.downloadable booleans; do not infer readiness from upload success.

List, retrieve, and update audio

GET /audio-management/audios supports standard pagination/search/sort plus usageType and tags. Valid sort fields in the API are createdAt, title, and durationSeconds.
Retrieve metadata with GET /audio-management/audio/:id/metadata. Stream the binary with GET /audio-management/audio/:id only after playable is true.
GET /audio-management/audio/:id/details returns the same metadata plus the current workspace’s id, name, and slug. GET /audio-management/audios/usage/:usageType returns a non-paginated array filtered by one valid usage type:
Update metadata with:
The update fields and limits match the upload metadata fields.

Create a playback URL or delete

Use file.playable to determine whether authenticated streaming is available. Request a signed playback URL only when file.downloadable is true. A playable file can still be unavailable through a signed URL. GET /audio-management/audio/:id/playback-url accepts an optional expiresIn query parameter:
expiresIn must be 1–86,400 seconds. Treat the URL as a secret until it expires. Delete with:
Response: 200 with { "message": "Audio deleted successfully" }. Deletion can break flows or other configuration that references the asset; check use before deletion.

Dictionary endpoints

Create and list dictionaries

name is required and limited to 256 characters. language must be ar or fr. Language is immutable because entries are recorded for that language. Example response:
List workspace dictionaries with:
Set includeSystem=true to include shared read-only system dictionaries. Do not attempt to edit or delete a system dictionary. Retrieve or update one workspace dictionary with:
PATCH accepts only name and nullable description; language cannot change. Delete a workspace dictionary with:

Add and inspect an entry

POST /dictionaries/:dictionaryId/entries accepts one WAV file up to 10 MiB and a key up to 256 characters.
Example 201 response:
List entries with standard page, limit, and search query parameters. Retrieve a single entry at /dictionaries/:dictionaryId/entries/:key and its WAV binary at the nested /audio path.
The list response uses { data, meta }. Each entry contains its id, dictionaryId, key, audioId, audit timestamps, and nullable audit actor fields. The audio route returns audio/wav with Cache-Control: no-store. Delete an entry with:
URL-encode keys that contain spaces or reserved URL characters.
Audio and dictionary mutations can change customer-facing voice output. Test pronunciation in a non-production flow before relying on it in calls. Uploaded recordings can contain personal or licensed voice material.
Common failures are 400 for an unsupported file or invalid field, 404 for an unknown or cross-workspace resource, and a conflict when a key or name violates uniqueness rules.

Pagination and request retries

Page-based lists use page=1 and limit=20 by default, with a maximum limit of 100, unless the endpoint above specifies an exception. Follow the response’s pagination metadata. See pagination for the response envelope. If a request returns 429, wait for Retry-After when supplied before retrying. For a mutation that times out, check the resource or run before repeating the request; repeating it can duplicate work. See errors for authentication and validation failures.