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 

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 

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

"Client" Section Resources 

POST /client/{client_id}/sound/ 

Add the sound file 

URL Options 

Name 

Type 

Name 

Type 

client_id 

string 

Request Options 

Parameter 

Type 

Parameter 

Type 

title 

string 

file 

file 

Response Fields 

Name 

Type 

Name 

Type 

dealer_id 

long 

id 

long 

client_id 

long 

title 

string 

filename 

string 

GET /client/{client_id}/sound/ 

Get the list of the sound files available to the client 

Request Options 

Name 

Type 

Name 

Type 

id 

array [integer] 

own_only 

boolean 

title 

array [string] 

Response Fields 

Name 

Type 

Name 

Type 

dealer_id 

long 

id 

long 

client_id 

long 

title 

string 

filename 

string 

POST /client/{client_id}/sound/{sound_id} 

Replace the sound file content 

URL Options 

Name 

Type 

Name 

Type 

client_id 

string 

sound_id 

integer 

Request Options 

title 

string 

Sound file name, optional field, if not specified the old title will be saved

file 

file 

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. 

Response Fields 

Name 

Type 

Name 

Type 

dealer_id 

long 

id 

long 

client_id 

long 

title 

string 

filename 

string 

PUT /client/{client_id}/sound/{sound_id} 

Update the sound file information 

URL Options 

Name 

Type 

Name 

Type 

client_id 

string 

sound_id 

integer 

JSON Options 

Name 

Type 

Mandatory 

Name 

Type 

Mandatory 

title 

string 

нет 

Response Fields 

Name 

Type 

Name 

Type 

dealer_id 

long 

id 

long 

client_id 

long 

title 

string 

filename 

string 

GET /client/{client_id}/sound/{sound_id} 

Get the sound file information 

URL Options 

Name 

Type 

Name 

Type 

client_id 

string 

sound_id 

integer 

Response Fields 

Name 

Type 

Name 

Type 

dealer_id 

long 

id 

long 

client_id 

long 

title 

string 

filename 

string 

"Extension Number” Section Resources