Skip to main content
GET
/
v1
/
notifications
/
{notificationId}
PHP
declare(strict_types=1);

require 'vendor/autoload.php';

use novu;

$sdk = novu\Novu::builder()
    ->setSecurity(
        'YOUR_SECRET_KEY_HERE'
    )
    ->build();



$response = $sdk->notifications->get(
    notificationId: '<id>'
);

if ($response->activityNotificationResponseDto !== null) {
    // handle response
}
{
  "_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>"
  ]
}

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

notificationId
string
required

Response

OK

_environmentId
string
required

Environment ID of the notification

_organizationId
string
required

Organization ID of the notification

_subscriberId
string
required

Subscriber ID of the notification

transactionId
string
required

Transaction ID of the notification

_id
string

Unique identifier of the notification

_templateId
string

Template ID of the notification

_digestedNotificationId
string

Digested Notification ID

createdAt
string

Creation time of the notification

updatedAt
string

Last updated time of the notification

channels
enum<string>[]

Type of the step

Available options:
in_app,
email,
sms,
chat,
push,
digest,
trigger,
delay,
throttle,
custom,
http_request
subscriber
object

Subscriber of the notification

template
object

Template of the notification

jobs
object[]

Jobs of the notification

payload
object

Payload of the notification

tags
string[]

Tags associated with the notification

controls
object

Controls associated with the notification

to
object

To field for subscriber definition

topics
object[]

Topics of the notification

severity
enum<string>

Severity of the workflow

Available options:
high,
medium,
low,
none
critical
boolean

Criticality of the notification

contextKeys
string[]

Context (single or multi) in which the notification was sent