POST
/
v1
/
subscribers
/
{subscriberId}
/
messages
/
mark-all
import { Novu } from "@novu/api";
import { MarkAllMessageAsRequestDtoMarkAs } from "@novu/api/models/components";

const novu = new Novu({
  apiKey: "<YOUR_API_KEY_HERE>",
});

async function run() {
  const result = await novu.subscribers.messages.markAll("<value>", {
    markAs: MarkAllMessageAsRequestDtoMarkAs.Seen,
  });

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

run();
123

Enter your API key in the Authorization field like the example shown below:

E.g ApiKey 18d2e625f05d80e

Authorizations

Authorization
string
header
required

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

Path Parameters

subscriberId
string
required

Body

application/json
markAs
enum<string>
required

Mark all subscriber messages as read, unread, seen or unseen

Available options:
read,
seen,
unread,
unseen
feedIdentifier

Optional feed identifier or array of feed identifiers

Response

201
application/json

The response is of type number.

Was this page helpful?