Edit suppression list

Purpose

This API allows you to edit the email addresses in the suppression list.

Request URL

Method : PUT

https://api.zeptomail.com/v1.1/suppressions/{type}

OAuth scope

The steps to generate and use OAuth token can be found here.

scope=Zeptomail.Suppressions.All

or

scope=Zeptomail.Suppressions.UPDATE

ALL - This will give the basic CRUD access too all the suppression APIs.

Steps to generate the Mail Agent key

Select the Mail Agent that you want to connect to your application.

  1. Navigate to the SMTP/API tab. Go to the API section.
  2. Copy the Mail Agent alias from this section. 

    Mail Agents >> SMTP/API >> Copy the Mail Agent alias

Path parameters

ParameterTypeDescription
typeEmail address or DomainThe domain or email address that should be suppressed.

Request body

ParameterTypeDescription
action*StringType of suppression to be performed—reject, suppress or suppress_tracking.
mailagent_keysArrayThe Mail Agent alias value.
descriptionStringReason for the suppression.
values*ArrayJSON array of the email address or domain, whichever is applicable.

*-Mandatory parameter

Failure response code

ValueErrorSolution
DND_102Suppression data not foundEnsure you have entered the correct value before proceeding.

 

Sample request

Copied{
    "suppression_type":"email",
    "action":"reject",
    "values":["rebecca@zilker.com"],
    "description":"Modifying the suppression action"
}

Sample response

Copied {
    "data": {
        "modified_time": "03 Jan 2025 10:33 PM",
        "suppression_type": "email",
        "values": [
            "rebecca@zilker.com"
        ],
        "action": "reject",
        "description": "testing",
        "category": "manual"
    },
    "status": "success"
}

Failure response

Copied{
    "error": {
        "code": "DND_102",
        "field": "values",
        "message": "Suppression data not found",
        "value": "[rebecca@zilker.com]"
    },
    "status": "failure"
}