v1

latestOpenAPI 3.1.02026-07-24317911.4 MB
Media/Music on Hold/Domain

Create a new MOH for Domain from Upload (JSON + Base64 File)

Note: # and anything after is NOT needed, its just to allow multiple examples for the same path/method.

post/domains/{domain}/moh#2

Path parameters

domainstring required

This is the main organization name. This is used to link resource to its group/tenant/organization/enterprise. Then using in path for GET you can set to "~" to use the domain name linked to your token/key instead of the domain name itself when reading for your own domain.

Example:example.com

Request body

synchronous'yes' | 'no' required

When synchronous is requested with "yes" the response will be a 200 on success and will contain a valid JSON representiation of the new resource. If no or left off request a 202 "Accepted" will be given in a success case and this can be considered a success. Synchronous responses will be a little slower as the API will process the geo replication request and wait till the local copy has been written and can be read back berfore sending a response.

indexinteger

The index of the file, Example "2" for greeting 2. In create (POST) requests index cab be omitted and the API will select a new index automatically.

scriptstring required

This is a simple explanation of what the audio is and can include what is said in the audio file for explanation.

convert'yes' | 'no'

Setting yes will allow the API to attempt to convert the file from accepted formats into the correct format for media playback

encodingstring

Used when providing base64 encoded data to give the content tupe of the file.

base64_filestring

This is a base64 encoded string formated without line breaks or spaces.

Example request

{
  "encoding": "audio/wav"
}

Response

codeinteger required
messagestring required