Aggregated unread counts

GET/users/me/unread-counts

Return the authenticated user's unread chat, announcement, and notification counts in a single request. Intended for surfaces that render several badges at once, such as tab bars and app icons.

AuthLogin required

Query parameters

sincestring

Only count notifications created at or after this timestamp (ISO 8601). Chat counts are based on read position and are unaffected.

Notes

`announcements` is a subset of `notifications` (announcements are also unread notifications). `badge` is the sum of unread messages and non-chat unread notifications, ready to use as an app icon badge.

Response

FieldTypeDescription
chat.messagesnumberTotal unread messages.
chat.roomsnumberNumber of chat rooms with unread messages.
chat.byCategoryobjectUnread messages per category (chat / event / community).
announcementsnumberUnread announcement notifications.
notificationsnumberUnread notifications across all types.
badgenumberCount to display as an app icon badge.
Request
curl https://api.4s.link/users/me/unread-counts \
-H "Authorization: Bearer 4s_at_..."
Example response
{
"chat": {
"messages": 12,
"rooms": 3,
"byCategory": { "chat": 5, "event": 4, "community": 3 }
},
"announcements": 2,
"notifications": 5,
"badge": 15
}