> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bodhveda.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Unread count

> Returns the number of unread notifications for a recipient.

This is the **recipient-facing** feed, so it excludes notifications the recipient was never shown: `muted` (their preferences disallowed it), `quota_exceeded`, and `not_requested` (an *email-only* send, which created no in-app notification). To see those, use the Console — they are exactly the rows you need when asking “why didn't they get it?”.



## OpenAPI

````yaml GET /recipients/{recipient_id}/notifications/unread-count
openapi: 3.0.3
info:
  title: Bodhveda Notifications API
  version: '1.0'
  description: API for sending notifications to recipients or broadcasting to all.
servers: []
security: []
paths:
  /recipients/{recipient_id}/notifications/unread-count:
    get:
      tags:
        - Notifications
      summary: Get unread notification count for a recipient
      description: >-
        Returns the number of unread notifications for a recipient.


        This is the **recipient-facing** feed, so it excludes notifications the
        recipient was never shown: `muted` (their preferences disallowed it),
        `quota_exceeded`, and `not_requested` (an *email-only* send, which
        created no in-app notification). To see those, use the Console — they
        are exactly the rows you need when asking “why didn't they get it?”.
      operationId: getUnreadNotificationCount
      parameters:
        - name: recipient_id
          in: path
          required: true
          schema:
            type: string
          description: The unique identifier of the recipient.
      responses:
        '200':
          description: Unread notification count for the recipient.
          content:
            application/json:
              examples:
                Unread count:
                  summary: Unread Notification Count
                  value:
                    data:
                      unread_count: 5
        '404':
          description: Recipient not found
          content:
            application/json:
              examples:
                Not found:
                  summary: Recipient Not Found
                  value:
                    message: Recipient not found
      security:
        - BearerAuthWithAPIKeyWithEitherScope: []
      x-codeSamples:
        - lang: curl
          label: cURL
          source: >-
            curl
            https://api.bodhveda.com/recipients/recipient_123/notifications/unread-count
            \
              -H "Authorization: Bearer bv_xxxxxxxxx" 
        - lang: javascript
          label: JavaScript
          source: >-
            import { Bodhveda } from "@bodhveda/js";


            const bodhveda = new Bodhveda("bv_xxxxxxxxx");


            const res = await
            bodhveda.recipients.notifications.unreadCount("recipient_123");

            // res.unread_count
        - lang: go
          label: Go
          source: >-
            import (
                "context"

                bodhveda "github.com/MudgalLabs/bodhveda/sdk/go"
            )


            ctx := context.Background()

            client := bodhveda.NewClient("bv_xxxxxxxxx", nil)


            res, _ := client.Recipients.Notifications.UnreadCount(ctx,
            "recipient_123")

            // res.UnreadCount
        - lang: jsx
          label: React
          source: >-
            import { useNotificationsUnreadCount } from "@bodhveda/react";


            // Requires a <BodhvedaProvider recipientID="recipient_123"> higher
            in the tree.

            function Badge() {
                const { data } = useNotificationsUnreadCount();
                return <span>{data?.unread_count ?? 0}</span>;
            }
components:
  securitySchemes:
    BearerAuthWithAPIKeyWithEitherScope:
      type: http
      scheme: bearer
      bearerFormat: APIKey
      description: >-
        Bearer authentication header of the form `Bearer bv_xxxxxxxxx`, where
        `bv_xxxxxxxxx` is your **API Key** with `Full access` or `Recipient
        acess` scope.

````