Add multiple phones to suppression list
Description
Adds single or multiple phone numbers to a suppression list.
Request URL
Method: POST
https://example.com/api/v1.1/suppresses/phones_add
Request parameters
Parameter | Type | Example | Required | Description |
---|---|---|---|---|
token | string | "abcdefghijklmnqrstuvwxyz" | Yes | API token |
values | JSON array | [ | Yes | List of phone numbers |
format | string | "json" | No | Response data format. By default –json |
id | int | 1 | Yes | Suppression list ID |
Request example
- JSON
- XML
{
"token": "abcdefghijklmnqrstuvwxyz",
"id": 1,
"values": [
"+79009009001",
"+79009009002"
]
}
<xml>
<token>abcdefghijklmnqrstuvwxyz</token>
<id>1</id>
<values>+79009009001</values>
<values>+79009009002</values>
</xml>
Response example
- JSON
- XML
{
"error": 0,
"error_text": "Successful operation",
"total_count": 2,
"total_duplicated": 0,
"total_imported": 2,
"total_invalid": 0
}
<xml>
<error>0</error>
<error_text>Successful operation</error_text>
<total_count>2</total_count>
<total_duplicated>0</total_duplicated>
<total_imported>2</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 phone numbers |
total_duplicated | int | Phone numbers previously added to the stop list |
total_imported | int | Phone numbers added |
total_invalid | int | Number of invalid phone numbers |