Add

Overview

Adds a new subscriber to your list and returns a status

Syntax

Add(1)

Function Properties

Ordinal Type Description
1 object Required JSON object representing the properties of the new subscriber

Example

This sample code adds a subscriber to the specified list:

var newSubscriber = {
    "EmailAddress": "test.008@example.com",
    "SubscriberKey": "20100730001",
    "EmailTypePreference": "Text",
    "Attributes":{"First Name": "test.008", "Last Name": "test.008" },
    "Lists": {"Status": "Active", "ID": 12345, "Action": "Create"}
};

var status = Subscriber.Add(newSubscriber);
Last Updated: Jun 8, 2021