AMPscript
Add
Attributes.Retrieve
Lists.Retrieve
Remove
Retrieve
Statistics
Unsubscribe
Update
Upsert
Validate Your Server-Side JavaScript using WSProxy
Adds a new subscriber to your list and returns a status
Add(1)
| Ordinal | Type | Description | |
|---|---|---|---|
| 1 | object | Required | JSON object representing the properties of the new subscriber |
This sample code adds a subscriber to the specified list:
1var newSubscriber = {
2 "EmailAddress": "test.008@example.com",
3 "SubscriberKey": "20100730001",
4 "EmailTypePreference": "Text",
5 "Attributes":{"First Name": "test.008", "Last Name": "test.008" },
6 "Lists": {"Status": "Active", "ID": 12345, "Action": "Create"}
7};
8
9var status = Subscriber.Add(newSubscriber);