Addition to the Black List
API URL
URL used to send HTTP requests:
https://portal.bulkgate.com/api/1.0/black-list/add
POST /api/1.0/black-list/add HTTP/1.1
Host: portal.bulkgate.com
Content-Type: application/json
Cache-Control: no-cache
Parameters table
PARAMETER NAME | VALUE | MANDATORY | DEFAULT VALUE |
---|---|---|---|
application_id | Application ID | Yes | - |
application_token | Application token | Yes | - |
numbers | Array of numbers to blacklist | Yes | - |
wallet | Wallet on which to blacklist numbers | No | Default wallet |
source_id | Identificator of group in blacklisted numbers | No | - |
Example of full request:
POST /api/1.0/black-list/add HTTP/1.1
Host: portal.bulkgate.com
Content-Type: application/json
Cache-Control: no-cache
{
"application_id": "APPLICATION_ID",
"application_token": "APPLICATION_TOKEN",
"numbers": ["420123456789", "420987654321"],
"wallet": "WALLET",
"source_id": "api-my-import"
}
Response to this command may be:
In case of success:
{
"data": {
"message": "contacts have been blacklisted"
}
}
In case of error:
{
"type": "invalid_wallet",
"code": 400,
"error": "Invalid wallet",
"detail": null
}
{
"type": "no_valid_numbers",
"code": 400,
"error": "No valid numbers",
"detail": null
}
{
"type": "number_already_exists",
"code": 400,
"error": "Number already exists",
"detail": null
}
{
"type": "you_must_select_wallet",
"code": 400,
"error": "You must select wallet",
"detail": null
}