GET
/
v1
/
subscribers
/
{subscriberId}
/
notifications
/
unseen
import { Novu } from "@novu/api";

const novu = new Novu({
  secretKey: "YOUR_SECRET_KEY_HERE",
});

async function run() {
  const result = await novu.subscribers.notifications.unseenCount({
    subscriberId: "<id>",
  });

  // Handle the result
  console.log(result);
}

run();
{
  "count": 123
}

Authorizations

Authorization
string
header
required

API key authentication. Allowed headers-- "Authorization: ApiKey <api_key>".

Headers

idempotency-key
string

A header for idempotency purposes

Path Parameters

subscriberId
string
required

Query Parameters

seen
boolean
default:
false

Indicates whether to count seen notifications.

limit
number
default:
100

The maximum number of notifications to return.

Response

200
application/json
OK
count
number
required