GET user/{userId}/notifications

Get a user's notifications. Notifications are returned in chronological order.

Example

GET /api/v1/user/66a5db1f-2785-498d-9068-e24ddbba03f2/notifications HTTP/1.1
Authorization: Bearer ...
Accept: application/json
----------------------------------------
HTTP/1.1 200 OK
ETag: ...

[{
  "id": "6b4585cd-096b-4983-8705-84be5515ff3e",
  "kind": "FriendRequest",
  "created": 1555376350,
  "read": true,
  "sender": "4bdeea75-74be-4134-852b-6aa5afb53949"
},
{
  "id": "644fb786-05f0-4135-9846-36ae78e5b00b",
  "kind": "FriendConfirm",
  "created": 1555376450,
  "read": false,
  "sender": "ce69a120-4b98-4d79-bfdd-14dd8a5a1e99"
},
{
  "id": "d1bb6c35-6358-4fb2-855a-cdc8905d173e",
  "kind": "FriendMessage",
  "created": 1555376550,
  "read": false,
  "sender": "ce69a120-4b98-4d79-bfdd-14dd8a5a1e99",
  "text": "Hi!"
}]

Security

Authentication is required, and access is restricted to the user.

URL Parameters

NameDescriptionValue
userIdthe ID of the user as a GUID with dashesstring

Request Parameters

NameDescriptionValue
sincereturn only notifications newer than this timestamp, as a Unix timestamp in seconds optionalnumber

Request Body

NONE

Response

Successful responses are code 200 with data in the response body. Error responses are standard.

Response Body

The response is an array of Notifications. Notifications have a set of common fields, but may have other fields based on the notification kind.

Notifications (common fields)

NameDescriptionValue
idthe ID of the notification, as a GUID with dashesstring
kindthe name of the type of notificationstring
createdthe date this notification was created, as a Unix timestamp in secondsnumber
readtrue if the user has read this notificationboolean