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

FieldTypeRequiredDescription
namefqdnyesFully Qualified Domain Name (FQDN, ending with a period).
typetypeno-
ttlttlnoTime To Live in seconds (60-86400)
annotationstringnoA custom note for this particular record.

Plus the fields of one of these variants:

VariantFields
Adata: ipv4
AAAAdata: ipv6
CNAMEdata: fqdn
CAAflags: integer, tag: string, data: string
ALIASdata: fqdn
MXdata: fqdn, priority: integer
TXTdata: string
StatusTypeDescription
200recordResponseThe record created, with its new ID
400ErrorInvalid request
401ErrorUnauthorized
404ErrorNo matching DNS zone found
417ErrorDNS record creation violates a zone constraint
429ErrorRate limit for ACME platform credentials (scope acme-dns-challenge): calls per minute, and distinct customers per day. Ordinary customer keys never receive this status on this endpoint.
500ErrorUnexpected error
FieldTypeRequiredDescription
successbooleanyesSuccess indicator
codeintegernoResponse/Error Code
responserecordResponseno-
Terminal window
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.