Mark Notifications as Read
The PUT /api/notifications/read endpoint allows users to mark specific notifications as read within the Netevia banking platform. Callers can target individual notifications by ID, mark an entire notification group at once, or do both in a single request. This keeps notification feeds organized and ensures unread counts remain accurate.
Endpoint
PUT /api/notifications/read
Authentication
Bearer token required. Obtain via:
POST https://api.banking.netevia.dev/api/auth/v2
Include in header: Authorization: Bearer {token}
Token lifetime: 10 minutes. Refresh via POST /api/auth/refresh.
When to use
Use this endpoint after a user views one or more notifications and you need to reflect that in the platform. It supports batch processing — multiple notification IDs can be submitted in one call — so you do not need a separate request per notification. Use readAll: true combined with a notificationGroup when you want to clear an entire category (e.g., all Messages) at once.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| ids | array of integer (int32) | No | List of notification IDs to mark as read. Can be omitted when using readAll. |
| notificationGroup | string (enum) | No | Notification category to target. One of: Notifications, Messages, Campaigns, CardholderAgreement. |
| readAll | boolean | No | When true, marks all notifications in the specified notificationGroup as read. |
{
"ids": [1021, 1034, 1058],
"notificationGroup": "Notifications",
"readAll": false
}Mark all notifications in a group as read:
{
"notificationGroup": "Messages",
"readAll": true
}Response
200 OK
A successful response confirms the operation completed. The response body is empty on success.
{}Error Codes
| Code | When it happens |
|---|---|
| 400 | Missing required fields or validation error (e.g., invalid ID format or unrecognized notificationGroup value) |
| 401 | Token missing, expired, or invalid |
| 403 | Insufficient permissions to update notifications for the target account |
| 404 | One or more notification IDs not found |
| 500 | Internal server error |
Common Mistakes
- Sending non-integer values in the
idsarray — all IDs must be 32-bit integers. - Using an unrecognized
notificationGroupstring — valid values are exactlyNotifications,Messages,Campaigns, andCardholderAgreement(case-sensitive). - Omitting both
idsandreadAll— the request will succeed but no notifications will be updated; always provide at least one targeting parameter. - Setting
readAll: truewithout specifying anotificationGroup— pairreadAllwith a group to avoid ambiguous behavior.
Related Endpoints
GET /api/notifications— Retrieve the list of notifications for the authenticated userGET /api/notifications/unread-count— Get the count of unread notifications by group
Example
curl -X PUT https://api.banking.netevia.dev/api/notifications/read \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"ids": [1021, 1034, 1058],
"notificationGroup": "Notifications",
"readAll": false
}' 200Success
