Create a subscriber
Create a subscriber with the subscriber attributes. subscriberId is a required field, rest other fields are optional, if the subscriber already exists, it will be updated
Authorization
Authorization<token>API key authentication. Allowed headers-- "Authorization: ApiKey <api_key>".
In: header
Request Body
application/jsonRequiredsubscriberIdRequiredstringUnique identifier of the subscriber
firstNamestringFirst name of the subscriber
lastNamestringLast name of the subscriber
emailstringEmail address of the subscriber
phonestringPhone number of the subscriber
avatarstringAvatar URL or identifier
timezonestringTimezone of the subscriber
localestringLocale of the subscriber
dataobjectAdditional custom data for the subscriber
Query Parameters
failIfExistsbooleanIf true, the request will fail if a subscriber with the same subscriberId already exists
Header Parameters
idempotency-keystringA header for idempotency purposes
Response Body
Created
_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.
firstNamestring | nullThe first name of the subscriber.
lastNamestring | nullThe last name of the subscriber.
emailstring | nullThe email address of the subscriber.
phonestring | nullThe phone number of the subscriber.
avatarstring | nullThe URL of the subscriber's avatar image.
localestring | nullThe locale setting of the subscriber, indicating their preferred language or region.
channelsarray<object>An array of channel settings associated with the subscriber.
@minItems 0
topicsDeprecatedarray<string>An array of topics that the subscriber is subscribed to.
@minItems 0
isOnlineboolean | nullIndicates whether the subscriber is currently online.
lastOnlineAtstring | nullThe timestamp indicating when the subscriber was last online, in ISO 8601 format.
__vnumberThe version of the subscriber document.
dataobject | nullAdditional custom data for the subscriber
timezonestring | nullTimezone of the subscriber
subscriberIdRequiredstringThe identifier used to create this subscriber, which typically corresponds to the user ID in your system.
_organizationIdRequiredstringThe unique identifier of the organization to which the subscriber belongs.
_environmentIdRequiredstringThe unique identifier of the environment associated with this subscriber.
deletedRequiredbooleanIndicates whether the subscriber has been deleted.
createdAtRequiredstringThe timestamp indicating when the subscriber was created, in ISO 8601 format.
updatedAtRequiredstringThe timestamp indicating when the subscriber was last updated, in ISO 8601 format.