Create topic subscriptions
Create topic subscriptions using the Novu REST API. Requires your environment secret key in the Authorization header.
Authorizations
API key authentication. Allowed headers-- "Authorization: ApiKey <novu_secret_key>".
Headers
A header for idempotency purposes
Path Parameters
The key identifier of the topic
Body
List of subscriber IDs to subscribe to the topic (max: 100). @deprecated Use the "subscriptions" property instead.
["subscriberId1", "subscriberId2"]List of subscriptions to subscribe to the topic (max: 100). Can be either a string array of subscriber IDs or an array of objects with identifier and subscriberId
[
{
"identifier": "subscriber-123-subscription-a",
"subscriberId": "subscriber-123"
},
{
"identifier": "subscriber-456-subscription-b",
"subscriberId": "subscriber-456"
}
]The name of the topic
"My Topic"
The preferences of the topic. Can be a simple workflow ID string, workflow preference object, or group filter object
[
{
"workflowId": "workflow-123",
"condition": { "===": [{ "var": "tier" }, "premium"] }
}
]