Skip to content

Create DNS record

POST /dns/rr

Operation ID: AddRecord

Create a new DNS record and automatically detect the zone based on the fqdn specified in the name parameter.

recordRequestFQDN

Field Type Required Description
name fqdn yes Fully Qualified Domain Name (FQDN, ending with a period).
type type no
ttl ttl no Time To Live (60-604800)
annotation string no A custom note for this particular record.

Plus the fields of one of these variants:

Variant Fields
A data: ipv4
AAAA data: ipv6
CNAME data: fqdn
CAA flags: integer, tag: string, data: string
ALIAS data: fqdn
MX data: fqdn, priority: integer
TXT data: string
Status Type Description
200 recordResponse The record created, with its new ID
400 Error Invalid request
401 Error Unauthorized
404 Error No matching DNS zone found
417 Error DNS record creation violates a zone constraint
500 Error Unexpected error
Field Type Required Description
success boolean yes Success indicator
code integer no Response/Error Code
response recordResponse no
Terminal-Fenster
curl -X POST "https://api.regfish.com/dns/rr" \
-H "x-api-key: $REGFISH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "www",
"type": "A",
"ttl": 600,
"annotation": "string",
"data": "12.12.12.12"
}'

Fill in values — the call below updates as you type. Nothing is sent: the API does not currently allow browser requests from this domain (CORS). The API key is not stored.