Mark as read, star, move
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.id when it moves. An email.update event follows, with the updated email.
Move to trash
Response
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.