curl --request POST \
--url https://api.novu.co/v1/events/trigger \
--header 'Content-Type: application/json' \
--data '{
"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>"
}
}
Trigger event is the main (and only) way to send notifications to subscribers. The trigger identifier is used to match the particular workflow associated with it. Additional information can be passed according the body interface below.
curl --request POST \
--url https://api.novu.co/v1/events/trigger \
--header 'Content-Type: application/json' \
--data '{
"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>"
}
}
Created
The response is of type object
.
Was this page helpful?