curl -X POST "https://your-paneldns-domain.com/api/v1/zones/501/records" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "mail",
"type": "A",
"content": "192.0.2.20",
"ttl": 3600
}'
{
"ok": true,
"data": {
"id": 1002,
"zone_id": 501,
"remote_id": "ef567890",
"name": "mail",
"type": "A",
"content": "192.0.2.20",
"ttl": 3600,
"priority": null,
"is_protected": false,
"created_at": "2026-06-05T10:00:00.000000Z",
"updated_at": "2026-06-05T10:00:00.000000Z"
}
}
{
"ok": false,
"error": "Record type A is not allowed on this package.",
"code": 422
}
{
"ok": false,
"error": "Provider error: DNS server unreachable.",
"code": 422
}
Unlike Export Zone and Import Zone, this endpoint has no 502 path — provider failures surface as 422 here, since they’re raised as the same exception type as validation and quota errors.
Records
Create Record
Add a new DNS record to a zone. Requires records:write scope.
POST
/
api
/
v1
/
zones
/
{id}
/
records
curl -X POST "https://your-paneldns-domain.com/api/v1/zones/501/records" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "mail",
"type": "A",
"content": "192.0.2.20",
"ttl": 3600
}'
{
"ok": true,
"data": {
"id": 1002,
"zone_id": 501,
"remote_id": "ef567890",
"name": "mail",
"type": "A",
"content": "192.0.2.20",
"ttl": 3600,
"priority": null,
"is_protected": false,
"created_at": "2026-06-05T10:00:00.000000Z",
"updated_at": "2026-06-05T10:00:00.000000Z"
}
}
{
"ok": false,
"error": "Record type A is not allowed on this package.",
"code": 422
}
{
"ok": false,
"error": "Provider error: DNS server unreachable.",
"code": 422
}
Unlike Export Zone and Import Zone, this endpoint has no 502 path — provider failures surface as 422 here, since they’re raised as the same exception type as validation and quota errors.
Creates the record both in PanelDNS and on the DNS provider immediately.
integer
required
Zone ID.
string
required
Record name relative to the zone apex. Use
@ for the apex itself. E.g. www, mail, @. Automatically lowercased.string
required
Record type. Supported:
A, AAAA, CNAME, MX, TXT, NS, SRV, CAA, PTR, NAPTR, SSHFP, TLSA, HTTPS, DS, DNAME, HINFO, LOC, SPF, SOA.string
required
Record value. Format depends on type:
- A — IPv4 address, e.g.
192.0.2.10 - AAAA — IPv6 address, e.g.
2001:db8::1 - CNAME / NS / PTR — fully qualified target with trailing dot, e.g.
target.example.com. - MX — mail host with trailing dot, e.g.
mail.example.com. - TXT — quoted string, e.g.
"v=spf1 include:example.com ~all" - SRV —
weight port target, e.g.10 443 sip.example.com. - CAA —
flags tag value, e.g.0 issue "letsencrypt.org"
integer
required
Time-to-live in seconds. Minimum
60, maximum 86400.integer
Required for
MX and SRV records. Ignored for all other types.curl -X POST "https://your-paneldns-domain.com/api/v1/zones/501/records" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "mail",
"type": "A",
"content": "192.0.2.20",
"ttl": 3600
}'
{
"ok": true,
"data": {
"id": 1002,
"zone_id": 501,
"remote_id": "ef567890",
"name": "mail",
"type": "A",
"content": "192.0.2.20",
"ttl": 3600,
"priority": null,
"is_protected": false,
"created_at": "2026-06-05T10:00:00.000000Z",
"updated_at": "2026-06-05T10:00:00.000000Z"
}
}
{
"ok": false,
"error": "Record type A is not allowed on this package.",
"code": 422
}
{
"ok": false,
"error": "Provider error: DNS server unreachable.",
"code": 422
}
Unlike Export Zone and Import Zone, this endpoint has no
502 path — provider failures surface as 422 here, since they’re raised as the same exception type as validation and quota errors.