Create domain alias
Create (add) a domain alias
- HTTP Method:
POST
- URL:
https://example.domain.tld/api/v1/domainaliases/
- Require authentication:
Yes
- Permission level required:
MasterAdmin
/ DomainAdmin
Request parameters
Parameter |
Type |
Description |
Required |
domain_alias |
str |
Domain alias name |
Required |
rcpt_domain |
str |
Recipient domain name |
Required |
Response parameters
Parameter |
Type |
Description |
domain_alias |
str |
Domain alias name |
expire_time |
int |
Expire time for domain verification as UNIX timestamp (seconds) |
rcpt_domain |
str |
Recipient domain name |
status |
str |
Verification status |
verification_code |
str |
Verification code |
verification_type |
str |
Verification type |
Example request (Python)
import requests
import json
from pprint import pprint
url = "https://example.domain.tld/api/v1/domainaliases/"
data = {
"domain_alias" : "test.vonmail.com",
"rcpt_domain" : "vonmail.com"
}
r = requests.post(url, json=data, auth=("admin","long-auth_token-here"))
try:
pprint(r.json())
except:
print(r.text)
Example response (JSON)
{'domain_alias': 'test.vonmail.com',
'expire_time': 1583665895,
'rcpt_domain': 'vonmail.com',
'status': 'pending_verification',
'verification_code': 'nms-domain-verification=955742751907',
'verification_type': 'DNS TXT'}