import { Novu } from '@novu/node';
const novu = new Novu("<NOVU_API_KEY>");
await novu.events.bulkTrigger([
{
name: "<WORKFLOW_TRIGGER_IDENTIFIER>",
to: "<UNIQUE_SUBSCRIBER_IDENTIFIER>",
payload: {
customKey: "customValue",
customKey1: {
nestedkey1: "nestedValue1"
}
},
overrides: {
email: {
from: "support@novu.co"
}
},
// actorId is subscriberId of actor
actor: "actorId"
tenant: "tenantIdentifier"
},
{
name: "<WORKFLOW_TRIGGER_IDENTIFIER>",
to: "<UNIQUE_SUBSCRIBER_IDENTIFIER>",
payload: {
customKey: "customValue",
customKey1: {
nestedkey1: "nestedValue1"
}
},
overrides: {
email: {
from: "support@novu.co"
}
},
// actorId is subscriberId of actor
actor: "actorId"
tenant: "tenantIdentifier"
}
])
use Novu\SDK\Novu;
$novu = new Novu(<NOVU_API_KEY>);
$novu->bulkTriggerEvent([
[
'name' => '<WORKFLOW_TRIGGER_IDENTIFIER>',
'to' => '<UNIQUE_SUBSCRIBER_IDENTIFIER>',
'payload' => ['customVariables' => 'Hello']
],
[
'name' => '<WORKFLOW_TRIGGER_IDENTIFIER>',
'to' => '<UNIQUE_SUBSCRIBER_IDENTIFIER>',
'payload' => ['customVariables' => 'World']
],
])->toArray();
curl -X POST https://api.novu.co/v1/events/trigger/bulk \
-H "Authorization: ApiKey <NOVU_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"events": [
{
"name": "<WORKFLOW_TRIGGER_IDENTIFIER>",
"to": {
"subscriberId": "<UNIQUE_SUBSCRIBER_IDENTIFIER>",
"email": "john@doemail.com"
},
"payload": {
"customKey": "customValue",
"customKey1": {
"nestedkey1": "nestedValue1"
}
},
"overrides": {
"email": {
"from": "support@novu.co"
}
},
"actor": "actorId",
"tenant": "tenantIdentifier"
},
{
"name": "<WORKFLOW_TRIGGER_IDENTIFIER>",
"to": {
"subscriberId": "<UNIQUE_SUBSCRIBER_IDENTIFIER>",
"email": "janet@doemail.com"
},
"payload": {
"customKey": "customValue",
"customKey1": {
"nestedkey1": "nestedValue1"
}
},
"overrides": {
"email": {
"from": "support@novu.co"
}
},
"actor": "actorId",
"tenant": "tenantIdentifier"
}
]
}'
require 'novu'
client = Novu::Client.new('<NOVU_API_KEY>')
payload = {
'events' => [
{
'name' => '<WORKFLOW_TRIGGER_IDENTIFIER>',
'payload' => { # optional
'first-name' => 'Adam' # optional
},
'to' => {
'subscriberId' => '7789'
},
'transactionId' => '89kjfke9893' #optional
},
{
'name' => '<WORKFLOW_TRIGGER_IDENTIFIER>',
'payload' => { # optional
'last-name' => 'Eve' # optional
},
'to' => {
'subscriberId' => '<UNIQUE_SUBSCRIBER_IDENTIFIER>'
},
'transactionId' => 'sw900999as' #optional
}
]
}
client.trigger_bulk_event(payload)
package main
import (
"context"
"fmt"
novu "github.com/novuhq/go-novu/lib"
"log"
)
func main() {
apiKey := "<NOVU_API_KEY>"
ctx := context.Background()
novuClient := novu.NewAPIClient(apiKey, &novu.Config{})
event1 := novu.BulkTriggerOptions{
Name: []string{"<WORKFLOW_TRIGGER_IDENTIFIER>"},
To: map[string]interface{}{
"subscriberId": "<UNIQUE_SUBSCRIBER_IDENTIFIER>",
"email": "john@doemail.com",
},
Payload: map[string]interface{}{
"name": "Hello World",
"organization": map[string]interface{}{
"logo": "https://happycorp.com/logo.png",
},
}
}
event2 := novu.BulkTriggerOptions{
Name: []string{"<WORKFLOW_TRIGGER_IDENTIFIER>"},
To: map[string]interface{}{
"subscriberId": "<UNIQUE_SUBSCRIBER_IDENTIFIER>",
"email": "janet@doemail.com",
},
Payload: map[string]interface{}{
"name": "Hello World",
"organization": map[string]interface{}{
"logo": "https://happycorp.com/logo.png",
},
}
}
triggerPayload := []novu.BulkTriggerOptions{ event1, event2}
resp, err := novuClient.EventApi.TriggerBulk(ctx, triggerPayload)
if err != nil {
log.Fatal("novu error", err.Error())
return
}
}
from novu.dto.event import InputEventDto
from novu.api import EventApi
url = "https://api.novu.co"
api_key = "<NOVU_API_KEY>"
event_1 = InputEventDto(
name="<WORKFLOW_TRIGGER_IDENTIFIER>", # The workflow ID is the slug of the workflow name. It can be found on the workflow page.
recipients="<UNIQUE_SUBSCRIBER_IDENTIFIER>",
payload={}, # Your custom Novu payload goes here
)
event_2 = InputEventDto(
name="<WORKFLOW_TRIGGER_IDENTIFIER>",
recipients="<UNIQUE_SUBSCRIBER_IDENTIFIER>",
payload={},
)
novu = EventApi(url, api_key).trigger_bulk(
events=[event1,event2]
)
import co.novu.common.base.Novu;
import co.novu.api.common.SubscriberRequest;
import co.novu.api.events.requests.TriggerEventRequest;
import co.novu.api.events.pojos.BulkTriggerEventRequest;
import co.novu.api.events.responses.BulkTriggerEventResponse;
public class Main {
public static void main(String[] args) {
String apiKey = "<NOVU_API_KEY>";
Novu novu = new Novu(apiKey);
SubscriberRequest subscriberRequest = new SubscriberRequest();
subscriberRequest.setEmail("<EMAIL_ADDRESS>");
subscriberRequest.setFirstName("<FIRST_NAME>");
subscriberRequest.setLastName("<LAST_NAME>");
subscriberRequest.setPhone("<PHONE_NUMBER>");
subscriberRequest.setAvatar("<AVATAR>");
subscriberRequest.setSubscriberId("<SUBSCRIBER_ID>");
TriggerEventRequest triggerEventRequest1 = new TriggerEventRequest();
triggerEventRequest1.setName("<NAME>");
triggerEventRequest1.setTo(subscriberRequest);
triggerEventRequest1.setPayload(Collections.singletonMap("<CUSTOM_VARIABLE_NAME>", "<CUSTOM_VARIABLE_VALUE>"));
TriggerEventRequest triggerEventRequest2 = new TriggerEventRequest();
triggerEventRequest2.setName("<NAME>");
triggerEventRequest2.setTo(subscriberRequest);
triggerEventRequest2.setPayload(Collections.singletonMap("<CUSTOM_VARIABLE_NAME>", "<CUSTOM_VARIABLE_VALUE>"));
BulkTriggerEventRequest bulkTriggerEventRequest = new BulkTriggerEventRequest();
bulkTriggerEventRequest.setEvents(Arrays.asList(triggerEventRequest1, triggerEventRequest2));
BulkTriggerEventResponse response = novu.bulkTriggerEvent(bulkTriggerEventRequest);
}
}
using Novu.DTO;
using Novu.Models;
using Novu;
var novuConfiguration = new NovuClientConfiguration
{
/**
* Defaults to https://api.novu.co/v1
*/
Url = "https://novu-api.my-domain.com/v1",
ApiKey = "12345",
};
var novu = new NovuClient(novuConfiguration);
var payload = new List<EventTriggerDataDto>()
{
new()
{
EventName = "<WORKFLOW_TRIGGER_IDENTIFIER>",
To = { SubscriberId = "<UNIQUE_SUBSCRIBER_IDENTIFIER>"},
Payload = new TestRecord(){ Message = "Hello"}
},
new()
{
EventName = "<WORKFLOW_TRIGGER_IDENTIFIER>",
To = { SubscriberId = "<UNIQUE_SUBSCRIBER_IDENTIFIER>"},
Payload = new TestRecord(){ Message = "World"}
},
};
var trigger = await novu.Event.TriggerBulkAsync(payload);
{
"data": [
{
"acknowledged": true,
"status": "processed",
"transactionId": "string"
}
]
}
Events
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.
POST
/
v1
/
events
/
trigger
/
bulk
import { Novu } from '@novu/node';
const novu = new Novu("<NOVU_API_KEY>");
await novu.events.bulkTrigger([
{
name: "<WORKFLOW_TRIGGER_IDENTIFIER>",
to: "<UNIQUE_SUBSCRIBER_IDENTIFIER>",
payload: {
customKey: "customValue",
customKey1: {
nestedkey1: "nestedValue1"
}
},
overrides: {
email: {
from: "support@novu.co"
}
},
// actorId is subscriberId of actor
actor: "actorId"
tenant: "tenantIdentifier"
},
{
name: "<WORKFLOW_TRIGGER_IDENTIFIER>",
to: "<UNIQUE_SUBSCRIBER_IDENTIFIER>",
payload: {
customKey: "customValue",
customKey1: {
nestedkey1: "nestedValue1"
}
},
overrides: {
email: {
from: "support@novu.co"
}
},
// actorId is subscriberId of actor
actor: "actorId"
tenant: "tenantIdentifier"
}
])
use Novu\SDK\Novu;
$novu = new Novu(<NOVU_API_KEY>);
$novu->bulkTriggerEvent([
[
'name' => '<WORKFLOW_TRIGGER_IDENTIFIER>',
'to' => '<UNIQUE_SUBSCRIBER_IDENTIFIER>',
'payload' => ['customVariables' => 'Hello']
],
[
'name' => '<WORKFLOW_TRIGGER_IDENTIFIER>',
'to' => '<UNIQUE_SUBSCRIBER_IDENTIFIER>',
'payload' => ['customVariables' => 'World']
],
])->toArray();
curl -X POST https://api.novu.co/v1/events/trigger/bulk \
-H "Authorization: ApiKey <NOVU_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"events": [
{
"name": "<WORKFLOW_TRIGGER_IDENTIFIER>",
"to": {
"subscriberId": "<UNIQUE_SUBSCRIBER_IDENTIFIER>",
"email": "john@doemail.com"
},
"payload": {
"customKey": "customValue",
"customKey1": {
"nestedkey1": "nestedValue1"
}
},
"overrides": {
"email": {
"from": "support@novu.co"
}
},
"actor": "actorId",
"tenant": "tenantIdentifier"
},
{
"name": "<WORKFLOW_TRIGGER_IDENTIFIER>",
"to": {
"subscriberId": "<UNIQUE_SUBSCRIBER_IDENTIFIER>",
"email": "janet@doemail.com"
},
"payload": {
"customKey": "customValue",
"customKey1": {
"nestedkey1": "nestedValue1"
}
},
"overrides": {
"email": {
"from": "support@novu.co"
}
},
"actor": "actorId",
"tenant": "tenantIdentifier"
}
]
}'
require 'novu'
client = Novu::Client.new('<NOVU_API_KEY>')
payload = {
'events' => [
{
'name' => '<WORKFLOW_TRIGGER_IDENTIFIER>',
'payload' => { # optional
'first-name' => 'Adam' # optional
},
'to' => {
'subscriberId' => '7789'
},
'transactionId' => '89kjfke9893' #optional
},
{
'name' => '<WORKFLOW_TRIGGER_IDENTIFIER>',
'payload' => { # optional
'last-name' => 'Eve' # optional
},
'to' => {
'subscriberId' => '<UNIQUE_SUBSCRIBER_IDENTIFIER>'
},
'transactionId' => 'sw900999as' #optional
}
]
}
client.trigger_bulk_event(payload)
package main
import (
"context"
"fmt"
novu "github.com/novuhq/go-novu/lib"
"log"
)
func main() {
apiKey := "<NOVU_API_KEY>"
ctx := context.Background()
novuClient := novu.NewAPIClient(apiKey, &novu.Config{})
event1 := novu.BulkTriggerOptions{
Name: []string{"<WORKFLOW_TRIGGER_IDENTIFIER>"},
To: map[string]interface{}{
"subscriberId": "<UNIQUE_SUBSCRIBER_IDENTIFIER>",
"email": "john@doemail.com",
},
Payload: map[string]interface{}{
"name": "Hello World",
"organization": map[string]interface{}{
"logo": "https://happycorp.com/logo.png",
},
}
}
event2 := novu.BulkTriggerOptions{
Name: []string{"<WORKFLOW_TRIGGER_IDENTIFIER>"},
To: map[string]interface{}{
"subscriberId": "<UNIQUE_SUBSCRIBER_IDENTIFIER>",
"email": "janet@doemail.com",
},
Payload: map[string]interface{}{
"name": "Hello World",
"organization": map[string]interface{}{
"logo": "https://happycorp.com/logo.png",
},
}
}
triggerPayload := []novu.BulkTriggerOptions{ event1, event2}
resp, err := novuClient.EventApi.TriggerBulk(ctx, triggerPayload)
if err != nil {
log.Fatal("novu error", err.Error())
return
}
}
from novu.dto.event import InputEventDto
from novu.api import EventApi
url = "https://api.novu.co"
api_key = "<NOVU_API_KEY>"
event_1 = InputEventDto(
name="<WORKFLOW_TRIGGER_IDENTIFIER>", # The workflow ID is the slug of the workflow name. It can be found on the workflow page.
recipients="<UNIQUE_SUBSCRIBER_IDENTIFIER>",
payload={}, # Your custom Novu payload goes here
)
event_2 = InputEventDto(
name="<WORKFLOW_TRIGGER_IDENTIFIER>",
recipients="<UNIQUE_SUBSCRIBER_IDENTIFIER>",
payload={},
)
novu = EventApi(url, api_key).trigger_bulk(
events=[event1,event2]
)
import co.novu.common.base.Novu;
import co.novu.api.common.SubscriberRequest;
import co.novu.api.events.requests.TriggerEventRequest;
import co.novu.api.events.pojos.BulkTriggerEventRequest;
import co.novu.api.events.responses.BulkTriggerEventResponse;
public class Main {
public static void main(String[] args) {
String apiKey = "<NOVU_API_KEY>";
Novu novu = new Novu(apiKey);
SubscriberRequest subscriberRequest = new SubscriberRequest();
subscriberRequest.setEmail("<EMAIL_ADDRESS>");
subscriberRequest.setFirstName("<FIRST_NAME>");
subscriberRequest.setLastName("<LAST_NAME>");
subscriberRequest.setPhone("<PHONE_NUMBER>");
subscriberRequest.setAvatar("<AVATAR>");
subscriberRequest.setSubscriberId("<SUBSCRIBER_ID>");
TriggerEventRequest triggerEventRequest1 = new TriggerEventRequest();
triggerEventRequest1.setName("<NAME>");
triggerEventRequest1.setTo(subscriberRequest);
triggerEventRequest1.setPayload(Collections.singletonMap("<CUSTOM_VARIABLE_NAME>", "<CUSTOM_VARIABLE_VALUE>"));
TriggerEventRequest triggerEventRequest2 = new TriggerEventRequest();
triggerEventRequest2.setName("<NAME>");
triggerEventRequest2.setTo(subscriberRequest);
triggerEventRequest2.setPayload(Collections.singletonMap("<CUSTOM_VARIABLE_NAME>", "<CUSTOM_VARIABLE_VALUE>"));
BulkTriggerEventRequest bulkTriggerEventRequest = new BulkTriggerEventRequest();
bulkTriggerEventRequest.setEvents(Arrays.asList(triggerEventRequest1, triggerEventRequest2));
BulkTriggerEventResponse response = novu.bulkTriggerEvent(bulkTriggerEventRequest);
}
}
using Novu.DTO;
using Novu.Models;
using Novu;
var novuConfiguration = new NovuClientConfiguration
{
/**
* Defaults to https://api.novu.co/v1
*/
Url = "https://novu-api.my-domain.com/v1",
ApiKey = "12345",
};
var novu = new NovuClient(novuConfiguration);
var payload = new List<EventTriggerDataDto>()
{
new()
{
EventName = "<WORKFLOW_TRIGGER_IDENTIFIER>",
To = { SubscriberId = "<UNIQUE_SUBSCRIBER_IDENTIFIER>"},
Payload = new TestRecord(){ Message = "Hello"}
},
new()
{
EventName = "<WORKFLOW_TRIGGER_IDENTIFIER>",
To = { SubscriberId = "<UNIQUE_SUBSCRIBER_IDENTIFIER>"},
Payload = new TestRecord(){ Message = "World"}
},
};
var trigger = await novu.Event.TriggerBulkAsync(payload);
{
"data": [
{
"acknowledged": true,
"status": "processed",
"transactionId": "string"
}
]
}
Enter your API key in the
Authorization field like the example shown below:E.g ApiKey 18d2e625f05d80eimport { Novu } from '@novu/node';
const novu = new Novu("<NOVU_API_KEY>");
await novu.events.bulkTrigger([
{
name: "<WORKFLOW_TRIGGER_IDENTIFIER>",
to: "<UNIQUE_SUBSCRIBER_IDENTIFIER>",
payload: {
customKey: "customValue",
customKey1: {
nestedkey1: "nestedValue1"
}
},
overrides: {
email: {
from: "support@novu.co"
}
},
// actorId is subscriberId of actor
actor: "actorId"
tenant: "tenantIdentifier"
},
{
name: "<WORKFLOW_TRIGGER_IDENTIFIER>",
to: "<UNIQUE_SUBSCRIBER_IDENTIFIER>",
payload: {
customKey: "customValue",
customKey1: {
nestedkey1: "nestedValue1"
}
},
overrides: {
email: {
from: "support@novu.co"
}
},
// actorId is subscriberId of actor
actor: "actorId"
tenant: "tenantIdentifier"
}
])
use Novu\SDK\Novu;
$novu = new Novu(<NOVU_API_KEY>);
$novu->bulkTriggerEvent([
[
'name' => '<WORKFLOW_TRIGGER_IDENTIFIER>',
'to' => '<UNIQUE_SUBSCRIBER_IDENTIFIER>',
'payload' => ['customVariables' => 'Hello']
],
[
'name' => '<WORKFLOW_TRIGGER_IDENTIFIER>',
'to' => '<UNIQUE_SUBSCRIBER_IDENTIFIER>',
'payload' => ['customVariables' => 'World']
],
])->toArray();
curl -X POST https://api.novu.co/v1/events/trigger/bulk \
-H "Authorization: ApiKey <NOVU_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"events": [
{
"name": "<WORKFLOW_TRIGGER_IDENTIFIER>",
"to": {
"subscriberId": "<UNIQUE_SUBSCRIBER_IDENTIFIER>",
"email": "john@doemail.com"
},
"payload": {
"customKey": "customValue",
"customKey1": {
"nestedkey1": "nestedValue1"
}
},
"overrides": {
"email": {
"from": "support@novu.co"
}
},
"actor": "actorId",
"tenant": "tenantIdentifier"
},
{
"name": "<WORKFLOW_TRIGGER_IDENTIFIER>",
"to": {
"subscriberId": "<UNIQUE_SUBSCRIBER_IDENTIFIER>",
"email": "janet@doemail.com"
},
"payload": {
"customKey": "customValue",
"customKey1": {
"nestedkey1": "nestedValue1"
}
},
"overrides": {
"email": {
"from": "support@novu.co"
}
},
"actor": "actorId",
"tenant": "tenantIdentifier"
}
]
}'
require 'novu'
client = Novu::Client.new('<NOVU_API_KEY>')
payload = {
'events' => [
{
'name' => '<WORKFLOW_TRIGGER_IDENTIFIER>',
'payload' => { # optional
'first-name' => 'Adam' # optional
},
'to' => {
'subscriberId' => '7789'
},
'transactionId' => '89kjfke9893' #optional
},
{
'name' => '<WORKFLOW_TRIGGER_IDENTIFIER>',
'payload' => { # optional
'last-name' => 'Eve' # optional
},
'to' => {
'subscriberId' => '<UNIQUE_SUBSCRIBER_IDENTIFIER>'
},
'transactionId' => 'sw900999as' #optional
}
]
}
client.trigger_bulk_event(payload)
package main
import (
"context"
"fmt"
novu "github.com/novuhq/go-novu/lib"
"log"
)
func main() {
apiKey := "<NOVU_API_KEY>"
ctx := context.Background()
novuClient := novu.NewAPIClient(apiKey, &novu.Config{})
event1 := novu.BulkTriggerOptions{
Name: []string{"<WORKFLOW_TRIGGER_IDENTIFIER>"},
To: map[string]interface{}{
"subscriberId": "<UNIQUE_SUBSCRIBER_IDENTIFIER>",
"email": "john@doemail.com",
},
Payload: map[string]interface{}{
"name": "Hello World",
"organization": map[string]interface{}{
"logo": "https://happycorp.com/logo.png",
},
}
}
event2 := novu.BulkTriggerOptions{
Name: []string{"<WORKFLOW_TRIGGER_IDENTIFIER>"},
To: map[string]interface{}{
"subscriberId": "<UNIQUE_SUBSCRIBER_IDENTIFIER>",
"email": "janet@doemail.com",
},
Payload: map[string]interface{}{
"name": "Hello World",
"organization": map[string]interface{}{
"logo": "https://happycorp.com/logo.png",
},
}
}
triggerPayload := []novu.BulkTriggerOptions{ event1, event2}
resp, err := novuClient.EventApi.TriggerBulk(ctx, triggerPayload)
if err != nil {
log.Fatal("novu error", err.Error())
return
}
}
from novu.dto.event import InputEventDto
from novu.api import EventApi
url = "https://api.novu.co"
api_key = "<NOVU_API_KEY>"
event_1 = InputEventDto(
name="<WORKFLOW_TRIGGER_IDENTIFIER>", # The workflow ID is the slug of the workflow name. It can be found on the workflow page.
recipients="<UNIQUE_SUBSCRIBER_IDENTIFIER>",
payload={}, # Your custom Novu payload goes here
)
event_2 = InputEventDto(
name="<WORKFLOW_TRIGGER_IDENTIFIER>",
recipients="<UNIQUE_SUBSCRIBER_IDENTIFIER>",
payload={},
)
novu = EventApi(url, api_key).trigger_bulk(
events=[event1,event2]
)
import co.novu.common.base.Novu;
import co.novu.api.common.SubscriberRequest;
import co.novu.api.events.requests.TriggerEventRequest;
import co.novu.api.events.pojos.BulkTriggerEventRequest;
import co.novu.api.events.responses.BulkTriggerEventResponse;
public class Main {
public static void main(String[] args) {
String apiKey = "<NOVU_API_KEY>";
Novu novu = new Novu(apiKey);
SubscriberRequest subscriberRequest = new SubscriberRequest();
subscriberRequest.setEmail("<EMAIL_ADDRESS>");
subscriberRequest.setFirstName("<FIRST_NAME>");
subscriberRequest.setLastName("<LAST_NAME>");
subscriberRequest.setPhone("<PHONE_NUMBER>");
subscriberRequest.setAvatar("<AVATAR>");
subscriberRequest.setSubscriberId("<SUBSCRIBER_ID>");
TriggerEventRequest triggerEventRequest1 = new TriggerEventRequest();
triggerEventRequest1.setName("<NAME>");
triggerEventRequest1.setTo(subscriberRequest);
triggerEventRequest1.setPayload(Collections.singletonMap("<CUSTOM_VARIABLE_NAME>", "<CUSTOM_VARIABLE_VALUE>"));
TriggerEventRequest triggerEventRequest2 = new TriggerEventRequest();
triggerEventRequest2.setName("<NAME>");
triggerEventRequest2.setTo(subscriberRequest);
triggerEventRequest2.setPayload(Collections.singletonMap("<CUSTOM_VARIABLE_NAME>", "<CUSTOM_VARIABLE_VALUE>"));
BulkTriggerEventRequest bulkTriggerEventRequest = new BulkTriggerEventRequest();
bulkTriggerEventRequest.setEvents(Arrays.asList(triggerEventRequest1, triggerEventRequest2));
BulkTriggerEventResponse response = novu.bulkTriggerEvent(bulkTriggerEventRequest);
}
}
using Novu.DTO;
using Novu.Models;
using Novu;
var novuConfiguration = new NovuClientConfiguration
{
/**
* Defaults to https://api.novu.co/v1
*/
Url = "https://novu-api.my-domain.com/v1",
ApiKey = "12345",
};
var novu = new NovuClient(novuConfiguration);
var payload = new List<EventTriggerDataDto>()
{
new()
{
EventName = "<WORKFLOW_TRIGGER_IDENTIFIER>",
To = { SubscriberId = "<UNIQUE_SUBSCRIBER_IDENTIFIER>"},
Payload = new TestRecord(){ Message = "Hello"}
},
new()
{
EventName = "<WORKFLOW_TRIGGER_IDENTIFIER>",
To = { SubscriberId = "<UNIQUE_SUBSCRIBER_IDENTIFIER>"},
Payload = new TestRecord(){ Message = "World"}
},
};
var trigger = await novu.Event.TriggerBulkAsync(payload);
{
"data": [
{
"acknowledged": true,
"status": "processed",
"transactionId": "string"
}
]
}
Authorizations
API key authentication. Allowed headers-- "Authorization: ApiKey <api_key>".
Body
application/json
Show child attributes
Show child attributes
Response
Created
If trigger was acknowledged or not
Status for trigger
Available options:
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?
⌘I