API Reference
- API Overview
- API Rate Limiting
- Events
- Subscribers
- GETGet subscribers
- POSTCreate subscriber
- POSTBulk create subscribers
- GETGet subscriber
- PUTUpdate subscriber
- DELDelete subscriber
- PUTUpdate subscriber credentials
- DELDelete subscriber credentials by providerId
- PATCHUpdate subscriber online status
- GETGet subscriber preferences
- GETGet subscriber preferences by level
- PATCHUpdate subscriber preference
- PATCHUpdate subscriber global preferences
- GETGet in-app notifications feed of subscriber.
- GETGet unseen in-app notifications count
- POSTMarks a message as read/unread, seen/unseen.
- POSTMarks all messages as read/unread, seen/unseen.
- POSTMark message action as seen
- GETHandle providers oauth redirect
- GETHandle chat oauth
- GET
- Topics
- Notification
- Workflows
- Workflow overrides
- Workflow groups
- Integrations
- Layouts
- Environments
- Changes
- Execution details
- Feeds
- Tenants
- Organizations
- Messages
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
Copy
curl --location 'https://api.novu.co/v1/subscribers' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: ApiKey <NOVU_SECRET_KEY>' \
--data-raw '{
"firstName": "Pawan",
"lastName": "Jain",
"email": "pawan.jain@domain.com",
"phone": "+1234567890",
"avatar": "avatar-url",
"locale": "en-US",
"data": {
"isDeveloper": true,
"customKey": "customValue"
}
}'
Copy
{
"data": {
"_organizationId": "abcd12349876wxyz1234wxyz",
"_environmentId": "zyxw4321abcd1234lmno5678",
"firstName": "Alex",
"lastName": "Benjamin",
"phone": "123456789",
"subscriberId": "abcd1234",
"email": "alex@email.com",
"avatar": "string",
"locale": "en-US",
"channels": [],
"_id": "6516ed5a9d727fe8256028ed",
"deleted": false,
"createdAt": "2023-09-29T15:29:30.667Z",
"updatedAt": "2023-09-29T15:29:30.667Z",
"__v": 0,
"id": "6516ed5a9d727fe8256028ed"
}
}
Enter your API key in the Authorization
field like the example shown below:
E.g ApiKey 18d2e625f05d80e
Copy
curl --location 'https://api.novu.co/v1/subscribers' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: ApiKey <NOVU_SECRET_KEY>' \
--data-raw '{
"firstName": "Pawan",
"lastName": "Jain",
"email": "pawan.jain@domain.com",
"phone": "+1234567890",
"avatar": "avatar-url",
"locale": "en-US",
"data": {
"isDeveloper": true,
"customKey": "customValue"
}
}'
Copy
{
"data": {
"_organizationId": "abcd12349876wxyz1234wxyz",
"_environmentId": "zyxw4321abcd1234lmno5678",
"firstName": "Alex",
"lastName": "Benjamin",
"phone": "123456789",
"subscriberId": "abcd1234",
"email": "alex@email.com",
"avatar": "string",
"locale": "en-US",
"channels": [],
"_id": "6516ed5a9d727fe8256028ed",
"deleted": false,
"createdAt": "2023-09-29T15:29:30.667Z",
"updatedAt": "2023-09-29T15:29:30.667Z",
"__v": 0,
"id": "6516ed5a9d727fe8256028ed"
}
}
Authorizations
API key authentication. Allowed headers-- "Authorization: ApiKey <api_key>".
Body
application/json
Response
201
application/json
Created
The response is of type object
.
Was this page helpful?
Copy
curl --location 'https://api.novu.co/v1/subscribers' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: ApiKey <NOVU_SECRET_KEY>' \
--data-raw '{
"firstName": "Pawan",
"lastName": "Jain",
"email": "pawan.jain@domain.com",
"phone": "+1234567890",
"avatar": "avatar-url",
"locale": "en-US",
"data": {
"isDeveloper": true,
"customKey": "customValue"
}
}'
Copy
{
"data": {
"_organizationId": "abcd12349876wxyz1234wxyz",
"_environmentId": "zyxw4321abcd1234lmno5678",
"firstName": "Alex",
"lastName": "Benjamin",
"phone": "123456789",
"subscriberId": "abcd1234",
"email": "alex@email.com",
"avatar": "string",
"locale": "en-US",
"channels": [],
"_id": "6516ed5a9d727fe8256028ed",
"deleted": false,
"createdAt": "2023-09-29T15:29:30.667Z",
"updatedAt": "2023-09-29T15:29:30.667Z",
"__v": 0,
"id": "6516ed5a9d727fe8256028ed"
}
}
Assistant
Responses are generated using AI and may contain mistakes.