API : PBX : Voicemail list
Request
This request returns a list of all of the employees voicemails.
| URL | https://api.telecomx.dk/pbx/voicemail |
| Method | GET |
| Access level | PERSONAL, VIEWER, MANAGE, OWNER, RESELLER if voicemails belongs to the user or ADMIN. |
| Query | offset | [optional] Index of the first item to return, default 0. |
| limit | [optional] The number of items to return, default 50, min 1, max 1000. |
| filter | [optional] Search query that will match against searchable fields. |
| new | [optional] True to only return new unread voicemails. |
Query examples
https://api.telecomx.dk/pbx/voicemail
https://api.telecomx.dk/pbx/voicemail?limit=20&offset=100
https://api.telecomx.dk/pbx/voicemail?filter=70305050
https://api.telecomx.dk/pbx/voicemail?new=true
Response
| JSON object |
| offset | Index of the first voicemail returned. |
| limit | Number of voicemails to return. Note that the actual number of returned voicemails may be lower. |
| total | Number of voicemails that can be returned when offset and limit is not considered. This is to be used for paging through the data. |
| voicemails | Array of voicemails, see definition below. |
| Voicemail object |
| _id | Id | Unique id of the voicemail |
| customer | Id | Id of the customer it belongs to. |
| employee | Id | Id of the employee it belongs to. |
| date | Date | Date and time it was received. |
| length | Number | Length in seconds. |
| old | Boolean | True if it has been listened to. |
| aNumber | String | Number of caller, can be E.164, can be local extension. |
| aName | String | Name of caller, if available. |
| aEmployee | Id | Id of the employee the call came from, if applicable. |
| transcription | String | Transcribed text, if generated. |
| transcriptionLanguage | String | The language of the transcribed text. |
Example - normal
{
offset: 0,
limit: 50,
total: 25,
voicemails: [
{
_id: '12345678901234567890AAAA',
customer: '12345678901234567890BBBB',
employee: '12345678901234567890CCCC',
date: '2019-01-01T00:00:00.000Z',
length: 23,
old: false,
aNumber: '+4535203040',
aName: 'Danmarks Radio',
aEmployee: null,
transcription: null,
transcriptionLanguage: null
},
{
...
}
]
}
Errors
| Error code | Message | Description |
| 404 | employee | Employee not found |
| 403 | access_denied | Insufficient access level |
| 500 | internal_error | <Unspecified> |