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_API_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

Path Parameters

subscriberId
string
required

Body

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

Response

200 - application/json
data
object