Create suppression list
Purpose
This API adds email addresses to the suppression list to prevent further email sending to them.
Request URL
Method : POST
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.CREATE
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 >> API section >> Copy the Mail Agent alias
Path parameters
| Parameter | Type | Description |
| type | Email address or Domain | The domain or email address that should be suppressed. |
Note:
* - Mandatory parameter
Failure response code
| Value | Error | Solution |
| DND_101 | Suppression data already exists | Cross-verify if the domain or email address is present in the suppression list before adding it. |
Sample request
Copied{
"suppression_type":"email",
"action":"suppress",
"values":["rebecca@zilker.com"],
"description":"Suppress the email address",
"mailagent_keys":["4e29626b34b4a653"]
}
Sample response
Copied{
"data": {
"modified_time": "03 Jan 2025 10:31 PM",
"suppression_type": "email",
"values": [
"rebecca@zilker.com"
],
"action": "suppress",
"description": "Suppress the email address",
"mailagent_keys": [
"4e29626b34b4a653"
],
"category": "manual"
},
"status": "success"
}Sample Failure response
Copied{
"error": {
"code": "DND_101",
"field": "values",
"message": "Suppression data already exist",
"value": "[rebecca@zilker.com]"
},
"status": "failure"
}