Update DNS record
PATCH /dns/rrOperation ID: PatchRecord
Update a DNS record and automatically detect the record based on the name and type specified in the parameters. If you want to update the name or type attribute, please refer to the PATCH /dns/rr/{rrid} endpoint.
Request body
Section titled “Request body”| 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 |
Responses
Section titled “Responses”| Status | Type | Description |
|---|---|---|
200 |
recordResponse |
The record corresponding to the provided name/type combination |
400 |
Error |
Invalid request |
401 |
Error |
Unauthorized |
404 |
Error |
No record found for the provided name/type combination |
417 |
Error |
DNS record update violates a zone constraint |
500 |
Error |
Unexpected error |
Response body
Section titled “Response body”| Field | Type | Required | Description |
|---|---|---|---|
success |
boolean |
yes | Success indicator |
code |
integer |
no | Response/Error Code |
response |
recordResponse | no | — |
Example
Section titled “Example”curl -X PATCH "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" }'Build a request
Section titled “Build a request”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.