Messages
List messages
Lists synced messages, newest first, one page at a time. Reads the local copy and does not call the provider.
Rows have no body. Get one message to read its body. Rows from VIP senders have vip: true.
Headers
| Name | Type | Required | Description |
|---|---|---|---|
Authorization |
string | Required | Bearer followed by your API key. |
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id |
string | Required | Inbox id from List inboxes, like inbox_lx2k9a1b. |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
unreadOnly |
string | Optional | "true" for unread only. |
query |
string | Optional | Text to match in subject, sender, or preview. Searches the synced window only. |
folder |
string | Optional | Limit to one synced folder, like INBOX. |
limit |
number | Optional | Page size. Default 50, max 200. |
offset |
number | Optional | Where to start. Pass nextOffset from the last page. |
Response
200 OK.
| Name | Type | Description |
|---|---|---|
inboxId |
string | The inbox you asked for. |
folder |
string | Only when you passed folder. |
total |
number | Matching messages across all pages. |
offset |
number | Start of this page. |
limit |
number | Page size used. |
hasMore |
boolean | true when another page follows. |
nextOffset |
number | null | offset for the next page. |
messages |
object[] | Message rows: id, threadId, folder, from, to, subject, date, snippet, isRead, labels, attachments, and vip: true for VIP senders. |
Errors
| Status | Error | Meaning |
|---|---|---|
| 404 | inbox_not_found |
The inbox id is wrong or the inbox was removed. |
| 409 | inbox_paused |
The person paused this inbox. They resume it on the Inboxes page. |
Any route can also return 401 for a bad key, 402 when the trial ended or payment failed, and 429 when you send too many requests. See Errors.