Skip to content

Retrieve subscriber notifications count

Retrieve count of in-app (inbox) notifications for a subscriber by its unique key identifier subscriberId. Supports multiple filters to count in-app (inbox) notifications by different criteria, including context keys.

GET
/v2/subscribers/{subscriberId}/notifications/count

Authorization

Authorization<token>

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

In: header

Path Parameters

subscriberIdRequiredstring

The identifier of the subscriber

Query Parameters

filtersRequiredstring

Array of filter objects (max 30) to count notifications by different criteria

Header Parameters

idempotency-keystring

A header for idempotency purposes

Response Body

OK

responseRequiredarray<object>
export type Response = GetSubscriberNotificationsCountResponseDto[];
 
export interface GetSubscriberNotificationsCountResponseDto {
  /**
   * The count of notifications matching the filter
   */
  count: number;
  /**
   * The filter applied
   */
  filter: {
    [k: string]: unknown;
  };
}
 
curl -X GET "https://api.novu.co/v2/subscribers/string/notifications/count?filters=%5B%7B%22read%22%3Afalse%2C%22archived%22%3Afalse%7D%2C%7B%22tags%22%3A%5B%22important%22%5D%7D%5D" \
  -H "idempotency-key: string" \
  -H "Authorization: <token>"
[
  {
    "count": 0,
    "filter": {}
  }
]

On this page

No Headings
Edit this page on GitHub