Skip to main content
Count Unread Notifications
Returns the total number of unread app notifications for the currently authenticated user. Use this to populate notification badge counts in your UI.
This endpoint requires an authenticated user. Include a valid Authorization: Bearer <accessToken> header, or use a service key and name the user in actingUserId.

Query Parameters

string
Service key only, and required with one: the user this request acts as. Their unread notifications are counted. A user token always acts as its own user and must not send it (400 app-notification/acting-user-not-allowed).

Response

Returns HTTP 200:
number
The number of unread app notifications.

Error Responses

No Authorization header was sent. The body is text/plain, not JSON:
The header was sent but the token failed verification. Refresh the access token and retry. The body is text/plain, not JSON:
A service key sent no actingUserId.
A user token sent actingUserId, even naming its own user. Only a service key names the user it acts as; a user token always acts as its own user.
Returned when a service key names an actingUserId that isn’t a user in this project.
The request sent userId. On this route the user a service key acts as is actingUserId.With a service key:
With a user token, or with no credentials:

See Also