Create domain

Create (add) a domain

  • HTTP Method: POST
  • URL: https://example.domain.tld/api/v1/domains/
  • Require authentication: Yes
  • Permission level required: MasterAdmin / DomainAdmin

Request parameters

Parameter Type Description Required
domain str Domain name Required

Response parameters

Parameter Type Description
domain str Domain name
expire_time int Expire time for domain verification as UNIX timestamp (seconds)
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/domains/"
data = {
"domain" : "test1.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': 'test1.vonmail.com',
 'expire_time': 1583548002,
 'status': 'pending_verification',
 'verification_code': 'nms-domain-verification=173121280786',
 'verification_type': 'DNS TXT'}