DNS API
An API that lets you read and write DNS records programmatically. The underlying primitive most custom-domain SaaS products build on top of.
A DNS API is a programmatic interface to a DNS provider that lets you list, create, update, and delete records without logging into a dashboard. Every major DNS provider has one.
Who has a DNS API
| Provider | API style |
|---|---|
| Cloudflare | REST + GraphQL |
| Route 53 | AWS SDK |
| Google Cloud DNS | REST |
| DNSimple | REST |
| Namecheap | XML over GET (legacy but works) |
| GoDaddy | REST (limited to partners post-2024) |
| Porkbun | REST |
| Vercel DNS | REST |
For most SaaS use cases, the API style doesn't matter much; you're just reading and writing records. The differences are in rate limits, latency, and whether they support the record types you need (ANAME / ALIAS varies).
DNS API vs custom-domain API
These are different things, easy to confuse:
| DNS API | Custom-domain API | |
|---|---|---|
| What it manages | DNS records on a domain | Hostnames + TLS + routing for SaaS |
| Layer | DNS only | Edge + DNS monitoring + cert |
| Who pays | DNS provider customer | SaaS customer |
| Example | Cloudflare's API for example.com | Domainee for janesbakery.com |
A SaaS providing custom domains often USES a DNS API internally (to verify customer setups, to issue ACME DNS-01 challenges) but provides a higher-level custom-domain API to its own customers.
When you need a DNS API directly
- You're a registrar reseller (you sell domains and need to manage their DNS).
- You're automating internal DNS for your own infrastructure.
- You need wildcard certs via ACME DNS-01 and have programmatic control of the validating domain.
If you're a SaaS letting customers connect their own domains, you typically don't need direct DNS API access; the customer's DNS lives at their provider, and you just check that their CNAME resolves correctly.