Broadcast event to all

Trigger a broadcast event to all existing subscribers, could be used to send announcements, etc. In the future could be used to trigger events to a subset of subscribers based on defined filters.

POST/v1/events/trigger/broadcast

Authorization

Authorization<token>

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

In: header

Request Body

application/jsonRequired
nameRequiredstring

The trigger identifier associated for the template you wish to send. This identifier can be found on the template page.

payloadRequiredobject

The payload object is used to pass additional information that could be used to render the template, or perform routing rules based on it. For In-App channel, payload data are also available in

overridesobject

This could be used to override provider specific configurations

transactionIdstring

A unique identifier for this transaction, we will generated a UUID if not provided.

actorstring | object

It is used to display the Avatar of the provided actor's subscriber id or actor object. If a new actor object is provided, we will create a new subscriber in our system

tenantstring | object

It is used to specify a tenant context during trigger event. If a new tenant object is provided, we will create a new tenant.

Header Parameters

idempotency-keystring

A header for idempotency purposes

curl -X POST "https://api.novu.co/v1/events/trigger/broadcast" \
  -H "idempotency-key: <string>" \
  -H "Authorization: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string",
    "payload": {
      "comment_id": "string",
      "post": {
        "text": "string"
      }
    },
    "overrides": {
      "fcm": {
        "data": {
          "key": "value"
        }
      }
    },
    "transactionId": "string",
    "actor": "string",
    "tenant": "string"
  }'

OK

{
  "acknowledged": true,
  "status": "error",
  "error": [
    "string"
  ],
  "transactionId": "string"
}