Audio items can be played back to a caller. An audio item consists of metadata (name, length, owner) and link to the audio on the audio servers.
This request will update the name of an audio item (metadata, not the actual audio).
| URL | https://api.telecomx.dk/pbx/audio/AUDIO_ID | ||
|---|---|---|---|
| Method | POST | ||
| Access level | PERSONAL if audio belongs to the user MANAGER, OWNER, RESELLER, ADMIN. |
||
| Param | AUDIO_ID | String | Id of the audio (24 hex-char string) |
| Body | name | String | Name/description of the audio item. |
{ name: 'Outside opening hours' }
The response will be the updated audio item, if no errors occurred.
| Json object | ||
|---|---|---|
| _id | Id | Unique ID of the audio. |
| usedBy | Array | Array of Id's of - dialplan items that uses the audio. |
| name | String | Human readable name of the audio. |
| length | Number | Length of the audio in seconds. |
Note that properties holding no value may be omitted from the object.
{ _id: '12345678901234578901234', usedBy: [], name: 'Outside opening hours', length: 5 }
| Error code | Message | Description |
|---|---|---|
| 404 | id | Audio not found |
| 422 | name | Name of audio is missing |
| 403 | access_denied | Insufficient access level |
| 500 | internal_error | <Unspecified> |