import { Novu } from "@novu/api";const novu = new Novu({ apiKey: "<YOUR_API_KEY_HERE>",});async function run() { const result = await novu.subscribers.notifications.unseenCount({ seen: false, subscriberId: "<value>", limit: 2166.35, }); // Handle the result console.log(result)}run();
Copy
{ "count": 123}
Subscribers
Get unseen in-app notifications count
GET
/
v1
/
subscribers
/
{subscriberId}
/
notifications
/
unseen
SubscribersController_getUnseenCount
Copy
import { Novu } from "@novu/api";const novu = new Novu({ apiKey: "<YOUR_API_KEY_HERE>",});async function run() { const result = await novu.subscribers.notifications.unseenCount({ seen: false, subscriberId: "<value>", limit: 2166.35, }); // Handle the result console.log(result)}run();
Copy
{ "count": 123}
Enter your API key in the Authorization field like the example shown below:E.g ApiKey 18d2e625f05d80e
This API returns the count of unseen in-app notifications for a subscriber.