2

Is it possible to change a subscriber status to 'held' via the api? The use case would be legacy records being imported to ET that I know are undeliverable. Presently, just importing as unsubscribe status but would like to keep a more accurate description.

Thanks, Mark

1 Answer 1

1

You can update status of a subscriber with the API (Manage Subscibers on Lists).

Example:

    // something like this in C#

    // get your subscribers, add a filter to be selective
    var request = new RetrieveRequest1{ 
        RetrieveRequest = new RetrieveRequest{
            ObjectType = "Subscriber",
            Properties = new [] {"ID", "SubscriberKey", "Status", "EmailAddress"}
        }
    };

    var subscribers = new List<Subscriber>();
    var hasMore = true;
    while(hasMore){
        var response = client.Retrieve(request);
        list.AddRange(response.Results.Cast<Subscriber>());
        request.RetrieveRequest.ContinueRequest = response.RequestID;
        hasMore = response.OverallStatus == "MoreDataAvailable";
    }

    // set your desired status
    foreach(var subscriber in subscribers)
        subscriber.Status = SubscriberStatus.Held;

    // update
    // may want to break this up into batches if you have a large set of subscribers you are wanting to update
    client.Update(new UpdateRequest{
        Options = new UpdateOptions(),
        Objects = subscribers.ToArray()
    });
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .