GET/users/{userId}/mail/{mailId}
Reads a message.
Note
- Inline image
- A text string such as "cid:reddotiVBORw0KGgoAAAA" in the message body must be changed to the data that matches the same cid in the attachment information to show an inline image.
- Example) The message body must be replaced as in the following example.
- AS-IS:
<img src='cid:reddotiVBORw0KGgoAAAA' alt='Red dot' >- TO-BE:
<img src='data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==' alt='Red dot' />- To send the message, the data must be changed to
<img src=\"cid:reddotiVBORw0KGgoAAAA\" alt=\"Red dot\" />again. (RFC 2387)
- RFC 2387: https://www.rfc-editor.org/rfc/rfc2387"
OAuth 2.0 authentication.
For more information, see Authentication and Authorization.
mail
mail.read
| Parameter | Type | Description |
|---|---|---|
| userId | string | Member ID (must be URL-encoded)
required example : me |
| mailId | string | Message ID required example : 1 |
| Parameter | Type | Description |
|---|---|---|
| hasThreads | boolean | Indicates whether to get an email thread. default : false allowEmptyValue : true |
| threadCount | integer | Number of messages in the thread default : 5 minimum : 0 maximum : 400 format : int32 allowEmptyValue : true |
| Header | type | Description |
|---|---|---|
| Authorization | string | Bearer {token} required |
OK
| Property | Type | Description |
|---|---|---|
| object (mail) | required | |
| attachments | array (AttachmentFile) | Attachment information required minItems : 0 |
| threads | array (Threads) |
| Property | Type | Description |
|---|---|---|
| mailId | integer | Message ID required format : int64 |
| folderId | integer | Folder ID required format : int32 |
| status | integer | Message status
Use the bit AND operator to get the message status. required format : int64 |
| from | object (from) | Email information required |
| replyTo | object (replyTo) | Email information |
| to | array (MailAddress) | To required minItems : 1 |
| cc | array (MailAddress) | Cc minItems : 0 |
| bcc | array (MailAddress) | Bcc minItems : 0 uniqueItems : true |
| subject | string | Subject required minLength : 1 maxLength : 180 |
| body | string | Body required minLength : 1 |
| receivedTime | string | Received time required example : 2021-07-16T19:20:30+09:00 |
| sentTime | string | Sent time required example : 2021-07-16T19:20:30+09:00 |
| size | integer | Message size in bytes required format : int32 |
| securityLevel | string | Security level of the message
default : General Allowed values : General, Restricted, Confidential, Non-business |
| securityDeleteDate | string | The deletion date scheduled for the secure message |
| useForwarding | boolean | Indicates whether to allow forwarding. default : true |
| charset | string | Charset used to read the message. |
| spamType | string | Spam message filter
Allowed values : SYSTEM_DEFINE, USER_DEFINE, USER_REPORT, USER_MOVE, NORMAL |
| spamTypeDetail | string | Spam type details |
| Property | Type | Description |
|---|---|---|
| name | string | Email name |
| string | Email address (RFC822 format) required minLength : 1 |
| Property | Type | Description |
|---|---|---|
| name | string | Email name |
| string | Email address (RFC822 format) required minLength : 1 |
| Property | Type | Description |
|---|---|---|
| name | string | Email name |
| string | Email address (RFC822 format) required minLength : 1 |
| Property | Type | Description |
|---|---|---|
| attachmentId | integer | Attachment ID
required format : int32 |
| contentType | string | Attachment content type required |
| charset | string | File's charset nullable : true |
| filename | string | File name required minLength : 1 maxLength : 250 |
| encoding | string | File encoding nullable : true |
| size | integer | File size (in bytes) required format : int32 |
| bigFileExpireTime | string | Validity period of the attachment with a limited retention period. |
| bigFileFid | string | Fid of the attachment with a limited retention period.
|
| cid | string | Content-ID (cid used to add an inline image) nullable : true |
| contentDisposition | string | Content-Disposition
Allowed values : inline, attachment |
| data | string | Inline image data (encoded with Base64) nullable : true |
| Property | Type | Description |
|---|---|---|
| mailId | integer | Message ID required format : int64 |
| folderId | integer | Folder ID required format : int32 |
| status | string | Message status
required |
| from | object (from) | Email information required |
| replyTo | object (replyTo) | Email information |
| to | array (MailAddress) | To required minItems : 1 |
| cc | array (MailAddress) | Cc (always empty for an email thread) minItems : 0 |
| bcc | array (MailAddress) | Bcc (always empty for an email thread) minItems : 0 uniqueItems : true |
| subject | string | Subject required minLength : 1 maxLength : 180 |
| receivedTime | string | Received time required example : 2021-07-16T19:20:30+09:00 |
| sentTime | string | Sent time required example : 2021-07-16T19:20:30+09:00 |
| size | integer | Message size in bytes required format : int32 |
| securityLevel | string | Security level of the message
default : General Allowed values : General, Restricted, Confidential, Non-business |
| useForwarding | boolean | Indicates whether to allow forwarding. default : true |
| attachCount | integer | Number of attachments |
| preview | string | Text for preview |
| isImportant | boolean | Indicates whether the message is important (the red exclamation mark is added to the message's subject). |
example
1{2 "attachments": [3 {4 "attachmentId": 1,5 "contentType": "image/jpeg",6 "charset": null,7 "filename": "file1.jpg",8 "encoding": null,9 "size": 919,10 "bigFileExpireTime": "",11 "bigFileFid": ""12 },13 {14 "attachmentId": 2,15 "contentType": "image/jpeg",16 "charset": null,17 "filename": "file2.jpeg",18 "encoding": null,19 "size": 253,20 "bigFileExpireTime": "2022-10-27T00:02:01+09:00",21 "bigFileFid": "RwnmKqg9FAumKwYZHqUmHqUmKoumFxKwKxvmKquqHqurKoKmFqblaxvj1XUwHqg9aAM/axI0Fov9axpCMobqp6FSazEZaACSFA34aAUd&rl=24101"22 }23 ],24 "mail": {25 "mailId": 76285,26 "folderId": 6,27 "status": 4101,28 "from": {29 "name": "works",30 "email": "works@example.com"31 },32 "replyTo": {33 "name": "reply",34 "email": "reply@example.com"35 },36 "to": [37 {38 "name": "admin",39 "email": "admin@example.com"40 }41 ],42 "cc": [43 {44 "name": "admin",45 "email": "admin@example.com"46 }47 ],48 "bcc": [49 {50 "name": "admin",51 "email": "admin@example.com"52 }53 ],54 "subject": "Subject",55 "body": "Body",56 "receivedTime": "2022-10-27T00:02:01+09:00",57 "sentTime": "2022-10-27T00:02:01+09:00",58 "size": 1290078,59 "securityLevel": "General",60 "securityDeleteDate": "",61 "useForwarding": true,62 "charset": "",63 "spamType": "NORMAL",64 "spamTypeDetail": "NORMAL"65 },66 "threads": [67 {68 "mailId": 22715,69 "folderId": 0,70 "status": "Read",71 "from": {72 "name": "admin",73 "email": "admin@example.com"74 },75 "to": [76 {77 "name": "admin",78 "email": "admin@example.com"79 }80 ],81 "subject": "Email subject",82 "receivedTime": "2025-04-09T20:19:07+09:00",83 "sentTime": "2025-04-09T20:19:07+09:00",84 "size": 14452,85 "securityLevel": "General",86 "useForwarding": true,87 "attachCount": 0,88 "preview": "",89 "isImportant": true90 }91 ]92}Bad Request