Message
List messages in a folder
Lists messages in a mailbox folder
get/v1/account/{account}/messages
Request
- Base URL: https://your-emailengine-host
- URL: https://your-emailengine-host/v1/account/{account}/messages
- Auth: HTTP bearer
Path parameters
accountstring required
Unique identifier for the email account
Example:user123
Query parameters
pathstring required
Mailbox folder path. Can use special use labels like "\Sent". Special value "\All" is available for Gmail IMAP, Gmail API, MS Graph API accounts.
Example:INBOX
cursorstring
Paging cursor from nextPageCursor or prevPageCursor value
Example:imap_kcQIji3UobDDTxc
pageinteger
Page number (zero-indexed, so use 0 for the first page). Only supported for IMAP accounts
pageSizeinteger
How many entries per page
Example:20
Headers
x-ee-timeoutinteger
Request timeout in milliseconds. Raises the command timeout above the EENGINE_TIMEOUT default for a long-running request; a value below the default has no effect
Example:30000
Response
Returns a page of messages from the folder, newest first.
Example response
{
"total": 120,
"pages": 24,
"nextPageCursor": "imap_kcQIji3UobDDTxc",
"prevPageCursor": "imap_kcQIji3UobDDTxc",
"messages": [
{
"id": "AAAAAgAACrI",
"uid": 12345,
"emailId": "1278455344230334865",
"threadId": "1694936993596975454",
"path": "INBOX",
"date": "2021-03-22T13:13:31.000Z",
"unseen": true,
"flagged": true,
"size": 1040,
"subject": "What a wonderful message",
"from": {
"name": "From Me",
"address": "sender@example.com"
},
"replyTo": [
{
"name": "Some Name",
"address": "user@example.com"
}
],
"to": [
{
"name": "Some Name",
"address": "user@example.com"
}
],
"cc": [
{
"name": "Some Name",
"address": "user@example.com"
}
],
"messageId": "<test123@example.com>",
"inReplyTo": "<7JBUMt0WOn+_==MOkaCOQ@mail.gmail.com>",
"flags": [
"\\Seen"
],
"labels": [
"\\Important"
],
"attachments": [
{
"id": "AAAAAgAACrIyLjI",
"contentType": "image/gif",
"encodedSize": 48,
"embedded": true,
"inline": true,
"contentId": "<unique-image-id@localhost>",
"filename": "image.png",
"method": "REQUEST"
}
],
"text": {
"id": "AAAAAgAACqiTkaExkaEykA",
"encodedSize": {
"plain": 1013,
"html": 1013
}
},
"preview": "Hello, here is the report you asked for",
"category": "primary",
"messageSpecialUse": "\\Sent"
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.