API Reference
DNS Management API
Read, create, edit, and delete DNS records — and replace nameservers — programmatically. Bring DNS changes into the same automated pipelines that run the rest of your infrastructure, without a context switch to a portal.
DNS is often the one piece of infrastructure that still requires a human in a portal. A deployment script can provision servers, update a load balancer, and push a build — then stall because adding a verification record or swapping an A record means logging into your account by hand. For teams managing DNS across a large portfolio, that gap means delays, misconfigurations, and no clean record of what changed.
The 101domain DNS API closes it. Read endpoints give full visibility into a zone; write endpoints let you create, edit, and delete records and manage nameservers end to end.
Reading DNS records and nameservers
Use the read endpoints to audit a zone before making changes. Records come back with
a unique id used for later edits and deletions.
GET /v1/dns/example.com/records
Authorization: Bearer YOUR_API_KEY
GET /v1/dns/example.com/nameservers
Authorization: Bearer YOUR_API_KEY
DNS read and write apply to domains using 101domain managed nameservers or Secure Web Accelerator (SWA) powered by Cloudflare DNS nameservers. Domains delegated to external nameservers can't be read or modified through the API.
Creating, editing, and deleting records
The write endpoints cover the full record lifecycle. All require the
dns_write scope on your API key.
- Create —
POST /v1/dns/{domain}/recordscreates up to 25 records per request. Supported types: A, AAAA, CNAME, NS (subdomain delegations), MX, TXT, SRV, and CAA. - Edit —
PATCH /v1/dns/{domain}/recordsedits existing records byid. Send only the fields you want to change. - Delete —
DELETE /v1/dns/{domain}/recordsremoves up to 25 records in a single atomic request. If anyidisn't found, no records are deleted.
POST /v1/dns/example.com/records
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
{
"records": [
{ "type": "TXT", "host": "@", "value": "google-site-verification=...", "ttl": 3600 }
]
}
Managing nameservers
Use PUT /v1/dns/{domain}/nameservers to replace the nameservers for a
domain. It accepts 2–13 hostnames and reports whether the change applied immediately
or is pending registry processing.
PUT /v1/dns/example.com/nameservers
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
{
"nameservers": ["ns1.example-dns.com", "ns2.example-dns.com"]
}
A 200 response means the nameservers were already configured as
requested; 202 means the change was submitted and is pending registry
processing.
DNS automation for large portfolios
For corporate teams, the value isn't a single record change — it's consistency at scale. The API lets you standardize DNS across hundreds of domains, enforce records through code review, and feed every change through the same pipeline and audit trail as the rest of your stack.
- Scoped writes. The
dns_writescope is separate from read access, so you grant change permissions deliberately. - Atomic deletes. All-or-nothing deletion prevents partial changes that leave a zone in an unexpected state.
- Managed-service backing. The same team of domain experts that supports your portfolio supports the DNS platform behind the API.
Getting started
- Generate an API key with the
dns_writescope. Scopes are set at creation and can't be added later — see API Key Scopes and Permissions. - Reference the API documentation for full request and response schemas, including status codes and error responses.
- Prefer natural-language control? The same operations are available through the 101domain MCP Server.
Bring DNS into your automation pipeline
Generate a key with DNS write access and start managing records programmatically, or talk to us about portfolio-scale DNS.