---
title: "Update DNS Record"
method: POST
path: "/dnszone/{zoneId}/records/{id}"
tags: ["DNS Zone"]
---

# Update DNS Record

`POST /dnszone/{zoneId}/records/{id}`

## Path parameters

- `zoneId` integer, required
- `id` integer, required

## Request body

- UpdateDnsRecordModel
  - `Type` 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 — 0 = A 1 = AAAA 2 = CNAME 3 = TXT 4 = MX 5 = Redirect 6 = Flatten 7 = PullZone 8 = SRV 9 = CAA 10 = PTR 11 = Script 12 = NS 13 = SVCB 14 = HTTPS 15 = TLSA
  - `Ttl` integer, nullable
  - `Value` string, nullable
  - `Name` string, nullable
  - `Weight` integer, nullable
  - `Priority` integer, nullable
  - `Flags` integer, nullable
  - `Tag` string, nullable
  - `Port` integer, nullable
  - `PullZoneId` integer, nullable
  - `ScriptId` integer, nullable
  - `Accelerated` boolean, nullable
  - `MonitorType` 0 | 1 | 2 | 3 — 0 = None 1 = Ping 2 = Http 3 = Monitor
  - `GeolocationLatitude` number, double, nullable
  - `GeolocationLongitude` number, double, nullable
  - `LatencyZone` string, nullable
  - `SmartRoutingType` 0 | 1 | 2 — 0 = None 1 = Latency 2 = Geolocation
  - `Disabled` boolean, nullable
  - `EnviromentalVariables` DnsRecordEnviromentalVariableModel[], nullable
    - `Name` string, nullable
    - `Value` string, nullable
  - `Comment` string, nullable
  - `AutoSslIssuance` boolean, nullable
  - `Id` integer

## Response `204`

The DNS record was successfuly updated.

## Other responses

- `400` — Failed updating the DNS record. Model validation failed.
- `401` — The request authorization failed
- `404` — The DNS Zone or DNS Record with the requested ID does not exist.
- `500` — Internal Server Error

---

[API](https://skmtc.net/bunny/apis/bunny-net-cdn-logging.md) · [All operations](https://skmtc.net/bunny/apis/bunny-net-cdn-logging/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bunny/bunny-net-cdn-logging/revisions/9e622620664b/schema)
