Notifications
Real-time notification system with support for multiple notification types, pagination, and status management.
Base Path: /api/v1/notifications
Authentication: Required (Bearer Token)
Tag: Notifications
Get All Notifications
Retrieve paginated notifications for the authenticated user.
GET /notifications?page={page}&size={size}&sort={sort}
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
page | Integer | 0 | Page number (0-based) |
size | Integer | 20 | Page size |
sort | String | createdAt,DESC | Sort field and direction |
Response
{
"success": true,
"data": {
"content": [
{
"id": "...",
"type": "COMMENT_MENTION",
"status": "UNREAD",
"title": "You were mentioned",
"message": "John mentioned you in 'Getting Started'",
"actionable": false,
"actor": {
"id": "...",
"name": "John Doe",
"avatar": "https://..."
},
"workspace": {
"id": "...",
"name": "Engineering"
},
"document": {
"id": "...",
"title": "Getting Started"
},
"references": {
"invitationId": null,
"commentThreadId": "..."
},
"metadata": {},
"createdAt": "2025-01-15T10:00:00Z",
"readAt": null,
"expiresAt": null
}
],
"totalElements": 50,
"totalPages": 3,
"number": 0,
"size": 20
}
}
Response Type: ApiResponse<Page<NotificationResponse>>
Get Unread Notifications
Retrieve only unread notifications.
GET /notifications/unread?page={page}&size={size}
Query Parameters
Same as Get All Notifications.
Response Type: ApiResponse<Page<NotificationResponse>>
Get Notifications by Type
Filter notifications by type.
GET /notifications/type/{type}?page={page}&size={size}
Path Parameters
| Parameter | Type | Values | Description |
|---|---|---|---|
type | NotificationType | See Enums | Notification type filter |
Response Type: ApiResponse<Page<NotificationResponse>>
Get Unread Count
Get the count of unread notifications.
GET /notifications/count
Response
{
"success": true,
"data": {
"unreadCount": 5
}
}
Response Type: ApiResponse<Map<String, Long>>
Mark as Read
Mark a single notification as read.
POST /notifications/{id}/read
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | UUID | Notification ID |
Response Type: ApiResponse<NotificationResponse>
Mark All as Read
Mark all notifications as read for the authenticated user.
POST /notifications/read-all
Response
{
"success": true,
"data": {
"markedCount": 12
}
}
Response Type: ApiResponse<Map<String, Integer>>
Mark as Actioned
Mark a notification as actioned (e.g., invitation was accepted).
POST /notifications/{id}/actioned
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | UUID | Notification ID |
Response Type: ApiResponse<NotificationResponse>
Dismiss Notification
Dismiss a notification (hide from list).
POST /notifications/{id}/dismiss
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | UUID | Notification ID |
Status: 204 No Content
Delete Notification
Permanently delete a notification.
DELETE /notifications/{id}
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | UUID | Notification ID |
Status: 204 No Content