Stream the unread count
A server-sent event stream. Each event holds the unread count, for example {"unread_count": 3}. The server sends a received event when a new message arrives in the caller's inbox. The client can play a sound for this event. The server sends an inbox event when the stream opens and for every other change to the caller's inbox. The end of a snooze sends no event. The client gets the count again when it opens a new stream or when the app gets focus. The server sends a comment every 25 seconds to keep the connection open, and closes the stream after 15 minutes. The client then opens a new stream.
Authorization
oauth2 Create a client with POST /v1/oauth/clients, then exchange its credentials for an access token. AUTHORIZATION_CODE clients act on behalf of a signed-in user and always use PKCE; CLIENT_CREDENTIALS clients act as themselves. A client may only be granted scopes its creator already holds — read the grantable list from GET /v1/oauth/clients/scopes.
In: header
Response Body
text/event-stream
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/user/notifications/stream"{ "unread_count": 0}{ "code": "BAD_REQUEST", "description": "Bad Request"}{ "code": "UNAUTHORISED", "description": "Unauthorised"}{ "code": "FORBIDDEN", "description": "Forbidden"}{ "code": "RATE_LIMIT_EXCEEDED", "description": "Too Many Requests"}{ "code": "INTERNAL_ERROR", "description": "Internal Server Error"}Mark notifications as seen POST
Marks the unseen messages in a range as seen. Call it with the first and the last message that the app shows. The range works as in the read request: `from` is the oldest message and `to` is the newest message, and both bounds are inclusive. Send no body to mark every unseen message as seen. It skips the messages snoozed now. Seen does not change the waiting count: only reading or archiving a message does. Returns 400 when `from` is newer than `to`. Returns 404 when a bound is not a message in the caller's inbox.
Get a legal document GET
Returns the current version of a legal document as Markdown. A label in brackets, such as [fee], stands in place of each value of an offer. A website shows this version to a reader who has no offer. The endpoint needs no authentication.