Add
Overview
Adds a new subscriber to your list and returns a statusSyntax
Add(1)
| 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);