Count your unread notifications
GET /account/notifications/unread-count
Returns how many of your notifications are unread.
You need to be signed in; no capability is needed. Without a session cookie or bearer token that identifies you, the answer is 401, whether or not public mode is on.
Every unread notification counts, not only those on the first page
of listMyNotifications, and none is left out for being about
something you can no longer open. The count is usually served from a
cache that is cleared, on a best-effort basis, when a notification
arrives for you or you mark one or more read. That cache doesn’t
expire on its own, so a count that goes stale, for example because
it was read at the same moment as a change or the clearing didn’t
reach the server that answered, can stay stale for as long as the
cached value is kept; asking again doesn’t refresh it, and a later
change doesn’t always fix it. The count and the list are read
separately, so they can disagree, and there is no limit on how long
that lasts. Server errors get a plain-text 500.
Authorizations
Section titled “Authorizations ”Responses
Section titled “ Responses ”How many of your notifications are unread.
object
The number of unread notifications; 0 when there are none.
Authentication required, missing, or invalid
object
Human-readable error summary
Example
the request could not be completedExample
{ "error": "authentication required: sign in and retry with a valid session or API token"}