How do we delete subscribers (emails) from Auto suppression list using SSJS. Also, Auto suppression list maintain at SF end or application level.


Delete All Records

The following script uses WSProxy to delete all records from an auto-suppression list.

Replace AutoSuppressionExternalKey with the external key of your Auto Suppression List.

<script type="javascript" runat="server">
Platform.Load("core", "1");

var prox = new Script.Util.WSProxy();
var res;
var autoSupListDE = 'AutoSuppressionExternalKey'

function clearAutoSuppressionList(){
    var action = 'ClearData';
    var options = {};
    var props = {
    var res = prox.performItem("DataExtension",props,action,options);

function main(){


Delete Single Record

Piyush asked how to delete a specific record from an auto suppression list. As auto-suppression lists are effectively Data Extensions, the following SSJS platform function will remove an individual record (based on their email address) from an auto-suppression list:

<script runat="server">
   var deleteRow = Platform.Function.DeleteData('AutoSuppressionExternalKey',['Email Address'],['sam@sample.com']);

Delete Multiple Records

Piyush also ask how to iterate through a Data Extension containing email addresses for deletion, then remove them from the auto suppression list.

The following script will achieve this, where toDelete is the External Key of the DE containing Email Addresses to delete (which includes a field named 'Email' with the email addresses for deletion), and AutoSuppressionExternalKey is the external key of the auto suppression list.

<script runat="server">


     var deleteEmails = DataExtension.Init("toDelete");
     var data = deleteEmails.Rows.Retrieve();

     for (var i=0; i < data.length; i++) {

       var email = data[i].Email;

       var deleteRow = Platform.Function.DeleteData('AutoSuppressionExternalKey',['Email Address'],[email]);


  • Thank you very much Eliot. Also, what if I want to delete specific one from list ? – Piyush Rastogi Oct 19 '18 at 6:26
  • I have updated my answer to provide this option too. – Eliot Harper Oct 21 '18 at 20:31
  • Thanks Eliot for your kind response. One last ask. What if we want the script to loop through the DE and remove every email address in the DE from the identified list. Means remove from Auto Suppression DE by comparing any list or DE. Thanks in advance. – Piyush Rastogi Oct 23 '18 at 5:11

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.