Mark notifications as read
const url = 'https://work.optidata.cloud/api/notifications/central/read';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://work.optidata.cloud/api/notifications/central/read \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{}'Marks one notification as read when userNotificationId is given, or
every unread notification of the caller when it is omitted.
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”object
Id of a single notification. Omit to mark all of the caller’s unread notifications.
Examples
Mark everything read
{}Mark one notification read
{ "userNotificationId": 88213}Responses
Section titled “ Responses ”Confirmation message.
Generic error envelope used by policy, binding and framework failures.
object
Human-readable description of the failure.
Examples
{ "message": "Notification marked as read."}Missing, malformed or expired authentication key.
Authentication failures use an error key rather than message.
object
Examples
No bearer token sent
{ "error": "JWT passport exception: Missing bearer token in request"}The request body or query string failed validation.
object
The first validation message.
Validation messages keyed by field name.
object
Examples
{ "message": "The name field is required.", "errors": { "name": [ "The name field is required." ] }}Rate limit exceeded. Retry after the window resets.
Generic error envelope used by policy, binding and framework failures.
object
Human-readable description of the failure.
Examples
{ "message": "Too Many Attempts."}