DNGate Developer API
Manage your domains programmatically: list your portfolio, edit DNS records, switch nameservers. Authenticate with a personal API key from Profile → API access.
Authentication
Create a key in Profile → API access (up to 5 active keys). Send it as a Bearer token on every request:
curl https://dngate.io/api/v1/domains \ -H "Authorization: Bearer dgk_YOUR_KEY"
The full key is shown only once at creation. Revoking a key takes effect immediately. Browser (CORS) clients are not supported — the API is for scripts, servers and CI.
List domains
Every domain in your account as a pure account-data projection: domain, status, registrar, registration_date, expiry_date, auto_renew, created_at. Lock state is deliberately not included (it is a live registry query — use the app).
DNS records
Record types: A, AAAA, CNAME, MX, TXT, NS, SRV, CAA. TTL 60–86400 (optional on create). The apex is @; automation-friendly input is normalized — "", the bare domain or www.example.com all become @ / www.
# add a record
curl -X POST https://dngate.io/api/v1/domains/example.com/records \
-H "Authorization: Bearer dgk_YOUR_KEY" -H "Content-Type: application/json" \
-d '{"name":"www","type":"A","ttl":300,"data":"192.0.2.10"}'
# update: match locates the old record, record is the new value
curl -X PUT https://dngate.io/api/v1/domains/example.com/records \
-H "Authorization: Bearer dgk_YOUR_KEY" -H "Content-Type: application/json" \
-d '{"match":{"name":"www","type":"A","data":"192.0.2.10"},
"record":{"name":"www","type":"A","ttl":600,"data":"192.0.2.11"}}'
# delete — JSON body also accepted (easier for TXT payloads)
curl -X DELETE 'https://dngate.io/api/v1/domains/example.com/records?name=www&type=A&data=192.0.2.11' \
-H "Authorization: Bearer dgk_YOUR_KEY"
Why DELETE needs data: registries have no per-record id — records are addressed by the ⟨name, type, data⟩ triple (TTL is ignored). Two SPF TXT records differ only by data, so data is required to pick the right one.
Nameservers
PUT replaces the full set (1–13 hosts), it never appends. Tokenized domains (claimed as NFT) reject NS changes with 409 domain_tokenized — that lock is by design.
Errors & limits
Rate limits: 60 reads/min and 20 writes/min per key, 10 failed authentications/min per IP. Successful responses carry X-RateLimit-Limit / X-RateLimit-Remaining; 429s carry Retry-After. Machine-readable schema: openapi.json (import into Postman / Bruno).