Skip to main content
Changes are made at the provider, so the user sees them in Gmail or their email app too.

Mark as read, star, move

Send only what you want to change.
boolean
false marks it read, true unread.
boolean
Flag (IMAP) or star (Gmail).
string
Move to a folder: its fld_… id, provider id, or a role such as ARCHIVE, INBOX, SPAM. For Gmail (IMAP), moving to a label folder adds that label and removes the one it came from; Gmail has no ARCHIVE folder over IMAP.
The response is the updated email object. The email keeps its id when it moves. An email.update event follows, with the updated email.

Move to trash

Response
The email goes to the mailbox’s Trash: its role becomes TRASH, and an email.update event follows. The email stays in the API while it’s in Trash. The provider empties the trash on its own schedule (Gmail after 30 days). When it’s gone for good, you receive email.delete.

Changes made elsewhere

When the user reads, stars, moves or deletes an email in their own email app, the engine picks it up on the next sync and sends the same events: email.update for a change or a move, email.delete when it’s deleted for good.