Skip to content

Add bulk notification management endpoints and unread count API #997

@sakeena-7878

Description

@sakeena-7878

Summary

The Notifications API currently supports listing notifications, marking selected notifications as read, and deleting individual notifications. However, it lacks endpoints for common bulk operations and retrieving the unread notification count.

Proposed Changes

Add the following endpoints:

GET /api/v1/notifications/unread-count — Return the number of unread notifications for the authenticated user.
POST /api/v1/notifications/read-all — Mark all unread notifications belonging to the authenticated user as read.
DELETE /api/v1/notifications/read — Delete all read notifications belonging to the authenticated user.

Motivation

These endpoints simplify notification management by reducing the number of API calls required for common operations such as displaying unread badges, marking all notifications as read, and clearing previously read notifications.

Acceptance Criteria

  • Implement GET /api/v1/notifications/unread-count.
  • Implement POST /api/v1/notifications/read-all.
  • Implement DELETE /api/v1/notifications/read.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions