import { Novu } from "@novu/api";const novu = new Novu({ apiKey: "<YOUR_API_KEY_HERE>",});async function run() { const result = await novu.topics.create({ key: "<key>", name: "<value>", }); // Handle the result console.log(result)}run();
Copy
{}
Topics
Topic creation
Create a topic
POST
/
v1
/
topics
TopicsController_createTopic
Copy
import { Novu } from "@novu/api";const novu = new Novu({ apiKey: "<YOUR_API_KEY_HERE>",});async function run() { const result = await novu.topics.create({ key: "<key>", name: "<value>", }); // Handle the result console.log(result)}run();
Copy
{}
Enter your API key in the Authorization field like the example shown below:
E.g ApiKey 18d2e625f05d80e
Assistant
Responses are generated using AI and may contain mistakes.