Get messages
API Reference
Subscribers
- GETGet subscribers
- POSTCreate subscriber
- POSTBulk create subscribers
- GETGet subscriber
- PUTUpdate subscriber
- DELDelete subscriber
- PUTUpdate subscriber credentials
- DELDelete subscriber credentials by providerId
- PATCHUpdate subscriber online status
- GETGet subscriber preferences
- GETGet subscriber global preferences
- PATCHUpdate subscriber preference
- PATCHUpdate subscriber global preferences
- GETGet in-app notification feed for a particular subscriber
- GETGet the unseen in-app notifications count for subscribers feed
- POSTMark a subscriber feed message as seen
- POSTMarks all the subscriber messages as read, unread, seen or unseen. Optionally you can pass feed id (or array) to mark messages of a particular feed.
- POSTMark message action as seen
- GETHandle providers oauth redirect
- GETHandle chat oauth
Topics
Notification
Workflows
Workflow Overrides
Workflow groups
Integrations
Layouts
Execution Details
Organizations
Get messages
Returns a list of messages, could paginate using the page
query parameter
GET
/
v1
/
messages
import { Novu, ChannelTypeEnum } from '@novu/node';
const novu = new Novu('<NOVU_API_KEY>');
const params = {
page: 0, // optional
limit: 20, // optional
subscriberId: "subscriberId" //optional
channel: ChannelTypeEnum.EMAIL //optional
transactionIds : ["txnId1","txnId2"] //optional
}
await novu.messages.list(params);
{
hasMore: true,
data: [data],
pageSize: 0,
page: 0
}
Enter your API key in the Authorization
field like the example shown below:
E.g ApiKey 18d2e625f05d80e
import { Novu, ChannelTypeEnum } from '@novu/node';
const novu = new Novu('<NOVU_API_KEY>');
const params = {
page: 0, // optional
limit: 20, // optional
subscriberId: "subscriberId" //optional
channel: ChannelTypeEnum.EMAIL //optional
transactionIds : ["txnId1","txnId2"] //optional
}
await novu.messages.list(params);
{
hasMore: true,
data: [data],
pageSize: 0,
page: 0
}
Authorizations
API key authentication. Allowed headers-- "Authorization: ApiKey <api_key>".
Query Parameters
Available options:
in_app
, email
, sms
, chat
, push
Response
200
application/json
Available options:
in_app
, email
, sms
, chat
, push
, digest
, trigger
, delay
, custom
Available options:
event
Available options:
Success
, Warning
, Failed
, Pending
, Queued
, ReadConfirmation
Available options:
Credentials
, Internal
, Payload
, Webhook
Available options:
BOOLEAN
, TEXT
, DATE
, NUMBER
, STATEMENT
, LIST
, MULTI_LIST
, GROUP
Available options:
AND
, OR
Was this page helpful?
import { Novu, ChannelTypeEnum } from '@novu/node';
const novu = new Novu('<NOVU_API_KEY>');
const params = {
page: 0, // optional
limit: 20, // optional
subscriberId: "subscriberId" //optional
channel: ChannelTypeEnum.EMAIL //optional
transactionIds : ["txnId1","txnId2"] //optional
}
await novu.messages.list(params);
{
hasMore: true,
data: [data],
pageSize: 0,
page: 0
}