List messages
GET/api/accounts/:accountId/folders/:folder/messages
Returns one page of message headers from the folder: UID, flags, size, date, subject, addresses, threading headers and whether it has attachments. Bodies are not included; use GET .../messages/{uid} for those.
Pages are cut from the newest end of the folder, and messages within a page are sorted by UID, highest first. The response also has the folder's total message count, its uidValidity, and hasMore, which is true while older pages remain (it is left out for an empty folder). Listing does not change any flags.
With filter, only matching messages are listed, total counts the matches, and hasMore refers to further filtered pages.
A folder that cannot be opened, for example because it does not exist, returns 424.
Request
Responses
- 200
- 401
- 404
- 424
Page of message headers.
The session has no mailbox access token. code is mail_token_missing; sign in again.
The account does not exist or belongs to another user.
The IMAP, SMTP or Sieve server, or the platform, refused the request or could not be reached.