Add multiple domains to suppression list
Description
Adds one or multiple email domains to a specified suppression list.
Request URL
Method: POST
https://example.com/api/v1.1/suppresses/domains_add
Request parameters
| Parameter | Type | Example | Required | Description |
|---|---|---|---|---|
| token | string | "abcdefghijklmnqrstuvwxyz" | Yes | API token |
| domains | JSON array | ["example.com"] | Yes | Email domains list |
| format | string | "json" | No | Response data format. By default – json |
| id | int | 1 | Yes | Suppression list ID |
Request example
- JSON
- XML
{
"token": "abcdefghijklmnqrstuvwxyz",
"domains": [
"example.com",
"example1.com"
],
"id": 3
}
<xml>
<token>abcdefghijklmnqrstuvwxyz</token>
<domains>example1.com</domains>
<domains>example2.com</domains>
<domains>example3.com</domains>
<id>3</id>
</xml>
Response example
- JSON
- XML
{
"error": 0,
"error_text": "Successful operation",
"total_count": 3,
"total_duplicated": 0,
"total_imported": 3,
"total_invalid": 0
}
<xml>
<error>0</error>
<error_text>Successful operation</error_text>
<total_count>3</total_count>
<total_duplicated>0</total_duplicated>
<total_imported>3</total_imported>
<total_invalid>0</total_invalid>
</xml>
Response parameters
| Parameter | Type | Description |
|---|---|---|
| error | int | Error code |
| error_text | string | Error text |
| total_count | int | Total number of domains |
| total_duplicated | int | Domains previously added to the stop list |
| total_imported | int | Domains added |
| total_updated | int | Domains updated (if matched) |