Skip to main content
post/v2/topics
Request example
Response
post/v2/topics

Authorization

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

Query parameters

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

Headers

idempotency-keystring#
A header for idempotency purposes

Body

application/json
keystringrequired#
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.

Length: 1–100

Example:"task:12345"

namestring#
The display name for the topic

Length: 0–100

Example:"Task Title"

dataobject#
Additional custom data associated with the topic. Flat key-value pairs of scalars (string, number, boolean, string[]). Maximum size: 64KB.
Example:

Responses

application/json
OK
_idstringrequired#
The identifier of the topic

Example:"64da692e9a94fb2e6449ad06"

keystringrequired#
The unique key of the topic

Example:"product-updates"

namestring#
The name of the topic

Example:"Product Updates"

dataobject#
Additional custom data associated with the topic
Example:
createdAtstring#
The date the topic was created

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

updatedAtstring#
The date the topic was last updated

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