api:mailbox:get
Table of Contents
API : Mailbox Get
Introduction
This request will return the specified mailbox message.
Request
| URL | https://api.telecomx.dk/mailbox/MESSAGE_ID | |
|---|---|---|
| Method | GET | |
| Access level | RESELLER_ADMIN with PORTING feature. | |
| Param | MESSAGE_ID | Id of the message (24 hex-char string) |
Query example
https://api.telecomx.dk/mailbox/1234567890ABCDEF12345678
Response
| Json object - if message is from mailbox IN | ||
|---|---|---|
| _id | Id | Unique id of message. |
| received | Date | Date and time when the message was received. |
| from | String | If the message is an e-mail, then the e-mail address of the sender. If the message is a fax, then the phone number it was sent from. |
| fromName | String | If the message is an e-mail, then the name of the sender. |
| subject | String | If the message is an e-mail then the e-mail subject. If the message is an e-mail and a PDF is attached which contains a porting QRCode or it's a fax PDF which contains a porting QRCode, and it was not automatically linked to a porting, then this is the QRCode found. |
| message | String | If the message is an e-mail, then this is the body of the mail in HTML or plaintext if HTML is not available. |
| files | Array | If the message is an e-mail and it has attachments or if its a fax, then this holds an array of files - see content below. |
| files[x]._id | Id | Id of the file, used for retrieving the file using the getFile API. |
| files[x].filename | String | The files name. |
| files[x].size | Number | File size in bytes. |
| Json object - if message is from mailbox OUT | ||
|---|---|---|
| _id | Id | Unique id of the message. |
| queued | Date | Date and time when it was queued for transmission. |
| to | String | If the message is an e-mail, then the e-mail address to send it to. If the message is a fax then the fax number to send it to. |
| toName | String | If the message is an e-mail, then this is the name of the recipient (if set). |
| subject | String | If the message is an e-mail, then this is the subject. |
| message | String | If the message is an e-mail, then this is the body of the mail. |
| files | Array | If the message is an e-mail and files are to be attached, or if the message is a fax, then this is an array of the files to send - se content below. |
| files[x]._id | Id | Id of the file, used for retrieving the file using the getFile API. |
| files[x].filename | String | The files name. |
| files[x].size | Number | File size in bytes. |
| deleteFiles | Boolean | If true then files attached or faxes will be deleted after transmission. |
| status | String | Status of the transmission: NEW, SENDING, RETRYING, SENT, CANCELLED. |
| when | Date | Date and time the e-mail or fax was sent. |
Note that properties holding no value may be omitted from the object.
Example - if mailbox 'IN'
{ _id: '123457890ABCDEF12345678', received: '2014-01-01T12:34:56.789Z', from: 'donald@duck.com', subject: 'Network drawing', message: '....mailbody....', files: [ { _id: '1234567890ABCDEF12345678', filename: 'Porting_123.pdf', size: 23456 }, { _id: '1234567890ABCDEF12345679', filename: 'porting_123_part2.pdf', size: 54345 } ] }
Example - if mailbox 'OUT'
{ _id: '1234567890ABCDEF12345678', queued: '2014-01-01T12:34:56.789Z', to: 'donald@duck.com', toName: 'Donald Duck', subject: 'Porting documents to sign', message: '..... messagebody .....', files: [ { _id: '1234567890ABCDEF12345678', filename: 'Porting_123.pdf', size: 23456 }, { _id: '1234567890ABCDEF12345679', filename: 'porting_123_part2.pdf', size: 54345 } ], deleteFiles: false, status: 'SENDING', when: null }
Errors
| Error code | Message | Description |
|---|---|---|
| 400 | bad_request | Id not found in request URI |
| 404 | id | Message not found |
| 403 | access_denied | Insufficient access level |
| 500 | internal_error | <Unspecified> |
api/mailbox/get.txt · Last modified: 2023/10/30 14:03 by Per Møller