This request is invoked by the PBX servers when a caller has left a message on a voicemail to e-mail item. The PBX has recorded the message, stored it on the audio server and hung up the caller; this request hands the message to the API, which e-mails it to the item's addresses.
The API answers at once and does the rest in the background:
A request for a message the API has already taken over - the PBX repeats it when an answer is lost - is answered the same way, but the message is never e-mailed twice.
The PBX treats 202 as accepted. On 404 and 422 it deletes the message itself and does not retry; on any other answer, or no answer, it tries 3 times, 5 and 30 seconds apart, and then deletes the message.
Internal details of the background work: PBX voicemail to e-mail.
| URL | https://api.telecomx.dk/pbx/voicemailtoemail/VOICEMAIL_TO_EMAIL_ID/message | ||
|---|---|---|---|
| Method | POST | ||
| Access level | None - may only be invoked from PBX server IP addresses. | ||
| Param | VOICEMAIL_TO_EMAIL_ID | Id | Id of the voicemail to e-mail item the message was left on (24 hex-char string). |
| Body | audio | Id | Id of the message on the audio server. |
| date | String | When the message was recorded, ISO 8601. | |
| length | Number | Length of the message in seconds. | |
| caller.number | String | The caller's number as on the call. | |
| caller.name | String | The caller's name, null if not known. | |
| caller.privacy | Boolean | True for a secret number - the number and name are then never shown in the e-mail nor given to the AI. | |
| callId | String | [optional] Id of the call, for logging only. |
|
{ "audio": "12345678901234567890BBBB", "date": "2026-11-06T13:00:00.000Z", "length": 23.4, "caller": { "number": "+4512345678", "name": "Jens Hansen", "privacy": false }, "callId": "a84b4c76e66710" }
HTTP status 202.
| JSON object | ||
|---|---|---|
| accepted | Boolean | Always true - the message has been taken over. |
{ "accepted": true }
| Error code | Message | Description |
|---|---|---|
| 403 | access_denied | Not invoked from a PBX server |
| 404 | not_found | Voicemail to e-mail item not found, deleted or not a voicemail to e-mail item |
| 422 | <property> | The body is invalid - the message names the property |
| 500 | internal_error | <Unspecified> |
The PBX stores the message on the audio server with the auth URL https://api.telecomx.dk/pbx/voicemailtoemail/audio/{meta.id}/auth?token={token}. That request always answers 403 access_denied: no user may fetch a message, not even with a valid token. Only the API and the PBX servers read it, with the audio server key.