PUT
/
v1
/
subscribers
/
{subscriberId}
import co.novu.common.base.Novu;
import co.novu.api.subscribers.responses.SingleSubscriberResponse;
import co.novu.api.subscribers.requests.UpdateSubscriberRequest;

public class Main {
public static void main(String[] args) {
String apiKey = "<NOVU_SECRET_KEY>";
Novu novu = new Novu(apiKey);
String subscriberId = "<SUBSCRIBER_ID>";

        UpdateSubscriberRequest updateSubscriberRequest = new UpdateSubscriberRequest();
        updateSubscriberRequest.setEmail("<EMAIL_ADDRESS>");
        updateSubscriberRequest.setFirstName("<FIRST_NAME>");
        updateSubscriberRequest.setLastName("<LAST_NAME>");
        updateSubscriberRequest.setPhone("<PHONE_NUMBER>");


        SingleSubscriberResponse response = novu.updateSubscriber(updateSubscriberRequest, subscriberId);
    }

}

{
  "data": {
    "__v": "number",
    "_environmentId": "string",
    "_id": "string",
    "_organizationId": "string",
    "avatar": "string",
    "channels": [
      {
        "_integrationId": "string",
        "credentials": {
          "channel": "string",
          "deviceTokens": [
            "string"
          ],
          "webhookUrl": "string"
        },
        "integrationIdentifier": "string",
        "providerId": "slack"
      }
    ],
    "createdAt": "string",
    "deleted": "boolean",
    "email": "string",
    "firstName": "string",
    "isOnline": "boolean",
    "lastName": "string",
    "lastOnlineAt": "string",
    "locale": "string",
    "phone": "string",
    "subscriberId": "string",
    "updatedAt": "string"
  }
}

Enter your API key in the Authorization field like the example shown below:

E.g ApiKey 18d2e625f05d80e

import co.novu.common.base.Novu;
import co.novu.api.subscribers.responses.SingleSubscriberResponse;
import co.novu.api.subscribers.requests.UpdateSubscriberRequest;

public class Main {
public static void main(String[] args) {
String apiKey = "<NOVU_SECRET_KEY>";
Novu novu = new Novu(apiKey);
String subscriberId = "<SUBSCRIBER_ID>";

        UpdateSubscriberRequest updateSubscriberRequest = new UpdateSubscriberRequest();
        updateSubscriberRequest.setEmail("<EMAIL_ADDRESS>");
        updateSubscriberRequest.setFirstName("<FIRST_NAME>");
        updateSubscriberRequest.setLastName("<LAST_NAME>");
        updateSubscriberRequest.setPhone("<PHONE_NUMBER>");


        SingleSubscriberResponse response = novu.updateSubscriber(updateSubscriberRequest, subscriberId);
    }

}

{
  "data": {
    "__v": "number",
    "_environmentId": "string",
    "_id": "string",
    "_organizationId": "string",
    "avatar": "string",
    "channels": [
      {
        "_integrationId": "string",
        "credentials": {
          "channel": "string",
          "deviceTokens": [
            "string"
          ],
          "webhookUrl": "string"
        },
        "integrationIdentifier": "string",
        "providerId": "slack"
      }
    ],
    "createdAt": "string",
    "deleted": "boolean",
    "email": "string",
    "firstName": "string",
    "isOnline": "boolean",
    "lastName": "string",
    "lastOnlineAt": "string",
    "locale": "string",
    "phone": "string",
    "subscriberId": "string",
    "updatedAt": "string"
  }
}

Authorizations

Authorization
string
headerrequired

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

Path Parameters

subscriberId
string
required

Body

application/json
email
string
firstName
string
lastName
string
phone
string
avatar
string
locale
string
data
object
channels
string[]

Response

200 - application/json
data
object