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/{zem_dnd_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 gives full CRUD (Create, Read, Update and Delete) access to all suppression APIs.

UPDATE - This allows access to perform the UPDATE operation alone.

Steps to obtain the Agent key

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

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

    Agents >> API section >> Copy Agent alias

Path parameters

ParameterValueDescription
zem_dnd_typeEmail/Domain

Defines the type of suppression data to be edited — whether email or domain.

 

For example, to edit an email address, replace the parameter(zem_dnd_type) with "email" in the request URL

Request Body

  • action* String
    • To be specified when more than one suppression entry is added.
    • Values can be — reject, suppress or suppress_tracking. More information on the suppression list actions is available here.
  • mailagent_keys Array
    • The Agent alias value. Can be obtained using the steps mentioned here. 
  • description String
    • Reason for the suppression.
  • values* Array
    • The new email address or domain. 

Note:

* - Mandatory parameter

 

Failure response code

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

 

Sample request

Copiedcurl "https://api.zeptomail.com/v1.1/suppressions/{email}"
-X PUT
-H "Authorization : Zoho-oauthtoken ***"\
-H "Content-Type : application/json" \
{
    "suppression_type":"email",
    "action":"reject",
    "values":["rebecca@zilker.com"],
    "description":"Modifying the suppression action"
    "mailagent_keys":["4e29626b34b4a653"]
}

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"
}