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
{
"emails": [
"john@example.com"
],
"id": 1,
"token": "abcdefghijklmnqrstuvwxyz"
}
<xml>
<emails>john@example.com</emails>
<emails>kate@example.com</emails>
<id>1</id>
<token>abcdefghijklmnqrstuvwxyz</token>
</xml>
Response example
- JSON
- XML
{
"error": 0,
"error_text": "Successful operation",
"total_count": 1,
"total_duplicated": 0,
"total_imported": 1,
"total_updated": 0
}
<result>
<error>0</error>
<error_text>Successful operation</error_text>
<total_count>1</total_count>
<total_duplicated>0</total_duplicated>
<total_imported>1</total_imported>
<total_updated>0</total_updated>
</result>
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) |