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 Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
MarkReadRequest
object
notification_ids
required
Notification Ids
Array<string>
Examplegenerated
{ "notification_ids": [ "example" ]}Responses
Section titled “Responses”Successful Response
Media typeapplication/json
MarkReadResponse
object
marked_count
required
Marked Count
integer
unread_count
required
Unread Count
integer
Examplegenerated
{ "marked_count": 1, "unread_count": 1}Validation Error
Media typeapplication/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
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}