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.
- Navigate to the SMTP/API tab. Go to the API section.
- Copy the Mail Agent alias from this section.
Mail Agents >> SMTP/API >> Copy the Mail Agent alias
Path parameters
Parameter | Type | Description |
type | Email address or Domain | The domain or email address that should be suppressed. |
Request body
Parameter | Type | Description |
action* | String | Type of suppression to be performed—reject, suppress or suppress_tracking. |
mailagent_keys | Array | The Mail Agent alias value. |
description | String | Reason for the suppression. |
values* | Array | JSON array of the email address or domain, whichever is applicable. |
*-Mandatory parameter
Failure response code
Value | Error | Solution |
DND_102 | Suppression data not found | Ensure 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"
}