Sound Files (/sound/)
You can test API methods on the interactive API browser page and without writing code
Some of the resources described on the page may not be available by default due to the type of application (see Creating and authorizing applications).
The "Sound Files" resource allows you to download and manage sound files that you can later use to customize your voice greetings, queues, voicemail greetings, and more.
Downloading Sound Files
Sound files in WAV and MP3 formats are supported. The maximum file size is 10 megabytes.
Replacing Sound File Content
You can replace the sound file content using the resource
POST /client/{client_id}/sound/{sound_id}
Content-Type Header when Downloading Files
When downloading files using the POST method, set for the header Content-Type the value multipart/form-data with the option boundary that contains the sequence of characters separating the request body parts. The sound file parameters and the file itself are passed as form fields. In all other methods, including updating information about the sound file, you should use the usual header Content-Type: application/json and send the information in JSON format. It is worth noting that in most cases, various libraries for working with web resources generate the request body and the header Content-Type with the option boundary automatically.
Description of Request Fields
Parameter | Type | Mandatory | Description |
---|---|---|---|
title | string | yes | Name of the sound file |
file | file | yes | Sound file in WAV or MP3 format. The maximum file size is 10 megabytes. WAV files that are Float type encoded are not supported. WAV files are not supported that contain no information about their format: encoding, number of channels, bit rate, frequency, etc |
If the file is downloaded successfully, the "Sound file" resource is returned containing the sound file identifier (id field) that is used to indicate the sound in the queue resources, voice greetings, etc.
Example
Downloading the sound file test_sound.wav with the name “Greeting file”.
Getting List of Sound Files
All sounds available for use by the client or internal number are retrieved using the corresponding resource. The resulting list contains information about all sound files available for use by the client or extension number, including those ones downloaded by the client administrator or dealer.
Description of Fields
Parameter | Type | Description |
---|---|---|
id | integer | Identifier of the sound file |
title | string | Name of the sound file |
client_id | integer | Identifier of the client that owns the sound file. May be null if the client is not the sound owner |
dealer_id | integer | Identifier of the dealer that owns the sound file. May be null if the dealer is not the sound owner |
filename | string | The system file name that may be used, in particular, to play the sound using the voice menu function "Call Interactive" |