GET
/
v1
/
notifications
/
{notificationId}
import { Novu } from "@novu/api";

const novu = new Novu({
  secretKey: "YOUR_SECRET_KEY_HERE",
});

async function run() {
  const result = await novu.notifications.retrieve("<id>");

  // Handle the result
  console.log(result);
}

run();
{
  "_id": "<string>",
  "_environmentId": "<string>",
  "_organizationId": "<string>",
  "_subscriberId": "<string>",
  "transactionId": "<string>",
  "_templateId": "<string>",
  "_digestedNotificationId": "<string>",
  "createdAt": "<string>",
  "updatedAt": "<string>",
  "channels": [
    "in_app"
  ],
  "subscriber": {
    "firstName": "<string>",
    "subscriberId": "<string>",
    "_id": "<string>",
    "lastName": "<string>",
    "email": "<string>",
    "phone": "<string>"
  },
  "template": {
    "_id": "<string>",
    "name": "<string>",
    "origin": "novu-cloud",
    "triggers": [
      {
        "type": "event",
        "identifier": "<string>",
        "variables": [
          {
            "name": "<string>"
          }
        ],
        "subscriberVariables": [
          {
            "name": "<string>"
          }
        ]
      }
    ]
  },
  "jobs": [
    {
      "_id": "<string>",
      "type": "in_app",
      "digest": {
        "digestKey": "<string>",
        "amount": 123,
        "unit": "seconds",
        "type": "regular",
        "events": [
          {}
        ],
        "backoff": true,
        "backoffAmount": 123,
        "backoffUnit": "seconds",
        "updateMode": true,
        "timed": {
          "atTime": "<string>",
          "weekDays": [
            "monday"
          ],
          "monthDays": [
            123
          ],
          "ordinal": "1",
          "ordinalValue": "day",
          "monthlyType": "each",
          "cronExpression": "<string>"
        }
      },
      "executionDetails": [
        {
          "_id": "<string>",
          "createdAt": "<string>",
          "status": "Success",
          "detail": "<string>",
          "isRetry": true,
          "isTest": true,
          "providerId": "emailjs",
          "raw": "<string>",
          "source": "Credentials"
        }
      ],
      "step": {
        "_id": "<string>",
        "active": true,
        "replyCallback": {},
        "controlVariables": {},
        "metadata": {},
        "issues": {},
        "filters": [
          {
            "isNegated": true,
            "type": "BOOLEAN",
            "value": "AND",
            "children": [
              {
                "field": "<string>",
                "value": "<string>",
                "operator": "LARGER",
                "on": "subscriber"
              }
            ]
          }
        ],
        "template": {},
        "variants": [
          {}
        ],
        "_templateId": "<string>",
        "name": "<string>",
        "_parentId": "<string>"
      },
      "payload": {},
      "providerId": "emailjs",
      "status": "<string>",
      "updatedAt": "<string>"
    }
  ],
  "payload": {},
  "tags": [
    "<string>"
  ],
  "controls": {},
  "to": {}
}

Authorizations

Authorization
string
header
required

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

Headers

idempotency-key
string

A header for idempotency purposes

Path Parameters

notificationId
string
required

Response

200
application/json
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>[]

Channels of the notification

Available options:
in_app,
email,
sms,
chat,
push,
digest,
trigger,
delay,
custom
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