Skip to main content
GET
/
v1
/
notifications
PHP
declare(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
}
{
  "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
}

Authorizations

Authorization
string
header
required

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

Headers

idempotency-key
string

A header for idempotency purposes

Query Parameters

channels
enum<string>[]

Array of channel types

Channel type through which the message is sent

Available options:
in_app,
email,
sms,
chat,
push
templates
string[]

Array of template IDs or a single template ID

emails
string[]

Array of email addresses or a single email address

Search term (deprecated)

subscriberIds
string[]

Array of subscriber IDs or a single subscriber ID

severity
string[]

Array of severity levels or a single severity level

page
number
default:0

Page number for pagination

Required range: x >= 0
limit
number
default:10

Limit for pagination

Required range: 1 <= x <= 50
transactionId
string

The transaction ID to filter by

topicKey
string

Topic Key for filtering notifications by topic

subscriptionId
string

Subscription ID for filtering notifications by subscription

contextKeys
string[]

Filter by exact context keys, order insensitive (format: "type:id")

after
string

Date filter for records after this timestamp. Defaults to earliest date allowed by subscription plan

before
string

Date filter for records before this timestamp. Defaults to current time of request (now)

Response

hasMore
boolean
required

Indicates if there are more activities in the result set

data
object[]
required

Array of activity notifications

pageSize
number
required

Page size of the activities

page
number
required

Current page of the activities