Skip to main content
POST
TypeScript

Authorizations

Authorization
string
header
required

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

Headers

idempotency-key
string

A header for idempotency purposes

Query Parameters

failIfExists
boolean

If true, the request will fail if a topic with the same key already exists

Body

application/json
key
string
required

The unique key identifier for the topic. The key must contain only alphanumeric characters (a-z, A-Z, 0-9), hyphens (-), underscores (_), colons (:), or be a valid email address.

Required string length: 1 - 100
Example:

"task:12345"

name
string

The display name for the topic

Maximum string length: 100
Example:

"Task Title"

Response

OK

_id
string
required

The identifier of the topic

Example:

"64da692e9a94fb2e6449ad06"

key
string
required

The unique key of the topic

Example:

"product-updates"

name
string

The name of the topic

Example:

"Product Updates"

createdAt
string

The date the topic was created

Example:

"2023-08-15T00:00:00.000Z"

updatedAt
string

The date the topic was last updated

Example:

"2023-08-15T00:00:00.000Z"