import co.novu.common.base.Novu;
import co.novu.api.subscribers.responses.BulkSubscriberResponse;
public class Main {
public static void main(String[] args) {
String apiKey = "<NOVU_API_KEY>";
Novu novu = new Novu(apiKey);
Integer page = 0;
Integer limit = 10;
BulkSubscriberResponse response = novu.getSubscribers(page, limit);
}
}
{
"data": [
{
"__v": "number",
"_environmentId": "string",
"_id": "string",
"_organizationId": "string",
"avatar": "string",
"channels": [
{
"_integrationId": "string",
"credentials": {
"channel": "string",
"deviceTokens": [
"string"
],
"webhookUrl": "string"
},
"integrationIdentifier": "string",
"providerId": "slack"
}
],
"createdAt": "string",
"deleted": "boolean",
"email": "string",
"firstName": "string",
"isOnline": "boolean",
"lastName": "string",
"lastOnlineAt": "string",
"locale": "string",
"phone": "string",
"subscriberId": "string",
"updatedAt": "string"
}
],
"hasMore": "boolean",
"page": "number",
"pageSize": "number"
}
Returns a list of subscribers, could paginated using the page and limit query parameter
import co.novu.common.base.Novu;
import co.novu.api.subscribers.responses.BulkSubscriberResponse;
public class Main {
public static void main(String[] args) {
String apiKey = "<NOVU_API_KEY>";
Novu novu = new Novu(apiKey);
Integer page = 0;
Integer limit = 10;
BulkSubscriberResponse response = novu.getSubscribers(page, limit);
}
}
{
"data": [
{
"__v": "number",
"_environmentId": "string",
"_id": "string",
"_organizationId": "string",
"avatar": "string",
"channels": [
{
"_integrationId": "string",
"credentials": {
"channel": "string",
"deviceTokens": [
"string"
],
"webhookUrl": "string"
},
"integrationIdentifier": "string",
"providerId": "slack"
}
],
"createdAt": "string",
"deleted": "boolean",
"email": "string",
"firstName": "string",
"isOnline": "boolean",
"lastName": "string",
"lastOnlineAt": "string",
"locale": "string",
"phone": "string",
"subscriberId": "string",
"updatedAt": "string"
}
],
"hasMore": "boolean",
"page": "number",
"pageSize": "number"
}
Authorization field like the example shown below:E.g ApiKey 18d2e625f05d80eimport co.novu.common.base.Novu;
import co.novu.api.subscribers.responses.BulkSubscriberResponse;
public class Main {
public static void main(String[] args) {
String apiKey = "<NOVU_API_KEY>";
Novu novu = new Novu(apiKey);
Integer page = 0;
Integer limit = 10;
BulkSubscriberResponse response = novu.getSubscribers(page, limit);
}
}
{
"data": [
{
"__v": "number",
"_environmentId": "string",
"_id": "string",
"_organizationId": "string",
"avatar": "string",
"channels": [
{
"_integrationId": "string",
"credentials": {
"channel": "string",
"deviceTokens": [
"string"
],
"webhookUrl": "string"
},
"integrationIdentifier": "string",
"providerId": "slack"
}
],
"createdAt": "string",
"deleted": "boolean",
"email": "string",
"firstName": "string",
"isOnline": "boolean",
"lastName": "string",
"lastOnlineAt": "string",
"locale": "string",
"phone": "string",
"subscriberId": "string",
"updatedAt": "string"
}
],
"hasMore": "boolean",
"page": "number",
"pageSize": "number"
}
API key authentication. Allowed headers-- "Authorization: ApiKey <api_key>".
The current page of the paginated response
Does the list have more items to fetch
Number of items on each page
The list of items matching the query
Show child attributes
The internal identifier you used to create this subscriber, usually correlates to the id the user in your systems
The internal id novu generated for your subscriber, this is not the subscriberId matching your query. See subscriberId for that
Channels settings for subscriber
Show child attributes
The provider identifier for the credentials
slack, discord, msteams, mattermost, ryver, zulip, grafana-on-call, getstream, rocket-chat, whatsapp-business, fcm, apns, expo, one-signal, pushpad, push-webhook, pusher-beams Credentials payload for the specified provider
Show child attributes
Webhook url used by chat app integrations. The webhook should be obtained from the chat app provider.
Channel specification for Mattermost chat notifications
Contains an array of the subscriber device tokens for a given provider. Used on Push integrations
alert_uid for grafana on-call webhook payload
title to be used with grafana on call webhook
image_url property fo grafana on call webhook
state property fo grafana on call webhook
link_to_upstream_details property fo grafana on call webhook
Id of the integration that is used for this channel
The integration identifier
Was this page helpful?