Get messages

Returns a list of messages, could paginate using the `page` query parameter

GET
/v1/messages

Authorization

Authorization<token>

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

In: header

Query Parameters

channelstring

Channel type through which the message is sent

Value in: "in_app" | "email" | "sms" | "chat" | "push"
subscriberIdstring
transactionIdarray<string>
pagenumber
Default: 0
limitnumber
Default: 10

Header Parameters

idempotency-keystring

A header for idempotency purposes

curl -X GET "https://api.novu.co/v1/messages?channel=in_app&subscriberId=string" \
  -H "idempotency-key: string" \
  -H "Authorization: <token>"

{
  "totalCount": 0,
  "hasMore": true,
  "data": [
    {
      "_id": "string",
      "_templateId": "string",
      "_environmentId": "string",
      "_messageTemplateId": "string",
      "_organizationId": "string",
      "_notificationId": "string",
      "_subscriberId": "string",
      "subscriber": {
        "_id": "string",
        "firstName": "string",
        "lastName": "string",
        "email": "string",
        "phone": "string",
        "avatar": "string",
        "locale": "string",
        "channels": [
          {
            "providerId": "slack",
            "integrationIdentifier": "string",
            "credentials": {
              "webhookUrl": "https://example.com/webhook",
              "channel": "general",
              "deviceTokens": [
                "token1",
                "token2",
                "token3"
              ],
              "alertUid": "12345-abcde",
              "title": "Critical Alert",
              "imageUrl": "https://example.com/image.png",
              "state": "resolved",
              "externalUrl": "https://example.com/details"
            },
            "_integrationId": "string"
          }
        ],
        "topics": [
          "string"
        ],
        "isOnline": true,
        "lastOnlineAt": "string",
        "__v": 0,
        "data": {},
        "timezone": "string",
        "subscriberId": "string",
        "_organizationId": "string",
        "_environmentId": "string",
        "deleted": true,
        "createdAt": "string",
        "updatedAt": "string"
      },
      "template": {
        "_id": "string",
        "name": "string",
        "description": "string",
        "active": true,
        "draft": true,
        "preferenceSettings": {
          "email": true,
          "sms": false,
          "in_app": true,
          "chat": false,
          "push": true
        },
        "critical": true,
        "tags": [
          "string"
        ],
        "steps": [
          {
            "_id": "string",
            "uuid": "string",
            "name": "string",
            "_templateId": "string",
            "active": true,
            "shouldStopOnFail": true,
            "template": {},
            "filters": [
              {
                "isNegated": true,
                "type": "BOOLEAN",
                "value": "AND",
                "children": [
                  {
                    "field": "string",
                    "value": "string",
                    "operator": "LARGER",
                    "on": "subscriber"
                  }
                ]
              }
            ],
            "_parentId": "string",
            "metadata": {
              "amount": 0,
              "unit": "seconds",
              "digestKey": "string",
              "type": "regular",
              "backoff": true,
              "backoffAmount": 0,
              "backoffUnit": "seconds",
              "updateMode": true
            },
            "replyCallback": {
              "active": true,
              "url": "string"
            },
            "variants": [
              {
                "_id": "string",
                "uuid": "string",
                "name": "string",
                "_templateId": "string",
                "active": true,
                "shouldStopOnFail": true,
                "template": {},
                "filters": [
                  {
                    "isNegated": true,
                    "type": "BOOLEAN",
                    "value": "AND",
                    "children": [
                      {
                        "field": "string",
                        "value": "string",
                        "operator": "LARGER",
                        "on": "subscriber"
                      }
                    ]
                  }
                ],
                "_parentId": "string",
                "metadata": {
                  "amount": 0,
                  "unit": "seconds",
                  "digestKey": "string",
                  "type": "regular",
                  "backoff": true,
                  "backoffAmount": 0,
                  "backoffUnit": "seconds",
                  "updateMode": true
                },
                "replyCallback": {
                  "active": true,
                  "url": "string"
                }
              }
            ]
          }
        ],
        "_organizationId": "string",
        "_creatorId": "string",
        "_environmentId": "string",
        "triggers": [
          {
            "type": "event",
            "identifier": "string",
            "variables": [
              {
                "name": "string"
              }
            ],
            "subscriberVariables": [
              {
                "name": "string"
              }
            ]
          }
        ],
        "_notificationGroupId": "string",
        "_parentId": "string",
        "deleted": true,
        "deletedAt": "string",
        "deletedBy": "string",
        "notificationGroup": {
          "_id": "string",
          "name": "string",
          "_environmentId": "string",
          "_organizationId": "string",
          "_parentId": "string"
        },
        "data": {},
        "workflowIntegrationStatus": {}
      },
      "templateIdentifier": "string",
      "createdAt": "string",
      "deliveredAt": [
        "string"
      ],
      "lastSeenDate": "string",
      "lastReadDate": "string",
      "content": {
        "type": "button",
        "content": "string",
        "url": "string",
        "styles": {
          "textAlign": "center"
        }
      },
      "transactionId": "string",
      "subject": "string",
      "channel": "in_app",
      "read": true,
      "seen": true,
      "snoozedUntil": "string",
      "email": "string",
      "phone": "string",
      "directWebhookUrl": "string",
      "providerId": "string",
      "deviceTokens": [
        "string"
      ],
      "title": "string",
      "cta": {
        "type": "redirect",
        "data": {
          "url": "string"
        },
        "action": {
          "status": "pending",
          "buttons": [
            {
              "type": "primary",
              "content": "string",
              "resultContent": "string"
            }
          ],
          "result": {
            "payload": {},
            "type": "primary"
          }
        }
      },
      "_feedId": "string",
      "status": "sent",
      "errorId": "string",
      "errorText": "string",
      "payload": {},
      "overrides": {}
    }
  ],
  "pageSize": 0,
  "page": 0
}