Subscribers
Create subscriber
Creates a subscriber entity, in the Novu platform. The subscriber will be later used to receive notifications, and access notification feeds. Communication credentials such as email, phone number, and 3 rd party credentials i.e slack tokens could be later associated to this entity.
POST
/v1/subscribers
Authorization*
Please ensure there is a space between ApiKey
and your Api key.
E.g ApiKey 18d2e625f05d80e
import { Novu } from '@novu/node';
const novu = new Novu("<NOVU_API_KEY>");
await novu.subscribers.identify("subscriberId",{
firstName: "Pawan";
lastName: "Jain";
email: "pawan.jain@domain.com";
phone: "+1234567890";
avatar: "https://gravatar.com/avatar/553b157d82ac2880237566d5a644e5fe?s=400&d=robohash&r=x";
locale: "en-US";
data: {
isDeveloper : true
customKey: "customValue"
};
});
{
data: data
}
Body
application/json
avatar
string
An http url to the profile image of your subscriber
data
object
email
string
firstName
string
lastName
string
locale
string
phone
string
subscriberIdrequired
string
The internal identifier you used to create this subscriber, usually correlates to the id the user in your systems
Response
201 - application/json
data
object
import { Novu } from '@novu/node';
const novu = new Novu("<NOVU_API_KEY>");
await novu.subscribers.identify("subscriberId",{
firstName: "Pawan";
lastName: "Jain";
email: "pawan.jain@domain.com";
phone: "+1234567890";
avatar: "https://gravatar.com/avatar/553b157d82ac2880237566d5a644e5fe?s=400&d=robohash&r=x";
locale: "en-US";
data: {
isDeveloper : true
customKey: "customValue"
};
});
{
data: data
}