Skip to main content
Use these endpoints to dismiss notifications. You can mark a single notification by its ID or mark every unread notification at once. Both endpoints require a valid Bearer token.

Mark a Single Notification

POST /notifications/mark-read/{notificationId}
Authorization: Bearer <token>

Path Parameters

notificationId
integer
required
The ID of the notification to mark as read.

Response

message
string
Confirmation message. Returns "Notification marked as read." on success.

Mark All Notifications

POST /notifications/mark-all-read
Authorization: Bearer <token>
This endpoint takes no request body. All unread notifications belonging to the authenticated user are marked as read in a single operation.

Response

message
string
Confirmation message. Returns "All notifications marked as read." on success.

Examples

curl -X POST http://localhost:8080/notifications/mark-read/42 \
  -H "Authorization: Bearer <token>"
curl -X POST http://localhost:8080/notifications/mark-all-read \
  -H "Authorization: Bearer <token>"