---
title: "DNS API"
description: "Manage DNS zones and records over the Edge REST API."
url: https://edge.network/docs/api/dns/
---

# DNS API

# DNS API

Manage zones, records, backups, and development domains under
`/api/dns`.
All endpoints require [authentication](https://edge.network/docs/api/authentication).

## Quick Start

```
# Create a zone
curl -X POST https://edge.network/api/dns/zones \
  -H "Authorization: Bearer ek_live_..." \
  -H "Content-Type: application/json" \
  -d '{ "domain": "example.com" }'

# Add an A record
curl -X POST https://edge.network/api/dns/zones/ZONE_ID/records \
  -H "Authorization: Bearer ek_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "type": "A",
    "name": "www",
    "data": "203.0.113.10",
    "ttl": 3600
  }'
```

After creating a zone, point your domain at the Edge
[nameservers](https://edge.network/docs/dns/nameservers) and call
`POST /api/dns/zones/:id/verify` to confirm delegation.

## Zones

| Endpoint | Description |
| GET /api/dns/zones | List zones |
| POST /api/dns/zones | Create — body `{ "domain": "example.com" }`, returns 201 |
| GET /api/dns/zones/:id | Get a zone |
| DELETE /api/dns/zones/:id | Delete a zone and its records |
| POST /api/dns/zones/:id/verify | Check nameserver delegation — returns `{ verified, currentNs }` |
| GET /api/dns/zones/:id/metrics?range=24h | Query metrics — `range` is `1h`, `24h`, `7d`, or `30d` |
| GET /api/dns/zones/:id/events | Zone activity log |
| GET | POST /api/dns/zones/:id/examine | Fetch / run the [DNS Examiner](https://edge.network/docs/dns/examiner) AI analysis |
| GET /api/dns/usage | Zone count and per-zone query usage against limits |

## Records

| Endpoint | Description |
| GET /api/dns/zones/:id/records | List records in a zone |
| POST /api/dns/zones/:id/records | Add — `{ type, name, data, ttl?, priority?, geo? }` (`priority` required for MX) |
| PUT /api/dns/zones/:id/records/:recordId | Update any of the same fields |
| DELETE /api/dns/zones/:id/records/:recordId | Delete a record |

Supported types: `A`, `AAAA`,
`CNAME`, `MX`,
`TXT`, `NS`,
`ALIAS`, `CAA`,
`PTR`, `SRV`.
The `geo` field enables
[geographic routing](https://edge.network/docs/dns/geo-routing).

## Zone Backups

| Endpoint | Description |
| GET | POST /api/dns/zones/:id/backups | List backups / take a manual backup |
| GET /api/dns/zones/:id/backups/:backupId | Download a backup |
| POST /api/dns/zones/:id/backups/:backupId/restore | Restore — takes a safety backup first unless `createPreBackup: false` |
| DELETE /api/dns/zones/:id/backups/:backupId | Delete a backup |
| POST /api/dns/zones/:id/backups/enable | disable | Turn automatic [zone backups](https://edge.network/docs/dns/backups) on or off |

## Development Domains

[test.network](https://edge.network/docs/dns/test-domains) and
[ed.ge](https://edge.network/docs/dns/edge-domains) subdomains can be
purchased and managed through the API:

| Endpoint | Description |
| GET /api/dns/test-domains | edge-domains | List your domains |
| GET .../check/:subdomain | Check availability |
| POST /api/dns/test-domains | edge-domains | Purchase — body `{ "subdomain": "myapp" }` (card on file required) |
| DELETE .../:id | Release a domain |

[Back to Docs](https://edge.network/docs) [Need help?](https://edge.network/support)
