Skip to main content

List User's Notification

List all user notifications (in aggregate form) related to the community

info

Notifications include all possible interactions with other users of the community, such as replies, comments to the same post, mentions, requests for friendship etc.

Example previews:

Notification

Notification

info

When calling this resource the notifications included in the list are automatically marked as read.

info

This operation requires authentication

HTTP Request‚Äč

GET /api/v2/notification/

Parameters‚Äč

NameInTypeRequiredDescription
next_idquerystringfalseNext page id
previous_idquerystringfalsePrevious page id

*if both parameters are sent previous_id takes precedence

Example Request‚Äč

const headers = {
'Accept':'application/json',
'Authorization: Bearer <token>'
};

fetch('/api/v2/notification/',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});

Responses‚Äč

StatusMeaningDescriptionSchema
200OKnoneInline

Response Schema‚Äč

Status Code 200

NameTypeRequiredRestrictionsDescription
nextstring¦nullfalsenoneNext page url
previousstring¦nullfalsenonePrevious page url
resultslist(Notification)falsenoneList of notification results

Example responses‚Äč

{
"next": "string",
"previous": "string",
"results": [
{
"is_new": false,
"sid": "1905252769000",
"post": {...},
"aggregated": [
{
"is_new": false,
"sid": 16456592493610000000054923,
"type": "comment",
"active_at": "2020-10-26T15:55:05.984561+01:00",
"comment": {...}

},
{
"is_new": false,
"sid": 18952592493610000000055990,
"type": "nested_comment",
"active_at": "2020-10-25T15:30:01.982831+01:00",
"comment": {...}
}
]
},
{
"is_new": false,
"sid": "1435259289000",
"aggregated": [
{
"is_new": false,
"type": "connection_accept",
"sid": 13452592763610000000054490,
"active_at": "2020-10-23T12:20:03.982632+01:00",
"accept_user": {...}
}
]
}
]
}

Notification types:‚Äč

TypeDescriptionAudience
comment*comment of first levelparticipants of the discussion/post, including those who follow the post
nested_comment*comment of second levelauthor of the top-level comment (unless the user has hidden it) and the authors of the siblings comments
mention*user mentionwho is mentioned in the contribute
vote_up*vote up a post/discussion/status/commentwho received the voteup
follow*follow a post/discussion/statusauthor of the content (discussion/post/status)
private_message*private messagerecipient of the message
deleted_for_advertisingdeleted content by moderators with motivation the content is advertisingauthor of the contribute
deleted_for_aggressivedeleted content by moderators with motivation the content is aggressiveauthor of the contribute
deleted_for_vulgardeleted content by moderators with motivation the content is vulgarauthor of the contribute
deleted_for_poordeleted content by moderators with motivation the content is poorauthor of the contribute
deleted_for_offtopicdeleted content by moderators with motivation the content is offtopicauthor of the contribute
undeleted_forthe content has been rehabilitated by the moderatorsauthor of the contribute
collapsed_for_advertisingonly for comments, hidden content by moderator with motivation the content is advertisingauthor of the contribute
collapsed_for_aggressiveonly for comments, hidden content by moderator with motivation the content is aggressiveauthor of the contribute
collapsed_for_vulgaronly for comments, hidden content by moderator with motivation the content is vulgarauthor of the contribute
collapsed_for_pooronly for comments, hidden content by moderator with motivation the content is poorauthor of the contribute
collapsed_for_offtopiconly for comments, hidden content by moderator with motivation the content is offtopicauthor of the contribute
connection_requestconnect requestuser who receives the request
connection_acceptconnection acceptwho had requested friendship
user_followfollow useruser followed
kindly_notice_advertisingcontent author notified for advertising content (via moderation)author of the contribute
kindly_notice_aggressivecontent author notified for advertising content (via moderation)author of the contribute
kindly_notice_vulgarcontent author notified for advertising content (via moderation)author of the contribute
kindly_notice_poorcontent author notified for advertising content (via moderation)author of the contribute
kindly_notice_offtopiccontent author notified for advertising content (via moderation)author of the contribute
kindly_notice_flagflag author notified for bad flagging (via moderation)author of the flag
blocked_useruser blockedblocked user
unblocked_useruser unblockedunblocked user
custom_notificationcustom notificationuser followers/connections

*notifications of this type, if chronologically consecutive, can be aggregated