Skip to main content
GET
/
v2
/
subscribers
/
{subscriberId}
/
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\SubscribersControllerGetSubscriberNotificationsRequest(
    subscriberId: '<id>',
    offset: 0,
    createdGte: 1704067200000,
    createdLte: 1735689599999,
);

$response = $sdk->subscribers->notifications->list(
    request: $request
);

if ($response->getSubscriberNotificationsResponseDto !== null) {
    // handle response
}
{
  "data": [
    {
      "id": "<string>",
      "transactionId": "<string>",
      "body": "<string>",
      "to": {
        "id": "<string>",
        "subscriberId": "<string>",
        "firstName": "<string>",
        "lastName": "<string>",
        "avatar": "<string>"
      },
      "isRead": true,
      "isSeen": true,
      "isArchived": true,
      "isSnoozed": true,
      "createdAt": "<string>",
      "subject": "<string>",
      "snoozedUntil": "<string>",
      "deliveredAt": [
        "<string>"
      ],
      "readAt": "<string>",
      "firstSeenAt": "<string>",
      "archivedAt": "<string>",
      "avatar": "<string>",
      "primaryAction": {
        "label": "<string>",
        "isCompleted": true,
        "redirect": {
          "url": "<string>"
        }
      },
      "secondaryAction": {
        "label": "<string>",
        "isCompleted": true,
        "redirect": {
          "url": "<string>"
        }
      },
      "tags": [
        "<string>"
      ],
      "data": {},
      "redirect": {
        "url": "<string>"
      },
      "workflow": {
        "id": "<string>",
        "identifier": "<string>",
        "name": "<string>",
        "critical": true,
        "tags": [
          "<string>"
        ],
        "data": {}
      }
    }
  ],
  "hasMore": true,
  "filter": {}
}

Authorizations

Authorization
string
header
required

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

Headers

idempotency-key
string

A header for idempotency purposes

Path Parameters

subscriberId
string
required

The identifier of the subscriber

Query Parameters

limit
number
default:10
Required range: x <= 100
after
string
offset
number
read
boolean

Filter by read/unread state

archived
boolean

Filter by archived state

snoozed
boolean

Filter by snoozed state

seen
boolean

Filter by seen state

data
string

Filter by data attributes (JSON string)

severity
enum<string>[]

Filter by severity levels

Available options:
high,
medium,
low,
none
createdGte
number

Filter notifications created on or after this timestamp (Unix timestamp in milliseconds)

createdLte
number

Filter notifications created on or before this timestamp (Unix timestamp in milliseconds)

contextKeys
string[]

Context keys for filtering notifications in multi-context scenarios

Response

OK

data
object[]
required

Array of notifications

hasMore
boolean
required

Indicates if there are more notifications available

filter
object
required

The filter applied to the notifications