NetBird Full API Reference + Read-Only MCP Prototype
POST/api/dns/zones/{zoneId}/records

Create a DNS record

Creates a DNS record in a specific zone. Supply name, type, content, and ttl; the record name must match the zone's domain or be a subdomain within it. A successful response returns the created record with its identifier.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

1 parameter · 4 body fields
zoneIdstringrequired
The unique identifier of the zone in which to create the DNS record.

DNS record details. name, type, content, and ttl are required.

contentstringrequired
DNS record content (IP address for A/AAAA, domain for CNAME)
namestringrequired
FQDN for the DNS record. Must be a subdomain within or match the zone's domain.
ttlintegerrequired
Time to live in seconds
typestringrequired
DNS record type
Allowed:AAAAACNAME

6 status codes
200Returns the created DNS record object, including its identifier, name, type, content, and TTL.
idstringrequired
DNS record ID
contentstringrequired
DNS record content (IP address for A/AAAA, domain for CNAME)
namestringrequired
FQDN for the DNS record. Must be a subdomain within or match the zone's domain.
ttlintegerrequired
Time to live in seconds
typestringrequired
DNS record type
Allowed:AAAAACNAME
400Returned when the request is invalid, including when required fields are missing or a field value violates a schema constraint.
401Returned when authentication is required but missing or invalid.
403Returned when access to the zone is forbidden.
404Returned when the DNS zone cannot be found.
500Returned when an internal server error occurs.

Error handling

A 400 indicates an invalid request; a 401 means authentication is required; a 403 indicates access is forbidden. A 404 is returned when the zoneId path parameter does not identify an available zone, and a 500 indicates an internal server error. The body must include name, type, content, and ttl; type must be A, AAAA, or CNAME, content must be 1 to 255 characters, and ttl must be at least 0.