List all events
List all notification events (triggered events) for the current environment. This API supports filtering by channels, templates, emails, subscriberIds, transactionId, topicKey, severity, contextKeys. Checkout all available filters in the query section. This API returns event triggers, to list each channel notifications, check messages APIs.
import { Novu } from "@novu/api";
const novu = new Novu({
secretKey: "YOUR_SECRET_KEY_HERE",
});
async function run() {
const result = await novu.notifications.list({});
console.log(result);
}
run();using Novu;
using Novu.Models.Components;
using Novu.Models.Requests;
var sdk = new NovuSDK(secretKey: "YOUR_SECRET_KEY_HERE");
NotificationsControllerListNotificationsRequest req = new NotificationsControllerListNotificationsRequest() {};
var res = await sdk.Notifications.GetAsync(req);
// handle responsedeclare(strict_types=1);
require 'vendor/autoload.php';
use novu;
use novu\Models\Operations;
$sdk = novu\Novu::builder()
->setSecurity(
'YOUR_SECRET_KEY_HERE'
)
->build();
$request = new Operations\NotificationsControllerListNotificationsRequest();
$response = $sdk->notifications->list(
request: $request
);
if ($response->activitiesResponseDto !== null) {
// handle response
}from novu_py import Novu
with Novu(
secret_key="YOUR_SECRET_KEY_HERE",
) as novu:
res = novu.notifications.list(request={})
# Handle response
print(res)package main
import(
"context"
"github.com/novuhq/novu-go/v3"
"github.com/novuhq/novu-go/v3/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := v3.New(
v3.WithSecurity("YOUR_SECRET_KEY_HERE"),
)
res, err := s.Notifications.List(ctx, operations.NotificationsControllerListNotificationsRequest{})
if err != nil {
log.Fatal(err)
}
if res.ActivitiesResponseDto != nil {
// handle response
}
}curl --request GET \
--url https://api.novu.co/v1/notifications \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.novu.co/v1/notifications', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.get("https://api.novu.co/v1/notifications")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.novu.co/v1/notifications")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"hasMore": true,
"data": [
{
"_environmentId": "<string>",
"_organizationId": "<string>",
"_subscriberId": "<string>",
"transactionId": "<string>",
"_id": "<string>",
"_templateId": "<string>",
"_digestedNotificationId": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"channels": [],
"subscriber": {
"subscriberId": "<string>",
"_id": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"phone": "<string>"
},
"template": {
"name": "<string>",
"triggers": [
{
"type": "event",
"identifier": "<string>",
"variables": [
{
"name": "<string>"
}
],
"subscriberVariables": [
{
"name": "<string>"
}
]
}
],
"_id": "<string>"
},
"jobs": [
{
"_id": "<string>",
"executionDetails": [
{
"_id": "<string>",
"detail": "<string>",
"isRetry": true,
"isTest": true,
"createdAt": "<string>",
"raw": "<string>"
}
],
"step": {
"_id": "<string>",
"active": true,
"filters": [
{
"isNegated": true,
"children": [
{
"field": "<string>",
"value": "<string>"
}
]
}
],
"_templateId": "<string>",
"replyCallback": {},
"controlVariables": {},
"metadata": {},
"issues": {},
"template": {},
"variants": "<array>",
"name": "<string>",
"_parentId": "<string>"
},
"status": "<string>",
"digest": {
"digestKey": "<string>",
"amount": 123,
"events": [
{}
],
"backoff": true,
"backoffAmount": 123,
"updateMode": true,
"timed": {
"atTime": "<string>",
"weekDays": [],
"monthDays": [
123
],
"cronExpression": "<string>",
"untilDate": "<string>"
}
},
"overrides": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"payload": {},
"updatedAt": "<string>",
"scheduleExtensionsCount": 123
}
],
"payload": {},
"tags": [
"<string>"
],
"controls": {},
"to": {},
"topics": [
{
"_topicId": "<string>",
"topicKey": "<string>"
}
],
"critical": true,
"contextKeys": [
"<string>"
]
}
],
"pageSize": 123,
"page": 123
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"errors": {
"fieldName1": {
"messages": [
"Field is required",
"Must be a valid email address"
],
"value": "invalidEmail"
},
"fieldName2": {
"messages": [
"Must be at least 18 years old"
],
"value": 17
},
"fieldName3": {
"messages": [
"Must be a boolean value"
],
"value": true
},
"fieldName4": {
"messages": [
"Must be a valid object"
],
"value": {
"key": "value"
}
},
"fieldName5": {
"messages": [
"Field is missing"
],
"value": null
},
"fieldName6": {
"messages": [
"Undefined value"
]
}
},
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}"API rate limit exceeded"{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}"Please wait some time, then try again."Authorizations
API key authentication. Allowed headers-- "Authorization: ApiKey <novu_secret_key>".
Headers
A header for idempotency purposes
Query Parameters
Array of channel types
Channel type through which the message is sent
in_app, email, sms, chat, push Array of template IDs or a single template ID
Array of email addresses or a single email address
Search term (deprecated)
Array of subscriber IDs or a single subscriber ID
Array of severity levels or a single severity level
Page number for pagination
x >= 0Limit for pagination
1 <= x <= 50The transaction ID to filter by
Topic Key for filtering notifications by topic
Subscription ID for filtering notifications by subscription
Filter by exact context keys, order insensitive (format: "type:id")
Date filter for records after this timestamp. Defaults to earliest date allowed by subscription plan
Date filter for records before this timestamp. Defaults to current time of request (now)
Was this page helpful?
import { Novu } from "@novu/api";
const novu = new Novu({
secretKey: "YOUR_SECRET_KEY_HERE",
});
async function run() {
const result = await novu.notifications.list({});
console.log(result);
}
run();using Novu;
using Novu.Models.Components;
using Novu.Models.Requests;
var sdk = new NovuSDK(secretKey: "YOUR_SECRET_KEY_HERE");
NotificationsControllerListNotificationsRequest req = new NotificationsControllerListNotificationsRequest() {};
var res = await sdk.Notifications.GetAsync(req);
// handle responsedeclare(strict_types=1);
require 'vendor/autoload.php';
use novu;
use novu\Models\Operations;
$sdk = novu\Novu::builder()
->setSecurity(
'YOUR_SECRET_KEY_HERE'
)
->build();
$request = new Operations\NotificationsControllerListNotificationsRequest();
$response = $sdk->notifications->list(
request: $request
);
if ($response->activitiesResponseDto !== null) {
// handle response
}from novu_py import Novu
with Novu(
secret_key="YOUR_SECRET_KEY_HERE",
) as novu:
res = novu.notifications.list(request={})
# Handle response
print(res)package main
import(
"context"
"github.com/novuhq/novu-go/v3"
"github.com/novuhq/novu-go/v3/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := v3.New(
v3.WithSecurity("YOUR_SECRET_KEY_HERE"),
)
res, err := s.Notifications.List(ctx, operations.NotificationsControllerListNotificationsRequest{})
if err != nil {
log.Fatal(err)
}
if res.ActivitiesResponseDto != nil {
// handle response
}
}curl --request GET \
--url https://api.novu.co/v1/notifications \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.novu.co/v1/notifications', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.get("https://api.novu.co/v1/notifications")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.novu.co/v1/notifications")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"hasMore": true,
"data": [
{
"_environmentId": "<string>",
"_organizationId": "<string>",
"_subscriberId": "<string>",
"transactionId": "<string>",
"_id": "<string>",
"_templateId": "<string>",
"_digestedNotificationId": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"channels": [],
"subscriber": {
"subscriberId": "<string>",
"_id": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"phone": "<string>"
},
"template": {
"name": "<string>",
"triggers": [
{
"type": "event",
"identifier": "<string>",
"variables": [
{
"name": "<string>"
}
],
"subscriberVariables": [
{
"name": "<string>"
}
]
}
],
"_id": "<string>"
},
"jobs": [
{
"_id": "<string>",
"executionDetails": [
{
"_id": "<string>",
"detail": "<string>",
"isRetry": true,
"isTest": true,
"createdAt": "<string>",
"raw": "<string>"
}
],
"step": {
"_id": "<string>",
"active": true,
"filters": [
{
"isNegated": true,
"children": [
{
"field": "<string>",
"value": "<string>"
}
]
}
],
"_templateId": "<string>",
"replyCallback": {},
"controlVariables": {},
"metadata": {},
"issues": {},
"template": {},
"variants": "<array>",
"name": "<string>",
"_parentId": "<string>"
},
"status": "<string>",
"digest": {
"digestKey": "<string>",
"amount": 123,
"events": [
{}
],
"backoff": true,
"backoffAmount": 123,
"updateMode": true,
"timed": {
"atTime": "<string>",
"weekDays": [],
"monthDays": [
123
],
"cronExpression": "<string>",
"untilDate": "<string>"
}
},
"overrides": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"payload": {},
"updatedAt": "<string>",
"scheduleExtensionsCount": 123
}
],
"payload": {},
"tags": [
"<string>"
],
"controls": {},
"to": {},
"topics": [
{
"_topicId": "<string>",
"topicKey": "<string>"
}
],
"critical": true,
"contextKeys": [
"<string>"
]
}
],
"pageSize": 123,
"page": 123
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"errors": {
"fieldName1": {
"messages": [
"Field is required",
"Must be a valid email address"
],
"value": "invalidEmail"
},
"fieldName2": {
"messages": [
"Must be at least 18 years old"
],
"value": 17
},
"fieldName3": {
"messages": [
"Must be a boolean value"
],
"value": true
},
"fieldName4": {
"messages": [
"Must be a valid object"
],
"value": {
"key": "value"
}
},
"fieldName5": {
"messages": [
"Field is missing"
],
"value": null
},
"fieldName6": {
"messages": [
"Undefined value"
]
}
},
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}"API rate limit exceeded"{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}"Please wait some time, then try again."