Skip to API content
TalkLabs API Docs v3
Recipes
GET Users & notifications

Count User Notifications

URL PROPERTIES userid : required Return only notifications for this user BODY PROPERTIES filterNotificationTypes : optional Return only events of the specified type.

GET /api/v3/{appid}/user/users/{userid}/notification/countnotifications

URL PROPERTIES

  • userid : (required) Return only notifications for this user

BODY PROPERTIES

  • filterNotificationTypes : (optional) Return only events of the specified type. Pass the argument more than once to fetch multiple types of notifications at once.
    • chatmention
    • chatquote
    • chatreply
    • commentmention
    • commentquote
    • commentreply
  • includeread : (optional | default = false) If true, notifications that have already been read are counted otherwise read notifications are not counted
  • filterChatRoomId : (optional) If provided, this will only count notifications associated with the specified chat room using the ChatRoom ID (exact match)
  • filterChatRoomCustomId : (optional) If provided, this will only count notifications associated with the specified chat room using the Custom ID (exact match)
Request

Parameters

Values in the path and query string.

appid path
string TalkLabs ID required

The application the user belongs to.

Example: your-app-id
userid path
string customer-defined required

Required. Return only the notification count for this user.

Example: u-8842
UserId query
string customer-defined

Required. Return only notifications for this user the route's userid; also accepted as a form field .

Example: u-8842
FilterNotificationTypes query
NotificationTypes[]

Optional. Return only events of the specified type s : chatmention, chatquote, chatreply, commentmention, commentquote, commentreply. Pass the argument more than once to fetch multiple types at once. Omit to return all types.

Example: 1
FilterChatRoomId query
string

Optional. Restrict results to notifications associated with this chat room ID exact match .

FilterChatRoomCustomId query
string customer-defined

Optional. Restrict results to notifications associated with this chat room custom ID exact match .

FilterCommentConversationId query
string

Optional. Restrict results to notifications associated with this comment conversation ID exact match .

FilterCommentConversationCustomId query
string customer-defined

Optional. Restrict results to notifications associated with this comment conversation custom ID exact match .

IncludeRead query
boolean

Optional, default false. If true, notifications that have already been read are also returned/counted.

Example: true
Cursor query
string

Optional. Pass the cursor value from a previous response to resume paging; leave blank to start from the beginning.

Limit query
integer · int32

Optional. Default 50, maximum 200. Limits how many items are returned per page.

Example: 1
Dieroll query
integer · int32

If non zero, a die will be rolled with this number of sides. If the roll is not a 1 the request gets a 200 response instantly and no work is done.

Example: 1
Response

Status codes

Every JSON response uses the API result envelope.

200 OK: success data is a ResponseCountUserNotifications itemcount . ApiResult
400 BadRequest: required fields are missing or invalid. ApiResult
403 Forbidden: request is not authorized with a valid token, or the token does not match this appid. ApiResult
500 Internal Server Error ApiResult
Search all 118 endpoints Try “join room”, “moderate”, or “POST”.
Request environment

Connect your application

These values fill request examples and the API console. They stay in this browser tab and are never sent to TalkLabs until you run a request.

Credentials are stored in sessionStorage, not in cookies or analytics.