Get Unread Count
GET
/api/canvas/notifications/unread-count
const url = 'https://example.com/api/canvas/notifications/unread-count';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/api/canvas/notifications/unread-count \ --header 'Authorization: Bearer <token>'Fast unread notification count for the current user.
Called on page load to populate the notification bell badge without loading the full notification list.
Authorizations
Section titled “Authorizations ”Responses
Section titled “ Responses ”Successful Response
Media type application/json
UnreadCountResponse
object
unread_count
required
Unread Count
integer
Example generated
{ "unread_count": 1}