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

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

async function run() {
  const result = await novu.topics.rename("<value>", {
    name: "<value>",
  });

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

run();
{
  "_id": "<string>",
  "_organizationId": "<string>",
  "_environmentId": "<string>",
  "key": "<string>",
  "name": "<string>",
  "subscribers": [
    "<string>"
  ]
}

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

topicKey
string
required

Body

application/json
name
string
required

User defined custom name and provided by the user to rename the topic.

Response

200
application/json
Ok
_organizationId
string
required
_environmentId
string
required
key
string
required
name
string
required
subscribers
string[]
required
_id
string

Was this page helpful?