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
200OKResponse status codeInline

Response Schema

Status Code 200

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

Example responses

{
"next": "string(uri)",
"previous": "string(uri)",
"results": [
{
"is_new": "boolean",
"sid": "string",
"post": {...},
"aggregated": [
{
"is_new": "boolean",
"sid": "string",
"type": "string",
"active_at": "string",
"comment": {...}

},
{...}
]
},
{
"is_new": "boolean",
"sid": "string",
"aggregated": [
{
"is_new": "boolean",
"sid": "string",
"type": "string",
"active_at": "string",
"follower": {...}
}
]
}
]
}

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