API reference · /api/v1
DNS hosting
Host DNS for domains in your reseller account on Domain.af nameservers. The same rules as the portal apply: the domain must be active and have the DNS Management add-on, NS records are managed by Domain.af, and an existing zone on our DNS servers is never overwritten.
Zones
GET /api/v1/dns/zones— zones in your account.POST /api/v1/dns/zones— enable DNS hosting:{"domain": "example.af"}. Returns201, or409 zone_existsif a zone already exists.GET /api/v1/dns/zones/{domain}— zone status, nameservers to delegate to, and all records.POST /api/v1/dns/zones/{domain}/check— re-check delegation; a pending zone activates once the domain uses our nameservers.DELETE /api/v1/dns/zones/{domain}— remove the zone and all its records.
{
"success": true,
"data": {
"domain": "example.af",
"status": "pending_nameserver",
"nameservers": ["ns1.aryanict.com", "ns2.aryanict.com"],
"delegated": false,
"records_count": 2
}
}
Records
Records can be changed once the zone is active. Names are relative to the zone (@ for the domain itself).
GET /api/v1/dns/zones/{domain}/records?type=MXPOST /api/v1/dns/zones/{domain}/recordsPUT /api/v1/dns/zones/{domain}/records/{id}— send only the fields to change.DELETE /api/v1/dns/zones/{domain}/records/{id}
{
"type": "MX",
"name": "@",
"content": "mail.example.af",
"priority": 10,
"ttl": 3600
}
Supported types include A, AAAA, CNAME, MX, TXT, SRV (priority + extra.weight, extra.port), CAA (extra.flag, extra.tag), PTR, TLSA, SSHFP, DS, HTTPS and SVCB. TTL is 60–86400 seconds and shared by all records with the same name and type.
Quick Setup templates
GET /api/v1/dns/templates— templates and the variables they need.POST /api/v1/dns/zones/{domain}/templates/{id}—{"variables": {"mx_host": "…"}, "conflict_strategy": "skip|replace|cancel"}