Subscribe to mailbox events
GET/api/events
Opens a Server-Sent Events stream of live changes in the folders watched with POST /api/accounts/{accountId}/idle-folder, for all of the user's accounts. Events are folder-new-messages (with the new messages' headers), folder-expunge (with the removed uid) and folder-flags (with the uid and its new flags); each also carries accountId and folder.
A keepalive comment is sent every 30 seconds. Addresses on newly arrived messages are added to the user's collected addresses. When the user's last stream closes, all their folder watches stop after about 3 seconds.
Responses
- 200
- 401
Event stream.
The session has no mailbox access token. code is mail_token_missing; sign in again.