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>",
      "transactionId": "<string>",
      "createdAt": "<string>",
      "channels": "in_app",
      "subscriber": {
        "firstName": "<string>",
        "_id": "<string>",
        "lastName": "<string>",
        "email": "<string>",
        "phone": "<string>"
      },
      "template": {
        "_id": "<string>",
        "name": "<string>",
        "triggers": [
          {
            "type": "event",
            "identifier": "<string>",
            "variables": [
              {
                "name": "<string>"
              }
            ],
            "subscriberVariables": [
              {
                "name": "<string>"
              }
            ]
          }
        ]
      },
      "jobs": [
        {
          "_id": "<string>",
          "type": "<string>",
          "digest": {},
          "executionDetails": [
            {
              "_id": "<string>",
              "_jobId": "<string>",
              "status": "Success",
              "detail": "<string>",
              "isRetry": true,
              "isTest": true,
              "providerId": {},
              "raw": "<string>",
              "source": "Credentials"
            }
          ],
          "step": {
            "_id": "<string>",
            "active": true,
            "filters": {
              "isNegated": true,
              "type": "BOOLEAN",
              "value": "AND",
              "children": [
                {
                  "field": "<string>",
                  "value": "<string>",
                  "operator": "LARGER",
                  "on": "subscriber"
                }
              ]
            },
            "template": {}
          },
          "payload": {},
          "providerId": {},
          "status": "<string>"
        }
      ]
    }
  ],
  "pageSize": 123,
  "page": 123
}

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

E.g ApiKey 18d2e625f05d80e

Query Parameters

channels
enum<string>[]
required
Available options:
in_app,
email,
sms,
chat,
push
templates
string[]
required
emails
string[]
required
search
string
requireddeprecated
subscriberIds
string[]
required
page
number
default: 0
transactionId
string

Response

200 - application/json
hasMore
boolean
required
data
object[]
required
pageSize
number
required
page
number
required