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

# Update DNS Zones

`POST /dnszone/{id}`

## Request

- Base URL: `https://api.bunny.net`
- URL: `https://api.bunny.net/dnszone/{id}`
- Auth: API key in header `AccessKey`

## Path parameters

- `id` integer, required

## Request body

- UpdateDnsZoneModel
  - `CustomNameserversEnabled` boolean, nullable
  - `Nameserver1` string, nullable
  - `Nameserver2` string, nullable
  - `SoaEmail` string, nullable
  - `LoggingEnabled` boolean, nullable
  - `LogAnonymizationType` 0 | 1: 0 = One Digit 1 = Drop
  - `CertificateKeyType` 0 | 1: 0 = ECDSA 1 = RSA
  - `LoggingIPAnonymizationEnabled` boolean, nullable: Determines if the log anonoymization should be enabled

## Response `200`

The DNS Zone with the requested ID

- DnsZoneModel
  - `Id` integer
  - `Domain` string, nullable
  - `Records` DnsRecordModel[], nullable
    - `Id` integer
    - `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 = Pull Zone 8 = SRV 9 = CAA 10 = PTR 11 = Script 12 = NS 13 = SVCB 14 = HTTPS 15 = TLSA
    - `Ttl` integer
    - `Value` string, nullable
    - `Name` string, nullable
    - `Weight` integer
    - `Priority` integer
    - `Port` integer
    - `Flags` integer
    - `Tag` string, nullable
    - `Accelerated` boolean
    - `AcceleratedPullZoneId` integer
    - `LinkName` string, nullable
    - `IPGeoLocationInfo` GeoDnsLocationModel
      - `CountryCode` string, nullable: The ISO country code of the location
      - `Country` string, nullable: The name of the country of the location
      - `ASN` integer: The ASN of the IP organization
      - `OrganizationName` string, nullable: The mame of the organization that owns the IP
      - `City` string, nullable: The name of the city of the location
    - `GeolocationInfo` DnsRecordGeoLocationInfo
      - `Country` string, nullable
      - `City` string, nullable
      - `Latitude` number, double
      - `Longitude` number, double
    - `MonitorStatus` 0 | 1 | 2: 0 = Unknown 1 = Online 2 = Offline
    - `MonitorType` 0 | 1 | 2 | 3: 0 = None 1 = Ping 2 = HTTP 3 = Monitor
    - `GeolocationLatitude` number, double
    - `GeolocationLongitude` number, double
    - `EnviromentalVariables` DnsRecordEnviromentalVariableModel[], nullable
      - `Name` string, nullable
      - `Value` string, nullable
    - `LatencyZone` string, nullable
    - `SmartRoutingType` 0 | 1 | 2: 0 = None 1 = Latency 2 = Geolocation
    - `Disabled` boolean
    - `Comment` string, nullable
    - `AutoSslIssuance` boolean
    - `AccelerationStatus` 0 | 1 | 2 | 3 | 4: 0 = None 1 = Pending 2 = Processing 3 = Completed 4 = Failed
  - `DateModified` string, date-time
  - `DateCreated` string, date-time
  - `NameserversDetected` boolean
  - `CustomNameserversEnabled` boolean
  - `Nameserver1` string, nullable
  - `Nameserver2` string, nullable
  - `SoaEmail` string, nullable
  - `NameserversNextCheck` string, date-time
  - `LoggingEnabled` boolean
  - `LoggingIPAnonymizationEnabled` boolean: Determines if the TLS 1 is enabled on the DNS Zone
  - `LogAnonymizationType` 0 | 1: 0 = One Digit 1 = Drop
  - `DnsSecEnabled` boolean: Determines if DNSSEC is enabled for this DNS Zone
  - `CertificateKeyType` 0 | 1: 0 = ECDSA 1 = RSA

## Other responses

- `401`: The request authorization failed
- `404`: The DNS Zone with the requested ID does not exist.
- `500`: Internal Server Error

## Changes

- **2026-11-12** `2b06f94dbfbf`: 10 breaking, 31 info
  - added `#/components/schemas/AcceleratedStatus` to the `Records/items/AccelerationStatus` response property `oneOf` list for the response status `200`
  - added `#/components/schemas/DnsMonitoringStatus` to the `Records/items/MonitorStatus` response property `oneOf` list for the response status `200`
  - added `#/components/schemas/DnsMonitoringType` to the `Records/items/MonitorType` response property `oneOf` list for the response status `200`
  - added `#/components/schemas/DnsRecordTypes` to the `Records/items/Type` response property `oneOf` list for the response status `200`
  - …37 more

[Operation history](https://skmtc.dev/bunny/apis/bunny-net-api/changes/dnszone/:id/post.md)

---

[API](https://skmtc.dev/bunny/apis/bunny-net-api.md) - [All operations](https://skmtc.dev/bunny/apis/bunny-net-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bunny/apis/bunny-net-api/revisions/2b06f94dbfbf?raw)
