listMessages
listMessagesBrowse messages in a single mail folder newest first, optionally within a date range, and return message cards without bodies for reading or thread lookup.
Instructions
Browse locally indexed messages in one folder, newest first, optionally within a date range. Undated messages come last without date bounds and are excluded with bounds. For keyword search use search; for a date range across all folders use search without query.
Returns cards without bodies. Pass a card's key and the same connection to getMessage to read it, or to getThread for its conversation. Every stored copy counts separately here; search and getThread group recognized copies. read/flagged describe the last sync observation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Results per page: 1 to 200, default 50; larger values are capped at 200 | |
| since | No | Include messages at or after this date/time, using the message Date header, not receipt or download time. Format: YYYY-MM-DD (UTC midnight), or ISO-8601 with Z or an offset, e.g. 2026-10-01T09:00:00+03:00; at most 3 fractional second digits. Messages without a date are excluded | |
| until | No | Include messages strictly before this date/time; same header and format as since. To include a whole day, use the following day's midnight. Must be later than since when both are given. Messages without a date are excluded | |
| folder | Yes | One folder key from listFolders in this connection, not its display name | |
| offset | No | Default 0. For the next page, repeat the same arguments and use the previous nextOffset. Stop when there is no nextOffset | |
| connection | Yes | Connection name from listConnections |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| since | No | Applied since bound, in UTC. | |
| total | Yes | Messages in the folder within the date bounds. | |
| until | No | Applied until bound, in UTC. | |
| folder | Yes | Folder key. | |
| offset | Yes | Position of this page. | |
| messages | Yes | Messages, newest first; undated last. | |
| connection | Yes | Connection name. | |
| nextOffset | No | Pass as offset to get the next page; absent at the end. |