WebSocket Events
All frames are JSON text frames. The top-level key identifies the message type.
For a full description of the protocol, lifecycle, and examples, see Push Notifications & Real-Time Updates.
Message types
Section titled “Message types”| Message | Direction | Purpose |
|---|---|---|
subscribe | Client → Server | Subscribe to state change notifications for an accountId |
subscribed | Server → Client | Confirms a successful subscription |
stateChange | Server → Client | Notifies the client that one or more JMAP data types have a new state |
error | Server → Client | Indicates a request could not be processed |
Error codes
Section titled “Error codes”| Code | Meaning |
|---|---|
forbidden | The connection’s credentials were not accepted |
accountNotFound | The requested accountId does not exist or the authenticated user cannot access it |
invalidArguments | The message could not be parsed or a required field is missing |
tooManySubscriptions | The types list is longer than the server allows in one subscribe |
serverFail | The request could not be processed; the client may retry |