List folders
GET/api/accounts/:accountId/folders
Returns the account's IMAP folders in the order the server lists them, each with its path, delimiter and flags, its messages and unseen counts, the role the app detected (specialUse: inbox, sent, trash and so on), and capabilities telling the UI whether it may rename, delete, empty or create subfolders in it.
Counts come from one IMAP STATUS per folder; a folder whose STATUS fails shows 0. Folders under Virtual and the All Mail folder (special-use \All) are left out.
Request
Responses
- 200
- 401
- 404
- 424
Folders, with message counts.
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.