API Reference
Notifications
Integrations
Subscribers
- GETGet subscribers
- POSTBulk create subscribers
- PUTUpdate subscriber credentials
- PATCHModify subscriber credentials
- DELDelete subscriber credentials by providerId
- PATCHUpdate subscriber online status
- GETGet in-app notification feed for a particular subscriber
- GETGet the unseen in-app notifications count for subscribers feed
- POSTMark a subscriber messages as seen, read, unseen or unread
- POSTMarks all the subscriber messages as read, unread, seen or unseen. Optionally you can pass feed id (or array) to mark messages of a particular feed.
- POSTMark message action as seen
- GETHandle providers oauth redirect
- GETHandle chat oauth
- GETSearch for subscribers
- POSTCreate subscriber
- GETGet subscriber
- DELDelete subscriber
- PATCHPatch subscriber
- GETGet subscriber preferences
- PATCHUpdate subscriber global or workflow specific preferences
Bulk trigger event
Using this endpoint you can trigger multiple events at once, to avoid multiple calls to the API. The bulk API is limited to 100 events per request.
curl --request POST \
--url https://api.novu.co/v1/events/trigger/bulk \
--header 'Content-Type: application/json' \
--data '{
"events": [
{
"name": "<string>",
"payload": {
"comment_id": "string",
"post": {
"text": "string"
}
},
"overrides": {
"fcm": {
"data": {
"key": "value"
}
}
},
"to": {
"subscriberId": "<string>",
"email": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"phone": "<string>",
"avatar": "<string>",
"locale": "<string>",
"data": {}
},
"transactionId": "<string>",
"actor": "<string>",
"tenant": "<string>"
}
]
}'
{
"data": [
{
"acknowledged": true,
"status": "error",
"error": [
"<string>"
],
"transactionId": "<string>"
}
]
}
Body
The trigger identifier of the workflow you wish to send. This identifier can be found on the workflow page.
The recipients list of people who will receive the notification.
The internal identifier you used to create this subscriber, usually correlates to the id the user in your systems
An http url to the profile image of your subscriber
The payload object is used to pass additional custom information that could be used to render the workflow, or perform routing rules based on it. This data will also be available when fetching the notifications feed from the API to display certain parts of the UI.
{
"comment_id": "string",
"post": { "text": "string" }
}
This could be used to override provider specific configurations
{ "fcm": { "data": { "key": "value" } } }
A unique identifier for this transaction, we will generated a UUID if not provided.
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
It is used to specify a tenant context during trigger event. If a new tenant object is provided, we will create a new tenant.
Response
If trigger was acknowledged or not
Status for trigger
error
, trigger_not_active
, no_workflow_active_steps_defined
, no_workflow_steps_defined
, processed
, subscriber_id_missing
, no_tenant_found
In case of an error, this field will contain the error message
Transaction id for trigger
Was this page helpful?
curl --request POST \
--url https://api.novu.co/v1/events/trigger/bulk \
--header 'Content-Type: application/json' \
--data '{
"events": [
{
"name": "<string>",
"payload": {
"comment_id": "string",
"post": {
"text": "string"
}
},
"overrides": {
"fcm": {
"data": {
"key": "value"
}
}
},
"to": {
"subscriberId": "<string>",
"email": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"phone": "<string>",
"avatar": "<string>",
"locale": "<string>",
"data": {}
},
"transactionId": "<string>",
"actor": "<string>",
"tenant": "<string>"
}
]
}'
{
"data": [
{
"acknowledged": true,
"status": "error",
"error": [
"<string>"
],
"transactionId": "<string>"
}
]
}