Subscribers
Get subscriber preferences
API Reference
Notifications
Integrations
Subscribers
- GETGet subscribers
- POSTBulk create subscribers
- PUTUpdate subscriber credentials
- PATCHModify subscriber credentials
- DELDelete subscriber credentials by providerId
- PATCHUpdate subscriber online status
- GETGet in-app notification feed for a particular subscriber
- GETGet the unseen in-app notifications count for subscribers feed
- POSTMark a subscriber messages as seen, read, unseen or unread
- 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
- GETSearch for subscribers
- POSTCreate subscriber
- GETGet subscriber
- DELDelete subscriber
- PATCHPatch subscriber
- GETGet subscriber preferences
- PATCHUpdate subscriber global or workflow specific preferences
Subscribers
Get subscriber preferences
Get subscriber global and workflow specific preferences
GET
/
v2
/
subscribers
/
{subscriberId}
/
preferences
import { Novu } from "@novu/api";
const novu = new Novu({
secretKey: "YOUR_SECRET_KEY_HERE",
});
async function run() {
const result = await novu.subscribers.preferences.list("<id>");
// Handle the result
console.log(result);
}
run();
{
"global": {
"enabled": true,
"channels": {
"email": true,
"sms": true,
"in_app": true,
"chat": true,
"push": true
}
},
"workflows": [
{
"enabled": true,
"channels": {
"email": true,
"sms": true,
"in_app": true,
"chat": true,
"push": true
},
"overrides": [
{
"channel": "in_app",
"source": "subscriber"
}
],
"workflow": {
"slug": "<string>",
"identifier": "<string>",
"name": "<string>"
}
}
]
}
Authorizations
API key authentication. Allowed headers-- "Authorization: ApiKey <api_key>".
Headers
A header for idempotency purposes
Path Parameters
Response
200
application/json
OK
Global preference settings
Workflow-specific preference settings
Whether notifications are enabled for this workflow
import { Novu } from "@novu/api";
const novu = new Novu({
secretKey: "YOUR_SECRET_KEY_HERE",
});
async function run() {
const result = await novu.subscribers.preferences.list("<id>");
// Handle the result
console.log(result);
}
run();
{
"global": {
"enabled": true,
"channels": {
"email": true,
"sms": true,
"in_app": true,
"chat": true,
"push": true
}
},
"workflows": [
{
"enabled": true,
"channels": {
"email": true,
"sms": true,
"in_app": true,
"chat": true,
"push": true
},
"overrides": [
{
"channel": "in_app",
"source": "subscriber"
}
],
"workflow": {
"slug": "<string>",
"identifier": "<string>",
"name": "<string>"
}
}
]
}