Rename a topic

Rename a topic by providing a new name

PATCH/v1/topics/{topicKey}

Authorization

Authorization<token>

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

In: header

Request Body

application/jsonRequired
nameRequiredstring

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

Path Parameters

topicKeyRequiredstring

The topic key

Header Parameters

idempotency-keystring

A header for idempotency purposes

curl -X PATCH "https://api.novu.co/v1/topics/<string>" \
  -H "idempotency-key: <string>" \
  -H "Authorization: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string"
  }'

OK

{
  "_id": "string",
  "_organizationId": "string",
  "_environmentId": "string",
  "key": "string",
  "name": "string",
  "subscribers": [
    "string"
  ]
}