Mark Notifications Read
POST
/api/canvas/notifications/mark-read
const url = 'https://example.com/api/canvas/notifications/mark-read';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"notification_ids":["example"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/canvas/notifications/mark-read \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "notification_ids": [ "example" ] }'Mark specific notifications as read for the current user.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ” Media type application/json
MarkReadRequest
object
notification_ids
required
Notification Ids
Array<string>
Example generated
{ "notification_ids": [ "example" ]}Responses
Section titled “ Responses ”Successful Response
Media type application/json
MarkReadResponse
object
marked_count
required
Marked Count
integer
unread_count
required
Unread Count
integer
Example generated
{ "marked_count": 1, "unread_count": 1}Validation Error
Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}