DNS Records¶
DNS records live inside a zone and map names to values. The b'nerd DNS API supports all standard record types and exposes both a native API and a PowerDNS-compatible proxy for tools like external-dns.
Endpoints¶
| Method | Path | Description |
|---|---|---|
GET | /dns/zones/{zone_id}/records | List records in a zone |
POST | /dns/zones/{zone_id}/records | Create a record |
PATCH | /dns/zones/{zone_id}/records/{name}/{type} | Update a record |
DELETE | /dns/zones/{zone_id}/records/{name}/{type} | Delete a record |
List records¶
Returns all records in the zone as an array.
Create a record¶
POST /dns/zones/{zone_id}/records
Authorization: Bearer <token>
Content-Type: application/json
{
"record": {
"name": "www",
"type": "A",
"ttl": 300,
"content": "203.0.113.10"
}
}
Returns 201 Created.
Common record types¶
| Type | content format | Example |
|---|---|---|
A | IPv4 address | 203.0.113.10 |
AAAA | IPv6 address | 2001:db8::1 |
CNAME | Fully qualified domain name | target.example.com. |
MX | Priority + FQDN | 10 mail.example.com. |
TXT | Quoted string | "v=spf1 include:_spf.example.com ~all" |
NS | Nameserver FQDN | ns1.bnerd.cloud. |
SRV | Priority weight port target | 10 20 443 sip.example.com. |
CAA | Flags tag value | 0 issue "letsencrypt.org" |
Trailing dots
For record types where content is a domain name (CNAME, MX, NS, SRV), use a fully qualified domain name with a trailing dot to prevent the zone name being appended automatically.
Update a record¶
PATCH /dns/zones/{zone_id}/records/www/A
Authorization: Bearer <token>
Content-Type: application/json
{
"record": {
"ttl": 60,
"content": "203.0.113.20"
}
}
Returns 200 OK with the updated record.
Delete a record¶
Returns 204 No Content.
TTL guidance¶
| Use case | Recommended TTL |
|---|---|
| Production stable records | 3600 (1 hour) or higher |
| Records you may need to change soon | 300 (5 minutes) |
| During a migration or failover | 60 (1 minute) |
Lower TTL values increase DNS query load; raise them back after changes propagate.
Related pages¶
- Zones — create and manage DNS zones
- Domain Verification — TXT record-based domain verification