Enable SDR
Enable split domain routing (SDR) for a domain
- HTTP Method:
POST
- URL:
https://example.domain.tld/api/v1/domains/sdr/<domain>/
- Require authentication:
Yes
- Permission level required:
MasterAdmin
/ DomainAdmin
Path parameters
Parameter |
Type |
Description |
Required |
domain |
str |
Domain name |
Required |
Request parameters
Parameter |
Type |
Description |
Required |
destination_hostname |
str |
Destination hostname to relay mails to |
Required |
destination_port |
int |
Destination server port |
Required |
Response parameters
Parameter |
Type |
Description |
sdr |
dict |
The SDR status object |
destination_hostname |
str |
Destination hostname to relay mails to |
destination_port |
int |
Destination server port |
domain |
str |
Domain name |
status |
str |
Status |
Example request (Python)
import requests
import json
from pprint import pprint
url = "https://example.domain.tld/api/v1/domains/sdr/vonmail.com/"
data = {
"destination_hostname" : "mail3.mymailcheap.com",
"destination_port" : 25
}
r = requests.post(url, json=data, auth=("admin","long-auth_token-here"))
try:
pprint(r.json())
except:
print(r.text)
Example response (JSON)
{'sdr': {'destination_hostname': 'mail3.mymailcheap.com',
'destination_port': 25,
'domain': 'vonmail.com',
'status': 'enabled'}}