List User Notifications
If you see totalunread 0, but you don't see any notifications, check that you are including valid values for filterNotificationTypes.
If you see totalunread > 0, but you don't see any notifications, check that you are including valid values for filterNotificationTypes.
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 returned
- filterChatRoomId : (optional) If provided, this will only return notifications associated with the specified chat room using the ChatRoom ID (exact match)
- filterChatRoomCustomId : (optional) If provided, this will only return notifications associated with the specified chat room using the Custom ID (exact match)
- limit : (optional) Default is 50, maximum is 200. Limits how many items are returned.
- cursor : (optional) Leave blank to start from the beginning of the result set; provide the value from the previous returned cursor to resume cursoring through the next page of results
Parameters
Values in the path and query string.
appid path The application the user belongs to.
Example:your-app-id userid path Required. Return only notifications for this user.
Example:u-8842 UserId query Required. Return only notifications for this user the route's userid; also accepted as a form field .
Example:u-8842 FilterNotificationTypes query 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 Optional. Restrict results to notifications associated with this chat room ID exact match .
FilterChatRoomCustomId query Optional. Restrict results to notifications associated with this chat room custom ID exact match .
FilterCommentConversationId query Optional. Restrict results to notifications associated with this comment conversation ID exact match .
FilterCommentConversationCustomId query Optional. Restrict results to notifications associated with this comment conversation custom ID exact match .
IncludeRead query Optional, default false. If true, notifications that have already been read are also returned/counted.
Example:true Cursor query Optional. Pass the cursor value from a previous response to resume paging; leave blank to start from the beginning.
Limit query Optional. Default 50, maximum 200. Limits how many items are returned per page.
Example:1 Dieroll query 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 Status codes
Every JSON response uses the API result envelope.
200 OK: success data is a ResponseCursorListUserNotifications cursor/more/itemcount/totalunread/notifications . 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 {
"message": "",
"errors": {},
"data": {
"kind": "list.usernotifications",
"cursor": "602456795617e108441660da",
"more": false,
"itemcount": 1,
"totalunread": 1,
"notifications": [
{
"kind": "notification",
"id": "602456795617e108441660da",
"added": "2021-02-10T21:56:09.9738413Z",
"userid": "bobsmith2",
"ts": 637485909699738400,
"whenread": null,
"isread": false,
"notificationtype": "chatquote",
"chatroomid": "600d78d45617e20e34c39dd5",
"chatroomcustomid": "new-york-city-club",
"commentconversationid": "",
"commentconversationcustomid": "",
"chateventid": "602456795617e108441660d9",
"commentid": ""
}
]
}
}