POST
/
v1
/
subscribers
curl --location 'https://api.novu.co/v1/subscribers' \
  --header 'Content-Type: application/json' \
  --header 'Accept: application/json' \
  --header 'Authorization: ApiKey <NOVU_API_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"
      }
    }'
{
    "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

curl --location 'https://api.novu.co/v1/subscribers' \
  --header 'Content-Type: application/json' \
  --header 'Accept: application/json' \
  --header 'Authorization: ApiKey <NOVU_API_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"
      }
    }'
{
    "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

Authorization
string
header
required

API key authentication. Allowed headers-- "Authorization: ApiKey <api_key>".

Body

application/json
subscriberId
string
required

The internal identifier you used to create this subscriber, usually correlates to the id the user in your systems

email
string
firstName
string
lastName
string
phone
string
avatar
string

An http url to the profile image of your subscriber

locale
string
data
object
channels
object[]

Response

201
application/json
Created
subscriberId
string
required

The internal identifier you used to create this subscriber, usually correlates to the id the user in your systems

_organizationId
string
required
_environmentId
string
required
deleted
boolean
required
createdAt
string
required
updatedAt
string
required
_id
string

The internal id novu generated for your subscriber, this is not the subscriberId matching your query. See subscriberId for that

firstName
string
lastName
string
email
string
phone
string
avatar
string
locale
string
channels
object[]

Channels settings for subscriber

isOnline
boolean
lastOnlineAt
string
__v
number

Was this page helpful?