Use these endpoints to manage blacklist and auto-blacklist entries.
Endpoint:
POST /private/blacklist/add
Parameter | Description | Required | Default |
---|---|---|---|
idapp |
App ID | ✅ Yes | – |
email |
Email to blacklist | ✅ Yes | – |
Code | Description |
---|---|
200 | Success |
400 | Missing or invalid parameter |
401 | Unauthorized user |
403 | Invalid credentials |
406 | Specific error (see below) |
500 | Internal server error |
Specific errors:
- App not found
{
"_id": "6474908d7ff70117d6a938dc",
"idapp": "647095de67e43f0f33a3a089",
"idsending": null,
"email": "[email protected]",
"ip": "xx.xx.xx.xx",
"created": "2023-05-29T11:46:21.685157634"
}
idsending
: ID of the email sending operation if the blacklist entry was created as a result of a send.ip
: IP address from which the blacklist was created.created
: Timestamp when the email was added to the blacklist.
Endpoint:
GET /private/blacklist/findByApp
Parameter | Description | Required | Default |
---|---|---|---|
idapp |
App ID | ✅ Yes | – |
page |
Page number | ✅ Yes | – |
size |
Page size | ✅ Yes | – |
Code | Description |
---|---|
200 | Success |
400 | Missing or invalid parameter |
401 | Unauthorized user |
403 | Invalid credentials |
500 | Internal server error |
{
"blacklisted": {
"content": [
{
"_id": "6474908d7ff70117d6a938dc",
"idapp": "647095de67e43f0f33a3a089",
"idsending": null,
"email": "[email protected]",
"ip": "xx.xx.xx.xx",
"created": "2023-05-29T11:46:21.685"
}
],
"pageable": {
"pageNumber": 0,
"pageSize": 10
},
"totalPages": 1,
"totalElements": 1,
"first": true,
"last": true,
"empty": false
},
"autoblacklisted": {
"content": [],
"pageable": {
"pageNumber": 0,
"pageSize": 10
},
"totalPages": 0,
"totalElements": 0,
"first": true,
"last": true,
"empty": true
}
}
Endpoint:
GET /private/blacklist/isBlackListed
Parameter | Description | Required | Default |
---|---|---|---|
idapp |
App ID | ✅ Yes | – |
email |
Email address to check | ✅ Yes | – |
Code | Description |
---|---|
200 | Success |
400 | Missing or invalid parameter |
401 | Unauthorized user |
403 | Invalid credentials |
500 | Internal server error |
Returns a plain text response: true
or false
Endpoint:
POST /private/blacklist/remove
Parameter | Description | Required | Default |
---|---|---|---|
idapp |
App ID | ✅ Yes | – |
email |
Email address to remove | ✅ Yes | – |
Code | Description |
---|---|
200 | Success |
400 | Missing or invalid parameter |
401 | Unauthorized user |
403 | Invalid credentials |
406 | Specific error (see below) |
500 | Internal server error |
Specific errors:
- Email not found
- Email was added by the recipient and cannot be removed
Returns an empty response on success.