This request will upload a song to a music on hold playlist.
The following formats are supported:
| Type | Description |
|---|---|
| .wav | Microsoft PCM wave files |
| .mp3 | Mpeg 3 layer 2 audio |
| .m4a | Mpeg 4 audio (mostly used by Apple). |
| .ogg | Ogg-Vorbis. |
| .g722 | 7000Hz Wideband mono audio at 32kHz, 48/56/64kbit/s. (used by PBX's). |
| .alaw | 3500Hz narrowband mono audio at 13bit, 8kHz, 64Kbit/s. (used by PBX's). |
| .ulaw | 3500Hz narrowband mono audio at 13bit, 8kHz, 64Kbit/s. (used by PBX's). |
| .gsm | 3500Hz narrowband mono audio at 13bit, 8kHz, 13Kbit/s. (used by PBX's). |
| .sln16 | Wideband mono audio at 16bit, 16Khz. (used by PBX's). |
| URL | https://api.telecomx.dk/pbx/musiconhold/MOH_ID/audio | ||
|---|---|---|---|
| Method | POST | ||
| Access level | MANAGER or OWNER if user belongs to the customer that owns the music on hold class. RESELLER if customer belongs to the reseller. ADMIN. |
||
| Params | MOH_ID | String | Id of the music on hold class to upload the song into. |
| Body | file | Binary | File to upload. |
N/A
Metadata about the uploaded audio file.
| JSON object | ||
|---|---|---|
| success | Boolean | True on success. |
{ id: '12345678901234567890ABCD', name: 'My song', length: 120 }
| Error code | Message | Description |
|---|---|---|
| 404 | id | Music on hold not found |
| 404 | file | The file was missing or invalid |
| 422 | file | Invalid audio file |
| 422 | name | Name too short or missing |
| 403 | access_denied | Insufficient access level |
| 500 | internal_error | <Unspecified> |