DNS

DNS

DNS

Analytics

DNS.Analytics

DNS.Analytics.Reports

Methods

get(, ):
get/zones/{zone_id}/dns_analytics/report

Retrieves a list of summarised aggregate metrics over a given time period.

See Analytics API properties for detailed information about the available query parameters.

Domain types

Report{…}

DNS.Analytics.Reports.Bytimes

Methods

get(, ):
get/zones/{zone_id}/dns_analytics/report/bytime

Retrieves a list of aggregate metrics grouped by time interval.

See Analytics API properties for detailed information about the available query parameters.

Domain types

ByTime{…}
DNS

DNSSEC

DNS.DNSSECResource

Methods

get(, ):
get/zones/{zone_id}/dnssec

Details about DNSSEC status and configuration.

edit(, ):
patch/zones/{zone_id}/dnssec

Enable or disable DNSSEC.

delete(, ):
delete/zones/{zone_id}/dnssec

Delete DNSSEC.

Domain types

DNSSEC{…}
DNS

Records

DNS.Records

Methods

list(, ): <>
get/zones/{zone_id}/dns_records

List, search, sort, and filter a zones' DNS records.

get(, , ):
get/zones/{zone_id}/dns_records/{dns_record_id}

DNS Record Details

create(, ):
post/zones/{zone_id}/dns_records

Create a new DNS record for a zone.

Notes:

  • A/AAAA records cannot exist on the same name as CNAME records.
  • NS records cannot exist on the same name as any other record type.
  • Domain names are always represented in Punycode, even if Unicode characters were used when creating the record.
update(, , ):
put/zones/{zone_id}/dns_records/{dns_record_id}

Overwrite an existing DNS record.

Notes:

  • A/AAAA records cannot exist on the same name as CNAME records.
  • NS records cannot exist on the same name as any other record type.
  • Domain names are always represented in Punycode, even if Unicode characters were used when creating the record.
edit(, , ):
patch/zones/{zone_id}/dns_records/{dns_record_id}

Update an existing DNS record.

Notes:

  • A/AAAA records cannot exist on the same name as CNAME records.
  • NS records cannot exist on the same name as any other record type.
  • Domain names are always represented in Punycode, even if Unicode characters were used when creating the record.
delete(, , ):
delete/zones/{zone_id}/dns_records/{dns_record_id}

Delete DNS Record

export(, ):
get/zones/{zone_id}/dns_records/export

You can export your BIND config through this endpoint.

See the documentation for more information.

import(, ):
post/zones/{zone_id}/dns_records/import

You can upload your BIND config through this endpoint. It assumes that cURL is called from a location with bind_config.txt (valid BIND config) present.

See the documentation for more information.

scan(, ):
Deprecated
post/zones/{zone_id}/dns_records/scan

Deprecated

This endpoint is deprecated in favor of a new asynchronous version. Please use the /scan/trigger and /scan/review endpoints instead.

Scan for common DNS records on your domain and automatically add them to your zone. Useful if you haven't updated your nameservers yet.

scanTrigger(, ):
post/zones/{zone_id}/dns_records/scan/trigger

Initiates an asynchronous scan for common DNS records on your domain. Note that this does not automatically add records to your zone. The scan runs in the background, and results can be reviewed later using the /scan/review endpoints. Useful if you haven't updated your nameservers yet.

scanReview(, ):
post/zones/{zone_id}/dns_records/scan/review

Accept or reject DNS records found by the DNS records scan. Accepted records will be permanently added to the zone, while rejected records will be permanently deleted.

scanList(, ): <>
get/zones/{zone_id}/dns_records/scan/review

Retrieves the list of DNS records discovered up to this point by the asynchronous scan. These records are temporary until explicitly accepted or rejected via POST /scan/review. Additional records may be discovered by the scan later.

batch(, ):
post/zones/{zone_id}/dns_records/batch

Send a Batch of DNS Record API calls to be executed together.

Notes:

  • Although Cloudflare will execute the batched operations in a single database transaction, Cloudflare's distributed KV store must treat each record change as a single key-value pair. This means that the propagation of changes is not atomic. See the documentation for more information.

  • The operations you specify within the /batch request body are always executed in the following order:

    • Deletes
    • Patches
    • Puts
    • Posts

Domain types

ARecord{…}
AAAARecord{…}
BatchPatch = | | | 18 more...
BatchPut = | | | 18 more...
CAARecord{…}
CERTRecord{…}
CNAMERecord{…}
DNSKEYRecord{…}
DSRecord{…}
HTTPSRecord{…}
LOCRecord{…}
MXRecord{…}
NAPTRRecord{…}
NSRecord{…}
PTRRecord{…}
Record = | | | 18 more...
RecordResponse = | | | 18 more...
RecordTags = string

Individual tag of the form name:value (the name must consist of only letters, numbers, underscores and hyphens)

SMIMEARecord{…}
SRVRecord{…}
SSHFPRecord{…}
SVCBRecord{…}
TLSARecord{…}
TTL = number | 1

Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones.

TXTRecord{…}
URIRecord{…}
DNS

Settings

DNS.Settings

DNS.Settings.Account

Methods

get(, ):
get/accounts/{account_id}/dns_settings

Show DNS settings for an account

edit(, ):
patch/accounts/{account_id}/dns_settings

Update DNS settings for an account

DNS.Settings.Account.Views

Methods

list(, ): <>
get/accounts/{account_id}/dns_settings/views

List DNS Internal Views for an Account

get(, , ):
get/accounts/{account_id}/dns_settings/views/{view_id}

Get DNS Internal View

create(, ):
post/accounts/{account_id}/dns_settings/views

Create Internal DNS View for an account

edit(, , ):
patch/accounts/{account_id}/dns_settings/views/{view_id}

Update an existing Internal DNS View

delete(, , ):
delete/accounts/{account_id}/dns_settings/views/{view_id}

Delete an existing Internal DNS View

DNS.Settings.Zone

Methods

get(, ):
get/zones/{zone_id}/dns_settings

Show DNS settings for a zone

edit(, ):
patch/zones/{zone_id}/dns_settings

Update DNS settings for a zone

DNS

Zone Transfers

DNS.ZoneTransfers

DNS.ZoneTransfers.ACLs

Methods

list(, ): <>
get/accounts/{account_id}/secondary_dns/acls

List ACLs.

get(, , ):
get/accounts/{account_id}/secondary_dns/acls/{acl_id}

Get ACL.

create(, ):
post/accounts/{account_id}/secondary_dns/acls

Create ACL.

update(, , ):
put/accounts/{account_id}/secondary_dns/acls/{acl_id}

Modify ACL.

delete(, , ):
delete/accounts/{account_id}/secondary_dns/acls/{acl_id}

Delete ACL.

Domain types

ACL{…}

DNS.ZoneTransfers.ForceAXFRResource

Methods

create(, ):
post/zones/{zone_id}/secondary_dns/force_axfr

Sends AXFR zone transfer request to primary nameserver(s).

Domain types

ForceAXFR = string

When force_axfr query parameter is set to true, the response is a simple string.

DNS.ZoneTransfers.IncomingResource

Methods

get(, ):
get/zones/{zone_id}/secondary_dns/incoming

Get secondary zone configuration for incoming zone transfers.

create(, ):
post/zones/{zone_id}/secondary_dns/incoming

Create secondary zone configuration for incoming zone transfers.

update(, ):
put/zones/{zone_id}/secondary_dns/incoming

Update secondary zone configuration for incoming zone transfers.

delete(, ):
delete/zones/{zone_id}/secondary_dns/incoming

Delete secondary zone configuration for incoming zone transfers.

Domain types

Incoming{…}

DNS.ZoneTransfers.OutgoingResource

Methods

get(, ):
get/zones/{zone_id}/secondary_dns/outgoing

Get primary zone configuration for outgoing zone transfers.

create(, ):
post/zones/{zone_id}/secondary_dns/outgoing

Create primary zone configuration for outgoing zone transfers.

update(, ):
put/zones/{zone_id}/secondary_dns/outgoing

Update primary zone configuration for outgoing zone transfers.

delete(, ):
delete/zones/{zone_id}/secondary_dns/outgoing

Delete primary zone configuration for outgoing zone transfers.

disable(, ):
post/zones/{zone_id}/secondary_dns/outgoing/disable

Disable outgoing zone transfers for primary zone and clears IXFR backlog of primary zone.

enable(, ):
post/zones/{zone_id}/secondary_dns/outgoing/enable

Enable outgoing zone transfers for primary zone.

forceNotify(, ):
post/zones/{zone_id}/secondary_dns/outgoing/force_notify

Notifies the secondary nameserver(s) and clears IXFR backlog of primary zone.

Domain types

DisableTransfer = string

The zone transfer status of a primary zone.

EnableTransfer = string

The zone transfer status of a primary zone.

Outgoing{…}
OutgoingStatus = string | null

The zone transfer status of a primary zone.

DNS.ZoneTransfers.OutgoingResource.Status

Methods

get(, ):
get/zones/{zone_id}/secondary_dns/outgoing/status

Get primary zone transfer status.

DNS.ZoneTransfers.Peers

Methods

list(, ): <>
get/accounts/{account_id}/secondary_dns/peers

List Peers.

get(, , ):
get/accounts/{account_id}/secondary_dns/peers/{peer_id}

Get Peer.

create(, ):
post/accounts/{account_id}/secondary_dns/peers

Create Peer.

update(, , ):
put/accounts/{account_id}/secondary_dns/peers/{peer_id}

Modify Peer.

delete(, , ):
delete/accounts/{account_id}/secondary_dns/peers/{peer_id}

Delete Peer.

Domain types

Peer{…}

DNS.ZoneTransfers.TSIGs

Methods

list(, ): <>
get/accounts/{account_id}/secondary_dns/tsigs

List TSIGs.

get(, , ):
get/accounts/{account_id}/secondary_dns/tsigs/{tsig_id}

Get TSIG.

create(, ):
post/accounts/{account_id}/secondary_dns/tsigs

Create TSIG.

update(, , ):
put/accounts/{account_id}/secondary_dns/tsigs/{tsig_id}

Modify TSIG.

delete(, , ):
delete/accounts/{account_id}/secondary_dns/tsigs/{tsig_id}

Delete TSIG.

Domain types

TSIG{…}