Get whitelist & blacklist
Fetch all whitelist & blacklist rules for the specified domain
- HTTP Method:
GET
- URL:
https://example.domain.tld/api/v1/antispam/wlbl/domain/<domain>/
- Require authentication:
Yes
- Permission level required:
MasterAdmin
/ DomainAdmin
Path parameters
Parameter |
Type |
Description |
Required |
domain |
str |
Domain name |
Required |
Response parameters
Parameter |
Type |
Description |
blacklist_status |
str |
Status of blacklist |
blacklisted_sender_domains |
list |
List of blacklisted sender domains |
blacklisted_sender_emails |
list |
List of blacklisted sender emails |
blacklisted_sender_ips |
list |
List of blacklisted sender IPs/CIDRs |
whitelist_status |
str |
Status of whitelist |
whitelisted_sender_domains |
list |
List of whitelisted sender domains |
whitelisted_sender_emails |
list |
List of whitelisted sender emails |
whitelisted_sender_ips |
list |
List of whitelisted sender IPs/CIDRs |
Example request (Python)
import requests
import json
from pprint import pprint
url = "https://example.domain.tld/api/v1/antispam/wlbl/domain/vonmail.com/"
r = requests.get(url, auth=("admin","long-auth_token-here"))
try:
pprint(r.json())
except:
print(r.text)
Example response (JSON)
{
'blacklist_status': 'applied',
'blacklisted_sender_domains': ['bad-domain.tld', 'another-bad-domain.tld'],
'blacklisted_sender_emails': ['user@bad-domain.tld', 'user@another-bad-domain.tld'],
'blacklisted_sender_ips': ['172.16.11.255', '203.0.113.0/24'],
'whitelist_status': 'applied',
'whitelisted_sender_domains': ['good-domain.tld', 'another-good-domain.tld']
'whitelisted_sender_emails': ['user@good-domain.tld', 'user@another-good-domain.tld']
'whitelisted_sender_ips': ['127.20.30.40', '192.168.0.0/16']
}