GET
/
v1
/
topics
import { Novu } from "@novu/api";

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

async function run() {
  const result = await novu.topics.list({});

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

run();
{
  "data": [
    {
      "_id": "<string>",
      "_organizationId": "<string>",
      "_environmentId": "<string>",
      "key": "<string>",
      "name": "<string>",
      "subscribers": [
        "<string>"
      ]
    }
  ],
  "page": 123,
  "pageSize": 123,
  "totalCount": 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>".

Query Parameters

page
number
default:
0

Number of page for the pagination

Required range: x > 0
pageSize
number
default:
10

Size of page for the pagination

Required range: x > 0
key
string

Topic key

Response

200
application/json
data
object[]
required
page
number
required
pageSize
number
required
totalCount
number
required

Was this page helpful?