Add multiple emails to suppression list
Description
Adds single or multiple email addresses to a suppression list.
Request URL
Method: POST
https://example.com/api/v1.1/suppresses/emails_add
Request parameters
Parameter | Type | Example | Required | Description |
---|---|---|---|---|
token | string | "abcdefghijklmnqrstuvwxyz" | Yes | API token |
emails | JSON array | ["john@example.com"] | Yes | Email addresses list |
format | string | "json" | No | Response data format. By default –json |
id | int | 1 | Yes | Suppression list ID |
Request example
- JSON
- XML
{
"token": "abcdefghijklmnqrstuvwxyz",
"emails": [
"example@example.com",
"example1@example.com",
"example2@example.com"
],
"id": 3
}
<xml>
<token>abcdefghijklmnqrstuvwxyz</token>
<emails>example@example.com</emails>
<emails>example1@example.com</emails>
<emails>example2@example.com</emails>
<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 emails |
total_duplicated | int | Emails previously added to the stop list |
total_imported | int | Emails added |
total_updated | int | Emails updated (if matched) |