Skip to main content
POST
/
dnszone
/
{id}
Update DNS Zones
curl --request POST \
  --url https://api.bunny.net/dnszone/{id} \
  --header 'AccessKey: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "CustomNameserversEnabled": true,
  "Nameserver1": "<string>",
  "Nameserver2": "<string>",
  "SoaEmail": "<string>",
  "LoggingEnabled": true,
  "LogAnonymizationType": 0,
  "CertificateKeyType": 0,
  "LoggingIPAnonymizationEnabled": true
}
'
{
  "Id": 123,
  "Domain": "<string>",
  "Records": [
    {
      "Id": 123,
      "Type": 0,
      "Ttl": 123,
      "Value": "<string>",
      "Name": "<string>",
      "Weight": 123,
      "Priority": 123,
      "Port": 123,
      "Flags": 123,
      "Tag": "<string>",
      "Accelerated": true,
      "AcceleratedPullZoneId": 123,
      "LinkName": "<string>",
      "IPGeoLocationInfo": {
        "CountryCode": "<string>",
        "Country": "<string>",
        "ASN": 123,
        "OrganizationName": "<string>",
        "City": "<string>"
      },
      "GeolocationInfo": {
        "Country": "<string>",
        "City": "<string>",
        "Latitude": 123,
        "Longitude": 123
      },
      "MonitorStatus": 0,
      "MonitorType": 0,
      "GeolocationLatitude": 123,
      "GeolocationLongitude": 123,
      "EnviromentalVariables": [
        {
          "Name": "<string>",
          "Value": "<string>"
        }
      ],
      "LatencyZone": "<string>",
      "SmartRoutingType": 0,
      "Disabled": true,
      "Comment": "<string>",
      "AutoSslIssuance": true,
      "AccelerationStatus": 0
    }
  ],
  "DateModified": "2023-11-07T05:31:56Z",
  "DateCreated": "2023-11-07T05:31:56Z",
  "NameserversDetected": true,
  "CustomNameserversEnabled": true,
  "Nameserver1": "<string>",
  "Nameserver2": "<string>",
  "SoaEmail": "<string>",
  "NameserversNextCheck": "2023-11-07T05:31:56Z",
  "LoggingEnabled": true,
  "LoggingIPAnonymizationEnabled": true,
  "LogAnonymizationType": 0,
  "DnsSecEnabled": true,
  "CertificateKeyType": 0
}

Authorizations

AccessKey
string
header
required

API Access Key authorization header

Path Parameters

id
integer<int64>
required

The ID of the DNS Zone that will be updated

Body

application/json

The configuration that should be applied to the DNS zone

CustomNameserversEnabled
boolean | null
Nameserver1
string | null
Nameserver2
string | null
SoaEmail
string | null
LoggingEnabled
boolean | null
LogAnonymizationType
enum<integer>

Gets the log anonymization type for this zone

Available options:
0,
1
CertificateKeyType
enum<integer>

Sets the certificate private key type for wildcard certificates for this zone

Available options:
0,
1
LoggingIPAnonymizationEnabled
boolean | null

Determines if the log anonoymization should be enabled

Response

The DNS Zone with the requested ID

Id
integer<int64>
Domain
string | null
Records
object[] | null
DateModified
string<date-time>
DateCreated
string<date-time>
NameserversDetected
boolean
CustomNameserversEnabled
boolean
Nameserver1
string | null
Nameserver2
string | null
SoaEmail
string | null
NameserversNextCheck
string<date-time>
LoggingEnabled
boolean
LoggingIPAnonymizationEnabled
boolean

Determines if the TLS 1 is enabled on the DNS Zone

LogAnonymizationType
enum<integer>

Sets the log anonymization type for this zone

Available options:
0,
1
DnsSecEnabled
boolean

Determines if DNSSEC is enabled for this DNS Zone

CertificateKeyType
enum<integer>

The private key type to use for automatic certificates

Available options:
0,
1