Subscribers

What is a Subscriber?

A subscriber is an entity to which notifications are sent. It is a Novu term similar to a user in your system. As in your system, a user is identified by a unique id, similarly in Novu, a subscriber is identified by a unique id called subscriberId. We recommend that the existing value you use in your system as a userId to be used as subscriberId in Novu. Read more about subscribers on subscribers documentation page.

Is it necessary to use subscriberId as same as userId?

No, it is not necessary to use subscriberId as same as userId. You can use any unique id as subscriberId. We recommend using userId as subscriberId to avoid any confusion. Some of our customers use a pattern like auth0|userId as a value for subscriberId.

Can notification be sent without adding a Subscriber?

No, a notification cannot be sent without adding a subscriber. A subscriber is an entity to which notifications are sent. You need to add a subscriber to Novu before triggering the workflow or inline of trigger. Read more about subscribers on subscribers documentation page.

What is the right approach to add Subscribers?

Subscribers can be added either ahead of trigger or inline of trigger. One way to add a subscriber using inline of trigger is to create a new subscriber in Novu as soon as they sign up or register in your system.

You can add your existing users as subscribers in Novu using bulk create subscriber creation method.

Can Subscriber credentials be added while creating a new Subscriber?

Subscriber credentials for Push and Chat channel providers cannot be added while creating a new subscriber. Subscriber credentials for Push and Chat channel providers can be added using the update subscriber credentials api or corresponding sdk methods.

SMS and Email channels are a bit different because all providers can work with the same value, so email and phone attributes can be added while creating a new Subscriber.

Can Subscriber preferences be updated while adding a new Subscriber?

Subscriber preference cannot be updated while adding a new subscriber. Novu sets all channels as true by default for new subscribers. You can modify preferences at any time. Read more about subscriber preferences.

Can two subscribers with different subscriberIds have the same email address?

Yes, it is possible for two subscribers to have the same email address in our system. This is because the subscriberId is the unique identifier that distinguishes one subscriber from another. Even if two subscribers share the same email address, they will have different subscriberIds, which allows our system to identify and manage them separately.

Topics

Can a Subscriber be added to multiple topics at once?

Currently, Novu supports adding a subscriber to only one topic at a time. You can add a subscriber to multiple topics by calling the add subscriber to topic api multiple times with a particular topic key

Was this page helpful?