3

I need to delete a Subscriber from a Suppression List using the API.

I have followed this documented example to delete a Subscriber from a Suppression List, but it does not work (and there's nothing more frustrating than following Salesforce documentation only to discover it is wrong).

Here are two methods that delete a Subscriber from a Standard List (both using the Delete SOAP action).

Option 1

<soap:Body>
    <DeleteRequest xmlns="http://exacttarget.com/wsdl/partnerAPI">
        <Objects xsi:type="Subscriber">
                <SubscriberKey>S1234</SubscriberKey>
                <EmailAddress>sam@sample.com</EmailAddress>  
            <Lists>
                <ID>123</ID>
                <Action>delete</Action>
            </Lists>
        </Objects>
    </DeleteRequest>
</soap:Body>

Option 2

<soap:Body>
   <DeleteRequest xmlns="http://exacttarget.com/wsdl/partnerAPI">
        <Options>
            <SaveOptions>
                <SaveOption>
                    <PropertyName>*</PropertyName>
                    <SaveAction>Delete</SaveAction>
                </SaveOption>
            </SaveOptions>
        </Options>
        <Objects xsi:type="Subscriber">
            <ObjectID xsi:nil="true">
            </ObjectID>
            <SubscriberKey>S1234</SubscriberKey>
            <EmailAddress>sam@sample.com</EmailAddress>
            <Lists>
                <ID>123</ID>
                <ObjectID xsi:nil="true">
                </ObjectID>
            </Lists>
        </Objects>
    </DeleteRequest>
</soap:Body>

Both of these work, and return the response:

<DeleteResponse xmlns="http://exacttarget.com/wsdl/partnerAPI">
    <Results>
        <StatusCode>OK</StatusCode>
        <StatusMessage>Subscriber deleted</StatusMessage>
        <OrdinalID>0</OrdinalID>
    </Results>
    <RequestID>40a0244a-2698-4e8f-97f5-432a913d169f</RequestID>
    <OverallStatus>OK</OverallStatus>
</DeleteResponse>

That's fine. However if I try to use either of these methods to delete a subscriber from a suppression list (e.g. change the List Id to match the suppression list), then I get the same Subscriber deleted response, but they are not removed from the list.

I can add Subscribers to a Suppression List using the SOAP API, but I can't delete them.

I know there are other options to suppressing subscribers from receiving an email, but I really need to use Suppression Lists for a number of different reasons.

Does anyone know if this is possible using the API?

4

The first payload is really close to correct but needs to use Update instead of Delete.

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
   <soap:Header>
      <wsse:Security soap:mustUnderstand="1">
         <wsse:UsernameToken wsu:Id="SecurityToken-0c530ced-95e8-4700-94f6-daba49999931">
            <wsse:Username>ccc</wsse:Username>
            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">ccc</wsse:Password>
         </wsse:UsernameToken>
      </wsse:Security>
   </soap:Header>
   <soap:Body>
      <UpdateRequest xmlns="http://exacttarget.com/wsdl/partnerAPI">
         <Objects xsi:type="Subscriber">
            <EmailAddress>example@example.com</EmailAddress>
            <SubscriberKey>example@example.com</SubscriberKey>
            <Lists>
               <PartnerKey xsi:nil="true"/>
               <ID>1730822</ID>
               <Action>delete</Action>
            </Lists>
         </Objects>
      </UpdateRequest>
   </soap:Body>
</soap:Envelope>
  • 2
    Thanks, you're right, this works! I would have assumed that the official documentation for removing a Subscriber from a Suppression List would be correct :-/ – Eliot Harper Sep 12 '18 at 18:36
  • 2
    Thanks for pointing that out, it should be fixed soon. – Mac Sep 14 '18 at 14:23
  • @EliotHarper is there a way to retrieve a subscriber from suppression list using API ampscript? – Abhishek Jan 16 at 5:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.