Folders are named by role, not by path. Use
inbox, archive, sent,
drafts, junk or trash.Path names are not portable and are not even stable for us — Junk is “Junk” on
Dovecot and “Spam” elsewhere, Trash is “Deleted Items” on Exchange, and any of
them can sit under a namespace prefix. Roles are resolved against the server’s
own SPECIAL-USE attributes on every request, so folder=junk keeps meaning the
junk folder whatever it is called. Custom folders are not addressable yet.List messages
messages:read)
total is how many messages the folder holds, not how many came back, so
you can tell whether another page exists without fetching it. has_more says
the same thing directly.
Bodies are not included in the list — a page of 100 messages with full HTML
would be megabytes. Use preview, or fetch the message.
Get one message
messages:read)
Takes the same mailbox (required) and folder parameters as the list.
html is sanitised before it reaches you. The stored bytes are whatever a
stranger sent us; scripts, event handlers and other active content are removed.
text is the message’s own plain-text part, untouched.html is null for a plain-text message, so you can tell “no HTML” from
“empty HTML”.Update a message
messages:write)
Takes mailbox (required) and folder as query parameters — naming where the
message is now — and the change as a JSON body. Send at least one of:
Errors
See Errors for the full response shape.