Back to Novu

Subscriber schema

docs/api-reference/subscribers/subscriber-schema.mdx

3.19.04.4 KB
Original Source

Subscriber

Subscriber is the end user that receives notifications. Subscriber has subscriber attributes like firstName, lastName, email, phone, etc, data field to store any custom attributes in key value pairs and channel credentials for push and chat channel provider's integrations. Read more about subscribers on subscribers concept page.

FieldTypeDescription
idstringThe internal ID generated by Novu for your subscriber. This ID does not match the subscriberId used in your queries. Refer to subscriberId for that identifier.
firstNamestringThe first name of the subscriber.
lastNamestringThe last name of the subscriber.
emailstringThe email address of the subscriber.
phonestringThe phone number of the subscriber.
avatarstringThe URL of the subscriber's avatar image.
localestringThe locale setting of the subscriber, indicating their preferred language or region.
channelsChannelSettingsDto[]An array of channel settings associated with the subscriber.
topicsstring[]An array of topics that the subscriber is subscribed to.
isOnlinebooleanIndicates whether the subscriber is currently online.
lastOnlineAtstringThe timestamp indicating when the subscriber was last online, in ISO 8601 format.
vnumberThe version of the subscriber document.
dataRecord<string, unknown>Additional custom data for the subscriber
timezonestringTimezone of the subscriber
subscriberIdstringThe identifier used to create this subscriber, which typically corresponds to the user ID in your system.
organizationIdstringThe unique identifier of the organization to which the subscriber belongs.
environmentIdstringThe unique identifier of the environment associated with this subscriber.
deletedbooleanIndicates whether the subscriber has been deleted.
createdAtstringThe timestamp indicating when the subscriber was created, in ISO 8601 format.
updatedAtstringThe timestamp indicating when the subscriber was last updated, in ISO 8601 format.

ChannelSettingsDto

ChannelSettings are credentials for push and chat channel provider's integrations. One subscriber can have credentials for multiple integrations of same provider of one channel type

FieldTypeDescription
providerIdChatOrPushProviderEnumThe provider identifier for the credentials
integrationIdentifierstringThe integration identifier
credentialsChannelCredentialsCredentials payload for the specified provider
integrationIdstringThe unique identifier of the integration associated with this channel.

Credentials

Credentials like deviceTokens, webhookUrl, etc for a specific integration. providerId could be chat channel providerId or push channel providerId.

FieldTypeDescription
apiKeystring
userstring
secretKeystring
domainstring
passwordstring
hoststring
portstring
secureboolean
regionstring
accountSidstring
messageProfileIdstring
tokenstring
fromstring
senderNamestring
projectNamestring
applicationIdstring
clientIdstring
requireTlsboolean
ignoreTlsboolean
tlsOptionsTlsOptions
baseUrlstring
webhookUrlstring
redirectUrlstring
hmacboolean
serviceAccountstring
ipPoolNamestring
apiKeyRequestHeaderstring
secretKeyRequestHeaderstring
idPathstring
datePathstring
apiTokenstring
authenticateByTokenboolean
authenticationTokenKeystring
instanceIdstring
alertUidstring
titlestring
imageUrlstring
statestring
externalLinkstring
channelIdstring
phoneNumberIdentificationstring
accessKeystring
appSidstring
senderIdstring
tenantIdstring
appIOBaseUrlstring