GET
/
v1
/
notifications
import co.novu.Novu
import co.novu.dto.request.NotificationRequest
import co.novu.extensions.notifications

fun main() {
    val novu = Novu(apiKey = "<NOVU_API_KEY>")
    val notificationRequest = NotificationRequest("<CHANNELS>", "<TEMPLATES>", "<EMAILS>", "<SEARCH>");
    val notifications = novu.notifications(notificationRequest)
    println(notifications)
}
{
  "hasMore": true,
  "data": [
    {
      "_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>"
          },
          "overrides": {
            "workflowId": "some_wf_id",
            "stepId": "some_wf_id"
          },
          "payload": {},
          "providerId": "emailjs",
          "status": "<string>",
          "updatedAt": "<string>"
        }
      ],
      "payload": {},
      "tags": [
        "<string>"
      ],
      "controls": {},
      "to": {}
    }
  ],
  "pageSize": 123,
  "page": 123
}

Enter your API key in the Authorization field like the example shown below:

E.g ApiKey 18d2e625f05d80e

import co.novu.Novu
import co.novu.dto.request.NotificationRequest
import co.novu.extensions.notifications

fun main() {
    val novu = Novu(apiKey = "<NOVU_API_KEY>")
    val notificationRequest = NotificationRequest("<CHANNELS>", "<TEMPLATES>", "<EMAILS>", "<SEARCH>");
    val notifications = novu.notifications(notificationRequest)
    println(notifications)
}

Authorizations

Authorization
string
header
required

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

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

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

Transaction ID for filtering

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

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