One API for
all your registrars
Connect your registrar accounts once. One MailDNS key then manages the DNS records on every domain in them, in the registrar API your scripts and agents already know.
POST api.maildns.io/api3.json
command=set_dns2
domain=advisor.example.com
add_dns_to_current_setting=1
main_record_type0=txt
main_record0=google-site-verification=3J9tq0iV8p…
{"SetDnsResponse": {"ResponseCode": 0, "Status": "success"}}
POST api.maildns.io/api3.json command=dns_status
- ns1.example.netyes
- ns2.example.netyes
- ns3.example.netyes
- ns4.example.netyes
Liveyes
A write returns once the record is saved at the authoritative nameservers. dns_status asks each of them directly and says yes when every one answers with your record.
Six API styles. One key.
Pick the style you already know. Every style reaches the same records with the same key, and it doesn't have to match the registrar that holds the domain. Here is one record, written each way.
Dynadot style
curl https://api.maildns.io/api3.json \
--data-urlencode key=KEY \
--data-urlencode command=set_dns2 \
--data-urlencode domain=advisor.example.com \
--data-urlencode add_dns_to_current_setting=1 \
--data-urlencode main_record_type0=txt \
--data-urlencode main_record0=google-site-verification=3J9tq0iV8pTt1yW5zKc2mE7aR4bN6hD0sF1gL8xQReply: {"SetDnsResponse": {"ResponseCode": 0, "Status": "success"}} Dynadot-style reference
Spaceship style
curl -X PUT https://api.maildns.io/api/v1/dns/records/advisor.example.com \
-H 'X-API-Key: KEY' -H 'X-API-Secret: SECRET' \
-H 'Content-Type: application/json' \
-d '{"force": false, "items": [{"type": "TXT", "name": "@", "ttl": 3600,
"value": "google-site-verification=3J9tq0iV8pTt1yW5zKc2mE7aR4bN6hD0sF1gL8xQ"}]}'Reply: 204 No Content Spaceship-style reference
Cloudflare style
curl -X POST https://api.maildns.io/client/v4/zones/3f1a6c2e9b7d4e08a5c1f2b3d4e5f607/dns_records \
-H 'Authorization: Bearer KEY' \
-H 'Content-Type: application/json' \
-d '{"type": "TXT", "name": "@", "ttl": 3600,
"content": "google-site-verification=3J9tq0iV8pTt1yW5zKc2mE7aR4bN6hD0sF1gL8xQ"}'Reply: {"success": true, "errors": [], "messages": [], "result": {"id": "8b2e5d1f0a9c4b7e6d3f2a1c0b9e8d7f", ...}} Cloudflare-style reference
GoDaddy style
curl -X PATCH https://api.maildns.io/v1/domains/advisor.example.com/records \
-H 'Authorization: sso-key KEY:SECRET' \
-H 'Content-Type: application/json' \
-d '[{"type": "TXT", "name": "@", "ttl": 3600,
"data": "google-site-verification=3J9tq0iV8pTt1yW5zKc2mE7aR4bN6hD0sF1gL8xQ"}]'Reply: 200 OK with an empty body. GoDaddy-style reference
Porkbun style
curl https://api.maildns.io/api/json/v3/dns/create/advisor.example.com \
-H 'Content-Type: application/json' \
-d '{"apikey": "KEY", "secretapikey": "SECRET",
"name": "", "type": "TXT", "ttl": "3600",
"content": "google-site-verification=3J9tq0iV8pTt1yW5zKc2mE7aR4bN6hD0sF1gL8xQ"}'Reply: {"status": "SUCCESS", "id": "106926659"} Porkbun-style reference
Namecheap style
curl https://api.maildns.io/xml.response \
--data-urlencode ApiUser=any --data-urlencode UserName=any \
--data-urlencode ApiKey=KEY --data-urlencode ClientIp=any \
--data-urlencode Command=namecheap.domains.dns.setHosts \
--data-urlencode SLD=advisor.example --data-urlencode TLD=com \
--data-urlencode HostName1=@ --data-urlencode RecordType1=TXT \
--data-urlencode Address1=google-site-verification=3J9tq0iV8pTt1yW5zKc2mE7aR4bN6hD0sF1gL8xQReply: <DomainDNSSetHostsResult Domain="advisor.example.com" IsSuccess="true"/> setHosts replaces the host's records, so send the ones it should keep too. Namecheap-style reference
Registrars you can connect: Dynadot, Spaceship, Cloudflare, GoDaddy, Porkbun and Namecheap.
Records only. Nameservers stay locked.
-
advisor.example.comKeys see only their own names
A key works on the domains and hosts it was issued for. It can't list, read or change anything else in your accounts.
-
set_nsupdateNssetCustomNo key can touch nameservers
Keys write A, AAAA, CNAME, MX and TXT records. Any attempt to change nameservers, in any style, gets one answer:
This API key doesn't work for nameservers.
-
dns_statusKnow when it's live
Ask every authoritative nameserver directly, and press verify only when all of them serve your record.
-
/llms.txtDocs an agent can follow
Every page is also plain markdown, listed in llms.txt and joined in llms-full.txt. Give your agent one link and the key.
Hand your agent one link.
The docs tell it which calls to make, which never to make, and how to tell when a record is live.
Read https://maildns.io/llms-full.txt first. Then add the Google verification TXT record below to advisor.example.com, wait until dns_status says it is live on every nameserver, and tell me.
google-site-verification=3J9tq0iV8pTt1yW5zKc2mE7aR4bN6hD0sF1gL8xQAccounts are by invitation.
When your account is set up, you connect your registrar accounts through a private link and we issue keys for the domains you choose. There is no sign-up form.