Manage Subscribers On Lists

Why Manage Subscribers on Lists

You can add and remove subscribers from lists as part of importing subscribers. You can also manage subscribers and lists as part of creating Subscription Centers. The SubscriberList object, when acted upon as the child of a Subscriber object, enables the before mentioned use cases.

How To Manage Subscribers on Lists

The information and sample code below presents the necessary information to manage subscribers on lists. Use the examples as models to construct your own API calls.

SubscriberList

The SubscriberList object represents the union between subscribers and lists.

SubscriberList Actions

  • Create: creates an existing subscriber on a list
  • Update: updates an existing subscriber on a list (for status purposes primarily)
  • Delete: deletes an existing subscriber from a list
  • Upsert: Creates the subscriber on the list if they don't exist or updates them if they already exist on the list.

Identifiers

When using the SubscriberList object on Create and Update methods, the ID property represents the ID of the list. On the Retrieve method, the ID property represents the ID of the Subscriber (with the List.ID representing the List ID). Retrieve also supports Subscriber.SubscriberKey as an identifer.

Sample Code

Adding an Existing Subscriber to a List

This example assumes the subscriber exists in the account but not on the list.

Sample .NET Code

Sample Java (Axis2) Code

PHP

Sample SOAP Envelope

Unsubscribe an Existing Subscriber from a List

This example assumes the subscriber exists on the list already.

Sample .NET Code

Sample Java Code (Axis2)

The code below unsubscribes the subscriber from all lists the subscriber is on. Specify a ListID in the code to remove the subscriber from a specific list.

PHP

Sample SOAP Envelope

Subscription Center