Subscribers addition

Add subscribers to a topic by key

POST/v1/topics/{topicKey}/subscribers

Authorization

Authorization<token>

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

In: header

Request Body

application/jsonRequired
subscribersRequiredarray<string>

List of subscriber identifiers that will be associated to the topic

Path Parameters

topicKeyRequiredstring

The topic key

Header Parameters

idempotency-keystring

A header for idempotency purposes

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

{
  "succeeded": [
    "string"
  ],
  "failed": {
    "notFound": [
      "string"
    ]
  }
}