Skip to content
Start here

DNS

DNSDNSSEC

DNSSEC Details
client.DNS.DNSSEC.Get(ctx, query) (*DNSSEC, error)
GET/zones/{zone_id}/dnssec
Edit DNSSEC Status
client.DNS.DNSSEC.Edit(ctx, params) (*DNSSEC, error)
PATCH/zones/{zone_id}/dnssec
Delete DNSSEC records
client.DNS.DNSSEC.Delete(ctx, body) (*string, error)
DELETE/zones/{zone_id}/dnssec
ModelsExpand Collapse
type DNSSEC struct{…}
Algorithm stringoptional

Algorithm key code.

Digest stringoptional

Digest hash.

DigestAlgorithm stringoptional

Type of digest algorithm.

DigestType stringoptional

Coded type for digest algorithm.

DNSSECMultiSigner booloptional

If true, multi-signer DNSSEC is enabled on the zone, allowing multiple providers to serve a DNSSEC-signed zone at the same time. This is required for DNSKEY records (except those automatically generated by Cloudflare) to be added to the zone.

See Multi-signer DNSSEC for details.

DNSSECPresigned booloptional

If true, allows Cloudflare to transfer in a DNSSEC-signed zone including signatures from an external provider, without requiring Cloudflare to sign any records on the fly.

Note that this feature has some limitations. See Cloudflare as Secondary for details.

DNSSECUseNsec3 booloptional

If true, enables the use of NSEC3 together with DNSSEC on the zone. Combined with setting dnssec_presigned to true, this enables the use of NSEC3 records when transferring in from an external provider. If dnssec_presigned is instead set to false (default), NSEC3 records will be generated and signed at request time.

See DNSSEC with NSEC3 for details.

DS stringoptional

Full DS record.

Flags float64optional

Flag for DNSSEC record.

KeyTag float64optional

Code for key tag.

KeyType stringoptional

Algorithm key type.

ModifiedOn Timeoptional

When DNSSEC was last modified.

formatdate-time
PublicKey stringoptional

Public key for DS record.

Status DNSSECStatusoptional

Status of DNSSEC, based on user-desired state and presence of necessary records.

One of the following:
const DNSSECStatusActive DNSSECStatus = "active"
const DNSSECStatusPending DNSSECStatus = "pending"
const DNSSECStatusDisabled DNSSECStatus = "disabled"
const DNSSECStatusPendingDisabled DNSSECStatus = "pending-disabled"
const DNSSECStatusError DNSSECStatus = "error"

DNSRecords

List DNS Records
client.DNS.Records.List(ctx, params) (*V4PagePaginationArray[RecordResponse], error)
GET/zones/{zone_id}/dns_records
DNS Record Details
client.DNS.Records.Get(ctx, dnsRecordID, query) (*RecordResponse, error)
GET/zones/{zone_id}/dns_records/{dns_record_id}
Create DNS Record
client.DNS.Records.New(ctx, params) (*RecordResponse, error)
POST/zones/{zone_id}/dns_records
Overwrite DNS Record
client.DNS.Records.Update(ctx, dnsRecordID, params) (*RecordResponse, error)
PUT/zones/{zone_id}/dns_records/{dns_record_id}
Update DNS Record
client.DNS.Records.Edit(ctx, dnsRecordID, params) (*RecordResponse, error)
PATCH/zones/{zone_id}/dns_records/{dns_record_id}
Delete DNS Record
client.DNS.Records.Delete(ctx, dnsRecordID, body) (*RecordDeleteResponse, error)
DELETE/zones/{zone_id}/dns_records/{dns_record_id}
Export DNS Records
client.DNS.Records.Export(ctx, query) (*string, error)
GET/zones/{zone_id}/dns_records/export
Import DNS Records
client.DNS.Records.Import(ctx, params) (*RecordImportResponse, error)
POST/zones/{zone_id}/dns_records/import
Scan DNS Records
Deprecated
client.DNS.Records.Scan(ctx, params) (*RecordScanResponse, error)
POST/zones/{zone_id}/dns_records/scan
Trigger DNS Record Scan
client.DNS.Records.ScanTrigger(ctx, body) (*RecordScanTriggerResponse, error)
POST/zones/{zone_id}/dns_records/scan/trigger
Review Scanned DNS Records
client.DNS.Records.ScanReview(ctx, params) (*RecordScanReviewResponse, error)
POST/zones/{zone_id}/dns_records/scan/review
List Scanned DNS Records
client.DNS.Records.ScanList(ctx, query) (*SinglePage[RecordResponse], error)
GET/zones/{zone_id}/dns_records/scan/review
Batch DNS Records
client.DNS.Records.Batch(ctx, params) (*RecordBatchResponse, error)
POST/zones/{zone_id}/dns_records/batch
ModelsExpand Collapse
type ARecord struct{…}
Name string

Complete DNS record name, including the zone name, in Punycode.

maxLength255
minLength1
TTL TTL

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.

Type ARecordType

Record type.

Comment stringoptional

Comments or notes about the DNS record. This field has no effect on DNS responses.

Content stringoptional

A valid IPv4 address.

formatipv4
PrivateRouting booloptional

Enables private network routing to the origin.

Proxied booloptional

Whether the record is receiving the performance and security benefits of Cloudflare.

Settings ARecordSettingsoptional

Settings for the DNS record.

IPV4Only booloptional

When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

IPV6Only booloptional

When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

Tags []RecordTagsoptional

Custom tags for the DNS record. This field has no effect on DNS responses.

type AAAARecord struct{…}
Name string

Complete DNS record name, including the zone name, in Punycode.

maxLength255
minLength1
TTL TTL

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.

Type AAAARecordType

Record type.

Comment stringoptional

Comments or notes about the DNS record. This field has no effect on DNS responses.

Content stringoptional

A valid IPv6 address.

formatipv6
PrivateRouting booloptional

Enables private network routing to the origin.

Proxied booloptional

Whether the record is receiving the performance and security benefits of Cloudflare.

Settings AAAARecordSettingsoptional

Settings for the DNS record.

IPV4Only booloptional

When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

IPV6Only booloptional

When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

Tags []RecordTagsoptional

Custom tags for the DNS record. This field has no effect on DNS responses.

type BatchPatch interface{…}
One of the following:
BatchPatchARecord
ID string

Identifier.

maxLength32
BatchPatchAAAARecord
ID string

Identifier.

maxLength32
BatchPatchCNAMERecord
ID string

Identifier.

maxLength32
BatchPatchMXRecord
ID string

Identifier.

maxLength32
BatchPatchNSRecord
ID string

Identifier.

maxLength32
BatchPatchOpenpgpkeyRecord
ID string

Identifier.

maxLength32
Name string

Complete DNS record name, including the zone name, in Punycode.

maxLength255
minLength1
TTL TTL

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.

Type BatchPatchOpenpgpkeyRecordType

Record type.

Comment stringoptional

Comments or notes about the DNS record. This field has no effect on DNS responses.

Content stringoptional

A single Base64-encoded OpenPGP Transferable Public Key (RFC 4880 Section 11.1)

Proxied booloptional

Whether the record is receiving the performance and security benefits of Cloudflare.

Settings BatchPatchOpenpgpkeyRecordSettingsoptional

Settings for the DNS record.

IPV4Only booloptional

When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

IPV6Only booloptional

When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

Tags []RecordTagsoptional

Custom tags for the DNS record. This field has no effect on DNS responses.

BatchPatchPTRRecord
ID string

Identifier.

maxLength32
BatchPatchTXTRecord
ID string

Identifier.

maxLength32
BatchPatchCAARecord
ID string

Identifier.

maxLength32
BatchPatchCERTRecord
ID string

Identifier.

maxLength32
BatchPatchDNSKEYRecord
ID string

Identifier.

maxLength32
BatchPatchDSRecord
ID string

Identifier.

maxLength32
BatchPatchHTTPSRecord
ID string

Identifier.

maxLength32
BatchPatchLOCRecord
ID string

Identifier.

maxLength32
BatchPatchNAPTRRecord
ID string

Identifier.

maxLength32
BatchPatchSMIMEARecord
ID string

Identifier.

maxLength32
BatchPatchSRVRecord
ID string

Identifier.

maxLength32
BatchPatchSSHFPRecord
ID string

Identifier.

maxLength32
BatchPatchSVCBRecord
ID string

Identifier.

maxLength32
BatchPatchTLSARecord
ID string

Identifier.

maxLength32
BatchPatchURIRecord
ID string

Identifier.

maxLength32
type BatchPut interface{…}
One of the following:
BatchPutARecord
ID string

Identifier.

maxLength32
BatchPutAAAARecord
ID string

Identifier.

maxLength32
BatchPutCNAMERecord
ID string

Identifier.

maxLength32
BatchPutMXRecord
ID string

Identifier.

maxLength32
BatchPutNSRecord
ID string

Identifier.

maxLength32
BatchPutOpenpgpkeyRecord
ID string

Identifier.

maxLength32
Name string

Complete DNS record name, including the zone name, in Punycode.

maxLength255
minLength1
TTL TTL

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.

Type BatchPutOpenpgpkeyRecordType

Record type.

Comment stringoptional

Comments or notes about the DNS record. This field has no effect on DNS responses.

Content stringoptional

A single Base64-encoded OpenPGP Transferable Public Key (RFC 4880 Section 11.1)

Proxied booloptional

Whether the record is receiving the performance and security benefits of Cloudflare.

Settings BatchPutOpenpgpkeyRecordSettingsoptional

Settings for the DNS record.

IPV4Only booloptional

When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

IPV6Only booloptional

When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

Tags []RecordTagsoptional

Custom tags for the DNS record. This field has no effect on DNS responses.

BatchPutPTRRecord
ID string

Identifier.

maxLength32
BatchPutTXTRecord
ID string

Identifier.

maxLength32
BatchPutCAARecord
ID string

Identifier.

maxLength32
BatchPutCERTRecord
ID string

Identifier.

maxLength32
BatchPutDNSKEYRecord
ID string

Identifier.

maxLength32
BatchPutDSRecord
ID string

Identifier.

maxLength32
BatchPutHTTPSRecord
ID string

Identifier.

maxLength32
BatchPutLOCRecord
ID string

Identifier.

maxLength32
BatchPutNAPTRRecord
ID string

Identifier.

maxLength32
BatchPutSMIMEARecord
ID string

Identifier.

maxLength32
BatchPutSRVRecord
ID string

Identifier.

maxLength32
BatchPutSSHFPRecord
ID string

Identifier.

maxLength32
BatchPutSVCBRecord
ID string

Identifier.

maxLength32
BatchPutTLSARecord
ID string

Identifier.

maxLength32
BatchPutURIRecord
ID string

Identifier.

maxLength32
type CAARecord struct{…}
Name string

Complete DNS record name, including the zone name, in Punycode.

maxLength255
minLength1
TTL TTL

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.

Type CAARecordType

Record type.

Comment stringoptional

Comments or notes about the DNS record. This field has no effect on DNS responses.

Content stringoptional

Formatted CAA content. See 'data' to set CAA properties.

Data CAARecordDataoptional

Components of a CAA record.

Flags float64optional

Flags for the CAA record.

maximum255
minimum0
Tag stringoptional

Name of the property controlled by this record (e.g.: issue, issuewild, iodef).

Value stringoptional

Value of the record. This field's semantics depend on the chosen tag.

Proxied booloptional

Whether the record is receiving the performance and security benefits of Cloudflare.

Settings CAARecordSettingsoptional

Settings for the DNS record.

IPV4Only booloptional

When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

IPV6Only booloptional

When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

Tags []RecordTagsoptional

Custom tags for the DNS record. This field has no effect on DNS responses.

type CERTRecord struct{…}
Name string

Complete DNS record name, including the zone name, in Punycode.

maxLength255
minLength1
TTL TTL

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.

Type CERTRecordType

Record type.

Comment stringoptional

Comments or notes about the DNS record. This field has no effect on DNS responses.

Content stringoptional

Formatted CERT content. See 'data' to set CERT properties.

Data CERTRecordDataoptional

Components of a CERT record.

Algorithm float64optional

Algorithm.

maximum255
minimum0
Certificate stringoptional

Certificate.

KeyTag float64optional

Key Tag.

maximum65535
minimum0
Type float64optional

Type.

maximum65535
minimum0
Proxied booloptional

Whether the record is receiving the performance and security benefits of Cloudflare.

Settings CERTRecordSettingsoptional

Settings for the DNS record.

IPV4Only booloptional

When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

IPV6Only booloptional

When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

Tags []RecordTagsoptional

Custom tags for the DNS record. This field has no effect on DNS responses.

type CNAMERecord struct{…}
Name string

Complete DNS record name, including the zone name, in Punycode.

maxLength255
minLength1
TTL TTL

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.

Type CNAMERecordType

Record type.

Comment stringoptional

Comments or notes about the DNS record. This field has no effect on DNS responses.

Content stringoptional

A valid hostname. Must not match the record's name.

Proxied booloptional

Whether the record is receiving the performance and security benefits of Cloudflare.

Settings CNAMERecordSettingsoptional

Settings for the DNS record.

FlattenCNAME booloptional

If enabled, causes the CNAME record to be resolved externally and the resulting address records (e.g., A and AAAA) to be returned instead of the CNAME record itself. This setting is unavailable for proxied records, since they are always flattened.

IPV4Only booloptional

When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

IPV6Only booloptional

When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

Tags []RecordTagsoptional

Custom tags for the DNS record. This field has no effect on DNS responses.

type DNSKEYRecord struct{…}
Name string

Complete DNS record name, including the zone name, in Punycode.

maxLength255
minLength1
TTL TTL

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.

Type DNSKEYRecordType

Record type.

Comment stringoptional

Comments or notes about the DNS record. This field has no effect on DNS responses.

Content stringoptional

Formatted DNSKEY content. See 'data' to set DNSKEY properties.

Data DNSKEYRecordDataoptional

Components of a DNSKEY record.

Algorithm float64optional

Algorithm.

maximum255
minimum0
Flags float64optional

Flags.

maximum65535
minimum0
Protocol float64optional

Protocol.

maximum255
minimum0
PublicKey stringoptional

Public Key.

Proxied booloptional

Whether the record is receiving the performance and security benefits of Cloudflare.

Settings DNSKEYRecordSettingsoptional

Settings for the DNS record.

IPV4Only booloptional

When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

IPV6Only booloptional

When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

Tags []RecordTagsoptional

Custom tags for the DNS record. This field has no effect on DNS responses.

type DSRecord struct{…}
Name string

Complete DNS record name, including the zone name, in Punycode.

maxLength255
minLength1
TTL TTL

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.

Type DSRecordType

Record type.

Comment stringoptional

Comments or notes about the DNS record. This field has no effect on DNS responses.

Content stringoptional

Formatted DS content. See 'data' to set DS properties.

Data DSRecordDataoptional

Components of a DS record.

Algorithm float64optional

Algorithm.

maximum255
minimum0
Digest stringoptional

Digest.

DigestType float64optional

Digest Type.

maximum255
minimum0
KeyTag float64optional

Key Tag.

maximum65535
minimum0
Proxied booloptional

Whether the record is receiving the performance and security benefits of Cloudflare.

Settings DSRecordSettingsoptional

Settings for the DNS record.

IPV4Only booloptional

When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

IPV6Only booloptional

When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

Tags []RecordTagsoptional

Custom tags for the DNS record. This field has no effect on DNS responses.

type HTTPSRecord struct{…}
Name string

Complete DNS record name, including the zone name, in Punycode.

maxLength255
minLength1
TTL TTL

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.

Type HTTPSRecordType

Record type.

Comment stringoptional

Comments or notes about the DNS record. This field has no effect on DNS responses.

Content stringoptional

Formatted HTTPS content. See 'data' to set HTTPS properties.

Data HTTPSRecordDataoptional

Components of a HTTPS record.

Priority float64optional

Priority.

maximum65535
minimum0
Target stringoptional

Target.

Value stringoptional

Value.

Proxied booloptional

Whether the record is receiving the performance and security benefits of Cloudflare.

Settings HTTPSRecordSettingsoptional

Settings for the DNS record.

IPV4Only booloptional

When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

IPV6Only booloptional

When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

Tags []RecordTagsoptional

Custom tags for the DNS record. This field has no effect on DNS responses.

type LOCRecord struct{…}
Name string

Complete DNS record name, including the zone name, in Punycode.

maxLength255
minLength1
TTL TTL

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.

Type LOCRecordType

Record type.

Comment stringoptional

Comments or notes about the DNS record. This field has no effect on DNS responses.

Content stringoptional

Formatted LOC content. See 'data' to set LOC properties.

Data LOCRecordDataoptional

Components of a LOC record.

Altitude float64optional

Altitude of location in meters.

maximum42849672.95
minimum-100000
LatDegrees float64optional

Degrees of latitude.

maximum90
minimum0
LatDirection LOCRecordDataLatDirectionoptional

Latitude direction.

One of the following:
const LOCRecordDataLatDirectionN LOCRecordDataLatDirection = "N"
const LOCRecordDataLatDirectionS LOCRecordDataLatDirection = "S"
LatMinutes float64optional

Minutes of latitude.

maximum59
minimum0
LatSeconds float64optional

Seconds of latitude.

maximum59.999
minimum0
LongDegrees float64optional

Degrees of longitude.

maximum180
minimum0
LongDirection LOCRecordDataLongDirectionoptional

Longitude direction.

One of the following:
const LOCRecordDataLongDirectionE LOCRecordDataLongDirection = "E"
const LOCRecordDataLongDirectionW LOCRecordDataLongDirection = "W"
LongMinutes float64optional

Minutes of longitude.

maximum59
minimum0
LongSeconds float64optional

Seconds of longitude.

maximum59.999
minimum0
PrecisionHorz float64optional

Horizontal precision of location.

maximum90000000
minimum0
PrecisionVert float64optional

Vertical precision of location.

maximum90000000
minimum0
Size float64optional

Size of location in meters.

maximum90000000
minimum0
Proxied booloptional

Whether the record is receiving the performance and security benefits of Cloudflare.

Settings LOCRecordSettingsoptional

Settings for the DNS record.

IPV4Only booloptional

When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

IPV6Only booloptional

When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

Tags []RecordTagsoptional

Custom tags for the DNS record. This field has no effect on DNS responses.

type MXRecord struct{…}
Name string

Complete DNS record name, including the zone name, in Punycode.

maxLength255
minLength1
TTL TTL

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.

Type MXRecordType

Record type.

Comment stringoptional

Comments or notes about the DNS record. This field has no effect on DNS responses.

Content stringoptional

A valid mail server hostname.

formathostname
Priority float64optional

Required for MX and URI records; ignored for other record types (but may still be returned by the API). Records with lower priorities are preferred. This field is to be deprecated in favor of the priority field within the data map.

maximum65535
minimum0
Proxied booloptional

Whether the record is receiving the performance and security benefits of Cloudflare.

Settings MXRecordSettingsoptional

Settings for the DNS record.

IPV4Only booloptional

When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

IPV6Only booloptional

When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

Tags []RecordTagsoptional

Custom tags for the DNS record. This field has no effect on DNS responses.

type NAPTRRecord struct{…}
Name string

Complete DNS record name, including the zone name, in Punycode.

maxLength255
minLength1
TTL TTL

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.

Type NAPTRRecordType

Record type.

Comment stringoptional

Comments or notes about the DNS record. This field has no effect on DNS responses.

Content stringoptional

Formatted NAPTR content. See 'data' to set NAPTR properties.

Data NAPTRRecordDataoptional

Components of a NAPTR record.

Flags stringoptional

Flags.

Order float64optional

Order.

maximum65535
minimum0
Preference float64optional

Preference.

maximum65535
minimum0
Regex stringoptional

Regex.

Replacement stringoptional

Replacement.

Service stringoptional

Service.

Proxied booloptional

Whether the record is receiving the performance and security benefits of Cloudflare.

Settings NAPTRRecordSettingsoptional

Settings for the DNS record.

IPV4Only booloptional

When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

IPV6Only booloptional

When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

Tags []RecordTagsoptional

Custom tags for the DNS record. This field has no effect on DNS responses.

type NSRecord struct{…}
Name string

Complete DNS record name, including the zone name, in Punycode.

maxLength255
minLength1
TTL TTL

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.

Type NSRecordType

Record type.

Comment stringoptional

Comments or notes about the DNS record. This field has no effect on DNS responses.

Content stringoptional

A valid name server host name.

Proxied booloptional

Whether the record is receiving the performance and security benefits of Cloudflare.

Settings NSRecordSettingsoptional

Settings for the DNS record.

IPV4Only booloptional

When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

IPV6Only booloptional

When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

Tags []RecordTagsoptional

Custom tags for the DNS record. This field has no effect on DNS responses.

type PTRRecord struct{…}
Name string

Complete DNS record name, including the zone name, in Punycode.

maxLength255
minLength1
TTL TTL

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.

Type PTRRecordType

Record type.

Comment stringoptional

Comments or notes about the DNS record. This field has no effect on DNS responses.

Content stringoptional

Domain name pointing to the address.

Proxied booloptional

Whether the record is receiving the performance and security benefits of Cloudflare.

Settings PTRRecordSettingsoptional

Settings for the DNS record.

IPV4Only booloptional

When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

IPV6Only booloptional

When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

Tags []RecordTagsoptional

Custom tags for the DNS record. This field has no effect on DNS responses.

type Record interface{…}
One of the following:
type ARecord struct{…}
Name string

Complete DNS record name, including the zone name, in Punycode.

maxLength255
minLength1
TTL TTL

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.

Type ARecordType

Record type.

Comment stringoptional

Comments or notes about the DNS record. This field has no effect on DNS responses.

Content stringoptional

A valid IPv4 address.

formatipv4
PrivateRouting booloptional

Enables private network routing to the origin.

Proxied booloptional

Whether the record is receiving the performance and security benefits of Cloudflare.

Settings ARecordSettingsoptional

Settings for the DNS record.

IPV4Only booloptional

When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

IPV6Only booloptional

When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

Tags []RecordTagsoptional

Custom tags for the DNS record. This field has no effect on DNS responses.

type AAAARecord struct{…}
Name string

Complete DNS record name, including the zone name, in Punycode.

maxLength255
minLength1
TTL TTL

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.

Type AAAARecordType

Record type.

Comment stringoptional

Comments or notes about the DNS record. This field has no effect on DNS responses.

Content stringoptional

A valid IPv6 address.

formatipv6
PrivateRouting booloptional

Enables private network routing to the origin.

Proxied booloptional

Whether the record is receiving the performance and security benefits of Cloudflare.

Settings AAAARecordSettingsoptional

Settings for the DNS record.

IPV4Only booloptional

When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

IPV6Only booloptional

When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

Tags []RecordTagsoptional

Custom tags for the DNS record. This field has no effect on DNS responses.

type CNAMERecord struct{…}
Name string

Complete DNS record name, including the zone name, in Punycode.

maxLength255
minLength1
TTL TTL

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.

Type CNAMERecordType

Record type.

Comment stringoptional

Comments or notes about the DNS record. This field has no effect on DNS responses.

Content stringoptional

A valid hostname. Must not match the record's name.

Proxied booloptional

Whether the record is receiving the performance and security benefits of Cloudflare.

Settings CNAMERecordSettingsoptional

Settings for the DNS record.

FlattenCNAME booloptional

If enabled, causes the CNAME record to be resolved externally and the resulting address records (e.g., A and AAAA) to be returned instead of the CNAME record itself. This setting is unavailable for proxied records, since they are always flattened.

IPV4Only booloptional

When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

IPV6Only booloptional

When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

Tags []RecordTagsoptional

Custom tags for the DNS record. This field has no effect on DNS responses.

type MXRecord struct{…}
Name string

Complete DNS record name, including the zone name, in Punycode.

maxLength255
minLength1
TTL TTL

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.

Type MXRecordType

Record type.

Comment stringoptional

Comments or notes about the DNS record. This field has no effect on DNS responses.

Content stringoptional

A valid mail server hostname.

formathostname
Priority float64optional

Required for MX and URI records; ignored for other record types (but may still be returned by the API). Records with lower priorities are preferred. This field is to be deprecated in favor of the priority field within the data map.

maximum65535
minimum0
Proxied booloptional

Whether the record is receiving the performance and security benefits of Cloudflare.

Settings MXRecordSettingsoptional

Settings for the DNS record.

IPV4Only booloptional

When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

IPV6Only booloptional

When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

Tags []RecordTagsoptional

Custom tags for the DNS record. This field has no effect on DNS responses.

type NSRecord struct{…}
Name string

Complete DNS record name, including the zone name, in Punycode.

maxLength255
minLength1
TTL TTL

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.

Type NSRecordType

Record type.

Comment stringoptional

Comments or notes about the DNS record. This field has no effect on DNS responses.

Content stringoptional

A valid name server host name.

Proxied booloptional

Whether the record is receiving the performance and security benefits of Cloudflare.

Settings NSRecordSettingsoptional

Settings for the DNS record.

IPV4Only booloptional

When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

IPV6Only booloptional

When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

Tags []RecordTagsoptional

Custom tags for the DNS record. This field has no effect on DNS responses.

RecordOpenpgpkey
Name string

Complete DNS record name, including the zone name, in Punycode.

maxLength255
minLength1
TTL TTL

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.

Type RecordOpenpgpkeyType

Record type.

Comment stringoptional

Comments or notes about the DNS record. This field has no effect on DNS responses.

Content stringoptional

A single Base64-encoded OpenPGP Transferable Public Key (RFC 4880 Section 11.1)

Proxied booloptional

Whether the record is receiving the performance and security benefits of Cloudflare.

Settings RecordOpenpgpkeySettingsoptional

Settings for the DNS record.

IPV4Only booloptional

When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

IPV6Only booloptional

When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

Tags []RecordTagsoptional

Custom tags for the DNS record. This field has no effect on DNS responses.

type PTRRecord struct{…}
Name string

Complete DNS record name, including the zone name, in Punycode.

maxLength255
minLength1
TTL TTL

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.

Type PTRRecordType

Record type.

Comment stringoptional

Comments or notes about the DNS record. This field has no effect on DNS responses.

Content stringoptional

Domain name pointing to the address.

Proxied booloptional

Whether the record is receiving the performance and security benefits of Cloudflare.

Settings PTRRecordSettingsoptional

Settings for the DNS record.

IPV4Only booloptional

When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

IPV6Only booloptional

When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

Tags []RecordTagsoptional

Custom tags for the DNS record. This field has no effect on DNS responses.

type TXTRecord struct{…}
Name string

Complete DNS record name, including the zone name, in Punycode.

maxLength255
minLength1
TTL TTL

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.

Type TXTRecordType

Record type.

Comment stringoptional

Comments or notes about the DNS record. This field has no effect on DNS responses.

Content stringoptional

Text content for the record. The content must consist of quoted "character strings" (RFC 1035), each with a length of up to 255 bytes. Strings exceeding this allowed maximum length are automatically split.

Learn more at https://www.cloudflare.com/learning/dns/dns-records/dns-txt-record/.

Proxied booloptional

Whether the record is receiving the performance and security benefits of Cloudflare.

Settings TXTRecordSettingsoptional

Settings for the DNS record.

IPV4Only booloptional

When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

IPV6Only booloptional

When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

Tags []RecordTagsoptional

Custom tags for the DNS record. This field has no effect on DNS responses.

type CAARecord struct{…}
Name string

Complete DNS record name, including the zone name, in Punycode.

maxLength255
minLength1
TTL TTL

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.

Type CAARecordType

Record type.

Comment stringoptional

Comments or notes about the DNS record. This field has no effect on DNS responses.

Content stringoptional

Formatted CAA content. See 'data' to set CAA properties.

Data CAARecordDataoptional

Components of a CAA record.

Flags float64optional

Flags for the CAA record.

maximum255
minimum0
Tag stringoptional

Name of the property controlled by this record (e.g.: issue, issuewild, iodef).

Value stringoptional

Value of the record. This field's semantics depend on the chosen tag.

Proxied booloptional

Whether the record is receiving the performance and security benefits of Cloudflare.

Settings CAARecordSettingsoptional

Settings for the DNS record.

IPV4Only booloptional

When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

IPV6Only booloptional

When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

Tags []RecordTagsoptional

Custom tags for the DNS record. This field has no effect on DNS responses.

type CERTRecord struct{…}
Name string

Complete DNS record name, including the zone name, in Punycode.

maxLength255
minLength1
TTL TTL

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.

Type CERTRecordType

Record type.

Comment stringoptional

Comments or notes about the DNS record. This field has no effect on DNS responses.

Content stringoptional

Formatted CERT content. See 'data' to set CERT properties.

Data CERTRecordDataoptional

Components of a CERT record.

Algorithm float64optional

Algorithm.

maximum255
minimum0
Certificate stringoptional

Certificate.

KeyTag float64optional

Key Tag.

maximum65535
minimum0
Type float64optional

Type.

maximum65535
minimum0
Proxied booloptional

Whether the record is receiving the performance and security benefits of Cloudflare.

Settings CERTRecordSettingsoptional

Settings for the DNS record.

IPV4Only booloptional

When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

IPV6Only booloptional

When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

Tags []RecordTagsoptional

Custom tags for the DNS record. This field has no effect on DNS responses.

type DNSKEYRecord struct{…}
Name string

Complete DNS record name, including the zone name, in Punycode.

maxLength255
minLength1
TTL TTL

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.

Type DNSKEYRecordType

Record type.

Comment stringoptional

Comments or notes about the DNS record. This field has no effect on DNS responses.

Content stringoptional

Formatted DNSKEY content. See 'data' to set DNSKEY properties.

Data DNSKEYRecordDataoptional

Components of a DNSKEY record.

Algorithm float64optional

Algorithm.

maximum255
minimum0
Flags float64optional

Flags.

maximum65535
minimum0
Protocol float64optional

Protocol.

maximum255
minimum0
PublicKey stringoptional

Public Key.

Proxied booloptional

Whether the record is receiving the performance and security benefits of Cloudflare.

Settings DNSKEYRecordSettingsoptional

Settings for the DNS record.

IPV4Only booloptional

When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

IPV6Only booloptional

When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

Tags []RecordTagsoptional

Custom tags for the DNS record. This field has no effect on DNS responses.

type DSRecord struct{…}
Name string

Complete DNS record name, including the zone name, in Punycode.

maxLength255
minLength1
TTL TTL

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.

Type DSRecordType

Record type.

Comment stringoptional

Comments or notes about the DNS record. This field has no effect on DNS responses.

Content stringoptional

Formatted DS content. See 'data' to set DS properties.

Data DSRecordDataoptional

Components of a DS record.

Algorithm float64optional

Algorithm.

maximum255
minimum0
Digest stringoptional

Digest.

DigestType float64optional

Digest Type.

maximum255
minimum0
KeyTag float64optional

Key Tag.

maximum65535
minimum0
Proxied booloptional

Whether the record is receiving the performance and security benefits of Cloudflare.

Settings DSRecordSettingsoptional

Settings for the DNS record.

IPV4Only booloptional

When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

IPV6Only booloptional

When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

Tags []RecordTagsoptional

Custom tags for the DNS record. This field has no effect on DNS responses.

type HTTPSRecord struct{…}
Name string

Complete DNS record name, including the zone name, in Punycode.

maxLength255
minLength1
TTL TTL

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.

Type HTTPSRecordType

Record type.

Comment stringoptional

Comments or notes about the DNS record. This field has no effect on DNS responses.

Content stringoptional

Formatted HTTPS content. See 'data' to set HTTPS properties.

Data HTTPSRecordDataoptional

Components of a HTTPS record.

Priority float64optional

Priority.

maximum65535
minimum0
Target stringoptional

Target.

Value stringoptional

Value.

Proxied booloptional

Whether the record is receiving the performance and security benefits of Cloudflare.

Settings HTTPSRecordSettingsoptional

Settings for the DNS record.

IPV4Only booloptional

When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

IPV6Only booloptional

When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

Tags []RecordTagsoptional

Custom tags for the DNS record. This field has no effect on DNS responses.

type LOCRecord struct{…}
Name string

Complete DNS record name, including the zone name, in Punycode.

maxLength255
minLength1
TTL TTL

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.

Type LOCRecordType

Record type.

Comment stringoptional

Comments or notes about the DNS record. This field has no effect on DNS responses.

Content stringoptional

Formatted LOC content. See 'data' to set LOC properties.

Data LOCRecordDataoptional

Components of a LOC record.

Altitude float64optional

Altitude of location in meters.

maximum42849672.95
minimum-100000
LatDegrees float64optional

Degrees of latitude.

maximum90
minimum0
LatDirection LOCRecordDataLatDirectionoptional

Latitude direction.

One of the following:
const LOCRecordDataLatDirectionN LOCRecordDataLatDirection = "N"
const LOCRecordDataLatDirectionS LOCRecordDataLatDirection = "S"
LatMinutes float64optional

Minutes of latitude.

maximum59
minimum0
LatSeconds float64optional

Seconds of latitude.

maximum59.999
minimum0
LongDegrees float64optional

Degrees of longitude.

maximum180
minimum0
LongDirection LOCRecordDataLongDirectionoptional

Longitude direction.

One of the following:
const LOCRecordDataLongDirectionE LOCRecordDataLongDirection = "E"
const LOCRecordDataLongDirectionW LOCRecordDataLongDirection = "W"
LongMinutes float64optional

Minutes of longitude.

maximum59
minimum0
LongSeconds float64optional

Seconds of longitude.

maximum59.999
minimum0
PrecisionHorz float64optional

Horizontal precision of location.

maximum90000000
minimum0
PrecisionVert float64optional

Vertical precision of location.

maximum90000000
minimum0
Size float64optional

Size of location in meters.

maximum90000000
minimum0
Proxied booloptional

Whether the record is receiving the performance and security benefits of Cloudflare.

Settings LOCRecordSettingsoptional

Settings for the DNS record.

IPV4Only booloptional

When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

IPV6Only booloptional

When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

Tags []RecordTagsoptional

Custom tags for the DNS record. This field has no effect on DNS responses.

type NAPTRRecord struct{…}
Name string

Complete DNS record name, including the zone name, in Punycode.

maxLength255
minLength1
TTL TTL

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.

Type NAPTRRecordType

Record type.

Comment stringoptional

Comments or notes about the DNS record. This field has no effect on DNS responses.

Content stringoptional

Formatted NAPTR content. See 'data' to set NAPTR properties.

Data NAPTRRecordDataoptional

Components of a NAPTR record.

Flags stringoptional

Flags.

Order float64optional

Order.

maximum65535
minimum0
Preference float64optional

Preference.

maximum65535
minimum0
Regex stringoptional

Regex.

Replacement stringoptional

Replacement.

Service stringoptional

Service.

Proxied booloptional

Whether the record is receiving the performance and security benefits of Cloudflare.

Settings NAPTRRecordSettingsoptional

Settings for the DNS record.

IPV4Only booloptional

When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

IPV6Only booloptional

When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

Tags []RecordTagsoptional

Custom tags for the DNS record. This field has no effect on DNS responses.

type SMIMEARecord struct{…}
Name string

Complete DNS record name, including the zone name, in Punycode.

maxLength255
minLength1
TTL TTL

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.

Type SMIMEARecordType

Record type.

Comment stringoptional

Comments or notes about the DNS record. This field has no effect on DNS responses.

Content stringoptional

Formatted SMIMEA content. See 'data' to set SMIMEA properties.

Data SMIMEARecordDataoptional

Components of a SMIMEA record.

Certificate stringoptional

Certificate.

MatchingType float64optional

Matching Type.

maximum255
minimum0
Selector float64optional

Selector.

maximum255
minimum0
Usage float64optional

Usage.

maximum255
minimum0
Proxied booloptional

Whether the record is receiving the performance and security benefits of Cloudflare.

Settings SMIMEARecordSettingsoptional

Settings for the DNS record.

IPV4Only booloptional

When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

IPV6Only booloptional

When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

Tags []RecordTagsoptional

Custom tags for the DNS record. This field has no effect on DNS responses.

type SRVRecord struct{…}
Name string

Complete DNS record name, including the zone name, in Punycode.

maxLength255
minLength1
TTL TTL

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.

Type SRVRecordType

Record type.

Comment stringoptional

Comments or notes about the DNS record. This field has no effect on DNS responses.

Content stringoptional

Priority, weight, port, and SRV target. See 'data' for setting the individual component values.

Data SRVRecordDataoptional

Components of a SRV record.

Port float64optional

The port of the service.

maximum65535
minimum0
Priority float64optional

Required for MX and URI records; ignored for other record types (but may still be returned by the API). Records with lower priorities are preferred. This field is to be deprecated in favor of the priority field within the data map.

maximum65535
minimum0
Target stringoptional

A valid hostname.

formathostname
Weight float64optional

The record weight.

maximum65535
minimum0
Proxied booloptional

Whether the record is receiving the performance and security benefits of Cloudflare.

Settings SRVRecordSettingsoptional

Settings for the DNS record.

IPV4Only booloptional

When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

IPV6Only booloptional

When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

Tags []RecordTagsoptional

Custom tags for the DNS record. This field has no effect on DNS responses.

type SSHFPRecord struct{…}
Name string

Complete DNS record name, including the zone name, in Punycode.

maxLength255
minLength1
TTL TTL

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.

Type SSHFPRecordType

Record type.

Comment stringoptional

Comments or notes about the DNS record. This field has no effect on DNS responses.

Content stringoptional

Formatted SSHFP content. See 'data' to set SSHFP properties.

Data SSHFPRecordDataoptional

Components of a SSHFP record.

Algorithm float64optional

Algorithm.

maximum255
minimum0
Fingerprint stringoptional

Fingerprint.

Type float64optional

Type.

maximum255
minimum0
Proxied booloptional

Whether the record is receiving the performance and security benefits of Cloudflare.

Settings SSHFPRecordSettingsoptional

Settings for the DNS record.

IPV4Only booloptional

When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

IPV6Only booloptional

When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

Tags []RecordTagsoptional

Custom tags for the DNS record. This field has no effect on DNS responses.

type SVCBRecord struct{…}
Name string

Complete DNS record name, including the zone name, in Punycode.

maxLength255
minLength1
TTL TTL

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.

Type SVCBRecordType

Record type.

Comment stringoptional

Comments or notes about the DNS record. This field has no effect on DNS responses.

Content stringoptional

Formatted SVCB content. See 'data' to set SVCB properties.

Data SVCBRecordDataoptional

Components of a SVCB record.

Priority float64optional

Priority.

maximum65535
minimum0
Target stringoptional

Target.

Value stringoptional

Value.

Proxied booloptional

Whether the record is receiving the performance and security benefits of Cloudflare.

Settings SVCBRecordSettingsoptional

Settings for the DNS record.

IPV4Only booloptional

When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

IPV6Only booloptional

When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

Tags []RecordTagsoptional

Custom tags for the DNS record. This field has no effect on DNS responses.

type TLSARecord struct{…}
Name string

Complete DNS record name, including the zone name, in Punycode.

maxLength255
minLength1
TTL TTL

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.

Type TLSARecordType

Record type.

Comment stringoptional

Comments or notes about the DNS record. This field has no effect on DNS responses.

Content stringoptional

Formatted TLSA content. See 'data' to set TLSA properties.

Data TLSARecordDataoptional

Components of a TLSA record.

Certificate stringoptional

Certificate.

MatchingType float64optional

Matching Type.

maximum255
minimum0
Selector float64optional

Selector.

maximum255
minimum0
Usage float64optional

Usage.

maximum255
minimum0
Proxied booloptional

Whether the record is receiving the performance and security benefits of Cloudflare.

Settings TLSARecordSettingsoptional

Settings for the DNS record.

IPV4Only booloptional

When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

IPV6Only booloptional

When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

Tags []RecordTagsoptional

Custom tags for the DNS record. This field has no effect on DNS responses.

type URIRecord struct{…}
Name string

Complete DNS record name, including the zone name, in Punycode.

maxLength255
minLength1
TTL TTL

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.

Type URIRecordType

Record type.

Comment stringoptional

Comments or notes about the DNS record. This field has no effect on DNS responses.

Content stringoptional

Formatted URI content. See 'data' to set URI properties.

Data URIRecordDataoptional

Components of a URI record.

Target stringoptional

The record content.

Weight float64optional

The record weight.

maximum65535
minimum0
Priority float64optional

Required for MX and URI records; ignored for other record types (but may still be returned by the API). Records with lower priorities are preferred. This field is to be deprecated in favor of the priority field within the data map.

maximum65535
minimum0
Proxied booloptional

Whether the record is receiving the performance and security benefits of Cloudflare.

Settings URIRecordSettingsoptional

Settings for the DNS record.

IPV4Only booloptional

When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

IPV6Only booloptional

When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

Tags []RecordTagsoptional

Custom tags for the DNS record. This field has no effect on DNS responses.

type RecordResponse interface{…}
One of the following:
type RecordResponseA struct{…}
ID string

Identifier.

maxLength32
CreatedOn Time

When the record was created.

formatdate-time
Meta unknown

Extra Cloudflare-specific information about the record.

ModifiedOn Time

When the record was last modified.

formatdate-time
Proxiable bool

Whether the record can be proxied by Cloudflare or not.

CommentModifiedOn Timeoptional

When the record comment was last modified. Omitted if there is no comment.

formatdate-time
TagsModifiedOn Timeoptional

When the record tags were last modified. Omitted if there are no tags.

formatdate-time
type RecordResponseAAAA struct{…}
ID string

Identifier.

maxLength32
CreatedOn Time

When the record was created.

formatdate-time
Meta unknown

Extra Cloudflare-specific information about the record.

ModifiedOn Time

When the record was last modified.

formatdate-time
Proxiable bool

Whether the record can be proxied by Cloudflare or not.

CommentModifiedOn Timeoptional

When the record comment was last modified. Omitted if there is no comment.

formatdate-time
TagsModifiedOn Timeoptional

When the record tags were last modified. Omitted if there are no tags.

formatdate-time
type RecordResponseCNAME struct{…}
ID string

Identifier.

maxLength32
CreatedOn Time

When the record was created.

formatdate-time
Meta unknown

Extra Cloudflare-specific information about the record.

ModifiedOn Time

When the record was last modified.

formatdate-time
Proxiable bool

Whether the record can be proxied by Cloudflare or not.

CommentModifiedOn Timeoptional

When the record comment was last modified. Omitted if there is no comment.

formatdate-time
TagsModifiedOn Timeoptional

When the record tags were last modified. Omitted if there are no tags.

formatdate-time
type RecordResponseMX struct{…}
ID string

Identifier.

maxLength32
CreatedOn Time

When the record was created.

formatdate-time
Meta unknown

Extra Cloudflare-specific information about the record.

ModifiedOn Time

When the record was last modified.

formatdate-time
Proxiable bool

Whether the record can be proxied by Cloudflare or not.

CommentModifiedOn Timeoptional

When the record comment was last modified. Omitted if there is no comment.

formatdate-time
TagsModifiedOn Timeoptional

When the record tags were last modified. Omitted if there are no tags.

formatdate-time
type RecordResponseNS struct{…}
ID string

Identifier.

maxLength32
CreatedOn Time

When the record was created.

formatdate-time
Meta unknown

Extra Cloudflare-specific information about the record.

ModifiedOn Time

When the record was last modified.

formatdate-time
Proxiable bool

Whether the record can be proxied by Cloudflare or not.

CommentModifiedOn Timeoptional

When the record comment was last modified. Omitted if there is no comment.

formatdate-time
TagsModifiedOn Timeoptional

When the record tags were last modified. Omitted if there are no tags.

formatdate-time
type RecordResponseOpenpgpkey struct{…}
ID string

Identifier.

maxLength32
Comment string

Comments or notes about the DNS record. This field has no effect on DNS responses.

Content string

A single Base64-encoded OpenPGP Transferable Public Key (RFC 4880 Section 11.1)

CreatedOn Time

When the record was created.

formatdate-time
Meta unknown

Extra Cloudflare-specific information about the record.

ModifiedOn Time

When the record was last modified.

formatdate-time
Name string

Complete DNS record name, including the zone name, in Punycode.

maxLength255
minLength1
Proxiable bool

Whether the record can be proxied by Cloudflare or not.

Proxied bool

Whether the record is receiving the performance and security benefits of Cloudflare.

Settings RecordResponseOpenpgpkeySettings

Settings for the DNS record.

IPV4Only booloptional

When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

IPV6Only booloptional

When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

Tags []RecordTags

Custom tags for the DNS record. This field has no effect on DNS responses.

TTL TTL

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.

Type RecordResponseOpenpgpkeyType

Record type.

CommentModifiedOn Timeoptional

When the record comment was last modified. Omitted if there is no comment.

formatdate-time
TagsModifiedOn Timeoptional

When the record tags were last modified. Omitted if there are no tags.

formatdate-time
type RecordResponsePTR struct{…}
ID string

Identifier.

maxLength32
CreatedOn Time

When the record was created.

formatdate-time
Meta unknown

Extra Cloudflare-specific information about the record.

ModifiedOn Time

When the record was last modified.

formatdate-time
Proxiable bool

Whether the record can be proxied by Cloudflare or not.

CommentModifiedOn Timeoptional

When the record comment was last modified. Omitted if there is no comment.

formatdate-time
TagsModifiedOn Timeoptional

When the record tags were last modified. Omitted if there are no tags.

formatdate-time
type RecordResponseTXT struct{…}
ID string

Identifier.

maxLength32
CreatedOn Time

When the record was created.

formatdate-time
Meta unknown

Extra Cloudflare-specific information about the record.

ModifiedOn Time

When the record was last modified.

formatdate-time
Proxiable bool

Whether the record can be proxied by Cloudflare or not.

CommentModifiedOn Timeoptional

When the record comment was last modified. Omitted if there is no comment.

formatdate-time
TagsModifiedOn Timeoptional

When the record tags were last modified. Omitted if there are no tags.

formatdate-time
type RecordResponseCAA struct{…}
ID string

Identifier.

maxLength32
CreatedOn Time

When the record was created.

formatdate-time
Meta unknown

Extra Cloudflare-specific information about the record.

ModifiedOn Time

When the record was last modified.

formatdate-time
Proxiable bool

Whether the record can be proxied by Cloudflare or not.

CommentModifiedOn Timeoptional

When the record comment was last modified. Omitted if there is no comment.

formatdate-time
TagsModifiedOn Timeoptional

When the record tags were last modified. Omitted if there are no tags.

formatdate-time
type RecordResponseCERT struct{…}
ID string

Identifier.

maxLength32
CreatedOn Time

When the record was created.

formatdate-time
Meta unknown

Extra Cloudflare-specific information about the record.

ModifiedOn Time

When the record was last modified.

formatdate-time
Proxiable bool

Whether the record can be proxied by Cloudflare or not.

CommentModifiedOn Timeoptional

When the record comment was last modified. Omitted if there is no comment.

formatdate-time
TagsModifiedOn Timeoptional

When the record tags were last modified. Omitted if there are no tags.

formatdate-time
type RecordResponseDNSKEY struct{…}
ID string

Identifier.

maxLength32
CreatedOn Time

When the record was created.

formatdate-time
Meta unknown

Extra Cloudflare-specific information about the record.

ModifiedOn Time

When the record was last modified.

formatdate-time
Proxiable bool

Whether the record can be proxied by Cloudflare or not.

CommentModifiedOn Timeoptional

When the record comment was last modified. Omitted if there is no comment.

formatdate-time
TagsModifiedOn Timeoptional

When the record tags were last modified. Omitted if there are no tags.

formatdate-time
type RecordResponseDS struct{…}
ID string

Identifier.

maxLength32
CreatedOn Time

When the record was created.

formatdate-time
Meta unknown

Extra Cloudflare-specific information about the record.

ModifiedOn Time

When the record was last modified.

formatdate-time
Proxiable bool

Whether the record can be proxied by Cloudflare or not.

CommentModifiedOn Timeoptional

When the record comment was last modified. Omitted if there is no comment.

formatdate-time
TagsModifiedOn Timeoptional

When the record tags were last modified. Omitted if there are no tags.

formatdate-time
type RecordResponseHTTPS struct{…}
ID string

Identifier.

maxLength32
CreatedOn Time

When the record was created.

formatdate-time
Meta unknown

Extra Cloudflare-specific information about the record.

ModifiedOn Time

When the record was last modified.

formatdate-time
Proxiable bool

Whether the record can be proxied by Cloudflare or not.

CommentModifiedOn Timeoptional

When the record comment was last modified. Omitted if there is no comment.

formatdate-time
TagsModifiedOn Timeoptional

When the record tags were last modified. Omitted if there are no tags.

formatdate-time
type RecordResponseLOC struct{…}
ID string

Identifier.

maxLength32
CreatedOn Time

When the record was created.

formatdate-time
Meta unknown

Extra Cloudflare-specific information about the record.

ModifiedOn Time

When the record was last modified.

formatdate-time
Proxiable bool

Whether the record can be proxied by Cloudflare or not.

CommentModifiedOn Timeoptional

When the record comment was last modified. Omitted if there is no comment.

formatdate-time
TagsModifiedOn Timeoptional

When the record tags were last modified. Omitted if there are no tags.

formatdate-time
type RecordResponseNAPTR struct{…}
ID string

Identifier.

maxLength32
CreatedOn Time

When the record was created.

formatdate-time
Meta unknown

Extra Cloudflare-specific information about the record.

ModifiedOn Time

When the record was last modified.

formatdate-time
Proxiable bool

Whether the record can be proxied by Cloudflare or not.

CommentModifiedOn Timeoptional

When the record comment was last modified. Omitted if there is no comment.

formatdate-time
TagsModifiedOn Timeoptional

When the record tags were last modified. Omitted if there are no tags.

formatdate-time
type RecordResponseSMIMEA struct{…}
ID string

Identifier.

maxLength32
CreatedOn Time

When the record was created.

formatdate-time
Meta unknown

Extra Cloudflare-specific information about the record.

ModifiedOn Time

When the record was last modified.

formatdate-time
Proxiable bool

Whether the record can be proxied by Cloudflare or not.

CommentModifiedOn Timeoptional

When the record comment was last modified. Omitted if there is no comment.

formatdate-time
TagsModifiedOn Timeoptional

When the record tags were last modified. Omitted if there are no tags.

formatdate-time
type RecordResponseSRV struct{…}
ID string

Identifier.

maxLength32
CreatedOn Time

When the record was created.

formatdate-time
Meta unknown

Extra Cloudflare-specific information about the record.

ModifiedOn Time

When the record was last modified.

formatdate-time
Proxiable bool

Whether the record can be proxied by Cloudflare or not.

CommentModifiedOn Timeoptional

When the record comment was last modified. Omitted if there is no comment.

formatdate-time
TagsModifiedOn Timeoptional

When the record tags were last modified. Omitted if there are no tags.

formatdate-time
type RecordResponseSSHFP struct{…}
ID string

Identifier.

maxLength32
CreatedOn Time

When the record was created.

formatdate-time
Meta unknown

Extra Cloudflare-specific information about the record.

ModifiedOn Time

When the record was last modified.

formatdate-time
Proxiable bool

Whether the record can be proxied by Cloudflare or not.

CommentModifiedOn Timeoptional

When the record comment was last modified. Omitted if there is no comment.

formatdate-time
TagsModifiedOn Timeoptional

When the record tags were last modified. Omitted if there are no tags.

formatdate-time
type RecordResponseSVCB struct{…}
ID string

Identifier.

maxLength32
CreatedOn Time

When the record was created.

formatdate-time
Meta unknown

Extra Cloudflare-specific information about the record.

ModifiedOn Time

When the record was last modified.

formatdate-time
Proxiable bool

Whether the record can be proxied by Cloudflare or not.

CommentModifiedOn Timeoptional

When the record comment was last modified. Omitted if there is no comment.

formatdate-time
TagsModifiedOn Timeoptional

When the record tags were last modified. Omitted if there are no tags.

formatdate-time
type RecordResponseTLSA struct{…}
ID string

Identifier.

maxLength32
CreatedOn Time

When the record was created.

formatdate-time
Meta unknown

Extra Cloudflare-specific information about the record.

ModifiedOn Time

When the record was last modified.

formatdate-time
Proxiable bool

Whether the record can be proxied by Cloudflare or not.

CommentModifiedOn Timeoptional

When the record comment was last modified. Omitted if there is no comment.

formatdate-time
TagsModifiedOn Timeoptional

When the record tags were last modified. Omitted if there are no tags.

formatdate-time
type RecordResponseURI struct{…}
ID string

Identifier.

maxLength32
CreatedOn Time

When the record was created.

formatdate-time
Meta unknown

Extra Cloudflare-specific information about the record.

ModifiedOn Time

When the record was last modified.

formatdate-time
Proxiable bool

Whether the record can be proxied by Cloudflare or not.

CommentModifiedOn Timeoptional

When the record comment was last modified. Omitted if there is no comment.

formatdate-time
TagsModifiedOn Timeoptional

When the record tags were last modified. Omitted if there are no tags.

formatdate-time
type RecordTags string

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

type SMIMEARecord struct{…}
Name string

Complete DNS record name, including the zone name, in Punycode.

maxLength255
minLength1
TTL TTL

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.

Type SMIMEARecordType

Record type.

Comment stringoptional

Comments or notes about the DNS record. This field has no effect on DNS responses.

Content stringoptional

Formatted SMIMEA content. See 'data' to set SMIMEA properties.

Data SMIMEARecordDataoptional

Components of a SMIMEA record.

Certificate stringoptional

Certificate.

MatchingType float64optional

Matching Type.

maximum255
minimum0
Selector float64optional

Selector.

maximum255
minimum0
Usage float64optional

Usage.

maximum255
minimum0
Proxied booloptional

Whether the record is receiving the performance and security benefits of Cloudflare.

Settings SMIMEARecordSettingsoptional

Settings for the DNS record.

IPV4Only booloptional

When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

IPV6Only booloptional

When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

Tags []RecordTagsoptional

Custom tags for the DNS record. This field has no effect on DNS responses.

type SRVRecord struct{…}
Name string

Complete DNS record name, including the zone name, in Punycode.

maxLength255
minLength1
TTL TTL

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.

Type SRVRecordType

Record type.

Comment stringoptional

Comments or notes about the DNS record. This field has no effect on DNS responses.

Content stringoptional

Priority, weight, port, and SRV target. See 'data' for setting the individual component values.

Data SRVRecordDataoptional

Components of a SRV record.

Port float64optional

The port of the service.

maximum65535
minimum0
Priority float64optional

Required for MX and URI records; ignored for other record types (but may still be returned by the API). Records with lower priorities are preferred. This field is to be deprecated in favor of the priority field within the data map.

maximum65535
minimum0
Target stringoptional

A valid hostname.

formathostname
Weight float64optional

The record weight.

maximum65535
minimum0
Proxied booloptional

Whether the record is receiving the performance and security benefits of Cloudflare.

Settings SRVRecordSettingsoptional

Settings for the DNS record.

IPV4Only booloptional

When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

IPV6Only booloptional

When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

Tags []RecordTagsoptional

Custom tags for the DNS record. This field has no effect on DNS responses.

type SSHFPRecord struct{…}
Name string

Complete DNS record name, including the zone name, in Punycode.

maxLength255
minLength1
TTL TTL

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.

Type SSHFPRecordType

Record type.

Comment stringoptional

Comments or notes about the DNS record. This field has no effect on DNS responses.

Content stringoptional

Formatted SSHFP content. See 'data' to set SSHFP properties.

Data SSHFPRecordDataoptional

Components of a SSHFP record.

Algorithm float64optional

Algorithm.

maximum255
minimum0
Fingerprint stringoptional

Fingerprint.

Type float64optional

Type.

maximum255
minimum0
Proxied booloptional

Whether the record is receiving the performance and security benefits of Cloudflare.

Settings SSHFPRecordSettingsoptional

Settings for the DNS record.

IPV4Only booloptional

When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

IPV6Only booloptional

When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

Tags []RecordTagsoptional

Custom tags for the DNS record. This field has no effect on DNS responses.

type SVCBRecord struct{…}
Name string

Complete DNS record name, including the zone name, in Punycode.

maxLength255
minLength1
TTL TTL

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.

Type SVCBRecordType

Record type.

Comment stringoptional

Comments or notes about the DNS record. This field has no effect on DNS responses.

Content stringoptional

Formatted SVCB content. See 'data' to set SVCB properties.

Data SVCBRecordDataoptional

Components of a SVCB record.

Priority float64optional

Priority.

maximum65535
minimum0
Target stringoptional

Target.

Value stringoptional

Value.

Proxied booloptional

Whether the record is receiving the performance and security benefits of Cloudflare.

Settings SVCBRecordSettingsoptional

Settings for the DNS record.

IPV4Only booloptional

When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

IPV6Only booloptional

When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

Tags []RecordTagsoptional

Custom tags for the DNS record. This field has no effect on DNS responses.

type TLSARecord struct{…}
Name string

Complete DNS record name, including the zone name, in Punycode.

maxLength255
minLength1
TTL TTL

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.

Type TLSARecordType

Record type.

Comment stringoptional

Comments or notes about the DNS record. This field has no effect on DNS responses.

Content stringoptional

Formatted TLSA content. See 'data' to set TLSA properties.

Data TLSARecordDataoptional

Components of a TLSA record.

Certificate stringoptional

Certificate.

MatchingType float64optional

Matching Type.

maximum255
minimum0
Selector float64optional

Selector.

maximum255
minimum0
Usage float64optional

Usage.

maximum255
minimum0
Proxied booloptional

Whether the record is receiving the performance and security benefits of Cloudflare.

Settings TLSARecordSettingsoptional

Settings for the DNS record.

IPV4Only booloptional

When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

IPV6Only booloptional

When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

Tags []RecordTagsoptional

Custom tags for the DNS record. This field has no effect on DNS responses.

type TTL interface{…}

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.

One of the following:
float64
type TTL float64

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.

type TXTRecord struct{…}
Name string

Complete DNS record name, including the zone name, in Punycode.

maxLength255
minLength1
TTL TTL

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.

Type TXTRecordType

Record type.

Comment stringoptional

Comments or notes about the DNS record. This field has no effect on DNS responses.

Content stringoptional

Text content for the record. The content must consist of quoted "character strings" (RFC 1035), each with a length of up to 255 bytes. Strings exceeding this allowed maximum length are automatically split.

Learn more at https://www.cloudflare.com/learning/dns/dns-records/dns-txt-record/.

Proxied booloptional

Whether the record is receiving the performance and security benefits of Cloudflare.

Settings TXTRecordSettingsoptional

Settings for the DNS record.

IPV4Only booloptional

When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

IPV6Only booloptional

When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

Tags []RecordTagsoptional

Custom tags for the DNS record. This field has no effect on DNS responses.

type URIRecord struct{…}
Name string

Complete DNS record name, including the zone name, in Punycode.

maxLength255
minLength1
TTL TTL

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.

Type URIRecordType

Record type.

Comment stringoptional

Comments or notes about the DNS record. This field has no effect on DNS responses.

Content stringoptional

Formatted URI content. See 'data' to set URI properties.

Data URIRecordDataoptional

Components of a URI record.

Target stringoptional

The record content.

Weight float64optional

The record weight.

maximum65535
minimum0
Priority float64optional

Required for MX and URI records; ignored for other record types (but may still be returned by the API). Records with lower priorities are preferred. This field is to be deprecated in favor of the priority field within the data map.

maximum65535
minimum0
Proxied booloptional

Whether the record is receiving the performance and security benefits of Cloudflare.

Settings URIRecordSettingsoptional

Settings for the DNS record.

IPV4Only booloptional

When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

IPV6Only booloptional

When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.

Tags []RecordTagsoptional

Custom tags for the DNS record. This field has no effect on DNS responses.

DNSUsage

DNSUsageZone

DNSUsageAccount

DNSSettings

DNSSettingsZone

Show DNS Settings
client.DNS.Settings.Zone.Get(ctx, query) (*SettingZoneGetResponse, error)
GET/zones/{zone_id}/dns_settings
Update DNS Settings
client.DNS.Settings.Zone.Edit(ctx, params) (*SettingZoneEditResponse, error)
PATCH/zones/{zone_id}/dns_settings

DNSSettingsAccount

Show DNS Settings
client.DNS.Settings.Account.Get(ctx, query) (*SettingAccountGetResponse, error)
GET/accounts/{account_id}/dns_settings
Update DNS Settings
client.DNS.Settings.Account.Edit(ctx, params) (*SettingAccountEditResponse, error)
PATCH/accounts/{account_id}/dns_settings

DNSSettingsAccountViews

List Internal DNS Views
client.DNS.Settings.Account.Views.List(ctx, params) (*V4PagePaginationArray[SettingAccountViewListResponse], error)
GET/accounts/{account_id}/dns_settings/views
DNS Internal View Details
client.DNS.Settings.Account.Views.Get(ctx, viewID, query) (*SettingAccountViewGetResponse, error)
GET/accounts/{account_id}/dns_settings/views/{view_id}
Create Internal DNS View
client.DNS.Settings.Account.Views.New(ctx, params) (*SettingAccountViewNewResponse, error)
POST/accounts/{account_id}/dns_settings/views
Update Internal DNS View
client.DNS.Settings.Account.Views.Edit(ctx, viewID, params) (*SettingAccountViewEditResponse, error)
PATCH/accounts/{account_id}/dns_settings/views/{view_id}
Delete Internal DNS View
client.DNS.Settings.Account.Views.Delete(ctx, viewID, body) (*SettingAccountViewDeleteResponse, error)
DELETE/accounts/{account_id}/dns_settings/views/{view_id}

DNSAnalytics

DNSAnalyticsReports

Table
client.DNS.Analytics.Reports.Get(ctx, params) (*Report, error)
GET/zones/{zone_id}/dns_analytics/report
ModelsExpand Collapse
type Report struct{…}
Data []ReportData

Array with one row per combination of dimension values.

Dimensions []string

Array of dimension values, representing the combination of dimension values corresponding to this row.

Metrics []float64

Array with one item per requested metric. Each item is a single value.

DataLag float64

Number of seconds between current time and last processed event, in another words how many seconds of data could be missing.

minimum0
Max unknown

Maximum results for each metric (object mapping metric names to values). Currently always an empty object.

Min unknown

Minimum results for each metric (object mapping metric names to values). Currently always an empty object.

Query ReportQuery
Dimensions []string

Array of dimension names.

Limit int64

Limit number of returned metrics.

Metrics []string

Array of metric names.

Since Time

Start date and time of requesting data period in ISO 8601 format.

formatdate-time
Until Time

End date and time of requesting data period in ISO 8601 format.

formatdate-time
Filters stringoptional

Segmentation filter in 'attribute operator value' format.

Sort []stringoptional

Array of dimensions to sort by, where each dimension may be prefixed by - (descending) or + (ascending).

Rows float64

Total number of rows in the result.

minimum0
Totals unknown

Total results for metrics across all data (object mapping metric names to values).

DNSAnalyticsReportsBytimes

By Time
client.DNS.Analytics.Reports.Bytimes.Get(ctx, params) (*ByTime, error)
GET/zones/{zone_id}/dns_analytics/report/bytime
ModelsExpand Collapse
type ByTime struct{…}
Data []ByTimeData

Array with one row per combination of dimension values.

Dimensions []string

Array of dimension values, representing the combination of dimension values corresponding to this row.

Metrics [][]float64

Array with one item per requested metric. Each item is an array of values, broken down by time interval.

DataLag float64

Number of seconds between current time and last processed event, in another words how many seconds of data could be missing.

minimum0
Max unknown

Maximum results for each metric (object mapping metric names to values). Currently always an empty object.

Min unknown

Minimum results for each metric (object mapping metric names to values). Currently always an empty object.

Query ByTimeQuery
Dimensions []string

Array of dimension names.

Limit int64

Limit number of returned metrics.

Metrics []string

Array of metric names.

Since Time

Start date and time of requesting data period in ISO 8601 format.

formatdate-time
TimeDelta ByTimeQueryTimeDelta

Unit of time to group data by.

One of the following:
const ByTimeQueryTimeDeltaAll ByTimeQueryTimeDelta = "all"
const ByTimeQueryTimeDeltaAuto ByTimeQueryTimeDelta = "auto"
const ByTimeQueryTimeDeltaYear ByTimeQueryTimeDelta = "year"
const ByTimeQueryTimeDeltaQuarter ByTimeQueryTimeDelta = "quarter"
const ByTimeQueryTimeDeltaMonth ByTimeQueryTimeDelta = "month"
const ByTimeQueryTimeDeltaWeek ByTimeQueryTimeDelta = "week"
const ByTimeQueryTimeDeltaDay ByTimeQueryTimeDelta = "day"
const ByTimeQueryTimeDeltaHour ByTimeQueryTimeDelta = "hour"
const ByTimeQueryTimeDeltaDekaminute ByTimeQueryTimeDelta = "dekaminute"
const ByTimeQueryTimeDeltaMinute ByTimeQueryTimeDelta = "minute"
Until Time

End date and time of requesting data period in ISO 8601 format.

formatdate-time
Filters stringoptional

Segmentation filter in 'attribute operator value' format.

Sort []stringoptional

Array of dimensions to sort by, where each dimension may be prefixed by - (descending) or + (ascending).

Rows float64

Total number of rows in the result.

minimum0
TimeIntervals [][]Time

Array of time intervals in the response data. Each interval is represented as an array containing two values: the start time, and the end time.

Totals unknown

Total results for metrics across all data (object mapping metric names to values).

DNSZone Transfers

DNSZone TransfersForce AXFR

Force AXFR
client.DNS.ZoneTransfers.ForceAXFR.New(ctx, params) (*ForceAXFR, error)
POST/zones/{zone_id}/secondary_dns/force_axfr
ModelsExpand Collapse
type ForceAXFR string

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

DNSZone TransfersIncoming

Secondary Zone Configuration Details
client.DNS.ZoneTransfers.Incoming.Get(ctx, query) (*ZoneTransferIncomingGetResponse, error)
GET/zones/{zone_id}/secondary_dns/incoming
Create Secondary Zone Configuration
client.DNS.ZoneTransfers.Incoming.New(ctx, params) (*ZoneTransferIncomingNewResponse, error)
POST/zones/{zone_id}/secondary_dns/incoming
Update Secondary Zone Configuration
client.DNS.ZoneTransfers.Incoming.Update(ctx, params) (*ZoneTransferIncomingUpdateResponse, error)
PUT/zones/{zone_id}/secondary_dns/incoming
Delete Secondary Zone Configuration
client.DNS.ZoneTransfers.Incoming.Delete(ctx, body) (*ZoneTransferIncomingDeleteResponse, error)
DELETE/zones/{zone_id}/secondary_dns/incoming
ModelsExpand Collapse
type Incoming struct{…}
ID stringoptional
AutoRefreshSeconds float64optional

How often should a secondary zone auto refresh regardless of DNS NOTIFY. Not applicable for primary zones.

minimum300
CheckedTime stringoptional

The time for a specific event.

CreatedTime stringoptional

The time for a specific event.

ModifiedTime stringoptional

The time for a specific event.

Name stringoptional

Zone name.

Peers []stringoptional

A list of peer tags.

SOASerial float64optional

The serial number of the SOA for the given zone.

DNSZone TransfersOutgoing

Primary Zone Configuration Details
client.DNS.ZoneTransfers.Outgoing.Get(ctx, query) (*ZoneTransferOutgoingGetResponse, error)
GET/zones/{zone_id}/secondary_dns/outgoing
Create Primary Zone Configuration
client.DNS.ZoneTransfers.Outgoing.New(ctx, params) (*ZoneTransferOutgoingNewResponse, error)
POST/zones/{zone_id}/secondary_dns/outgoing
Update Primary Zone Configuration
client.DNS.ZoneTransfers.Outgoing.Update(ctx, params) (*ZoneTransferOutgoingUpdateResponse, error)
PUT/zones/{zone_id}/secondary_dns/outgoing
Delete Primary Zone Configuration
client.DNS.ZoneTransfers.Outgoing.Delete(ctx, body) (*ZoneTransferOutgoingDeleteResponse, error)
DELETE/zones/{zone_id}/secondary_dns/outgoing
Disable Outgoing Zone Transfers
client.DNS.ZoneTransfers.Outgoing.Disable(ctx, params) (*DisableTransfer, error)
POST/zones/{zone_id}/secondary_dns/outgoing/disable
Enable Outgoing Zone Transfers
client.DNS.ZoneTransfers.Outgoing.Enable(ctx, params) (*EnableTransfer, error)
POST/zones/{zone_id}/secondary_dns/outgoing/enable
Force DNS NOTIFY
client.DNS.ZoneTransfers.Outgoing.ForceNotify(ctx, params) (*string, error)
POST/zones/{zone_id}/secondary_dns/outgoing/force_notify
ModelsExpand Collapse
type DisableTransfer string

The zone transfer status of a primary zone.

type EnableTransfer string

The zone transfer status of a primary zone.

type Outgoing struct{…}
ID stringoptional
CheckedTime stringoptional

The time for a specific event.

CreatedTime stringoptional

The time for a specific event.

LastTransferredTime stringoptional

The time for a specific event.

Name stringoptional

Zone name.

Peers []stringoptional

A list of peer tags.

SOASerial float64optional

The serial number of the SOA for the given zone.

type OutgoingStatus string

The zone transfer status of a primary zone.

DNSZone TransfersOutgoingStatus

Get Outgoing Zone Transfer Status
client.DNS.ZoneTransfers.Outgoing.Status.Get(ctx, query) (*EnableTransfer, error)
GET/zones/{zone_id}/secondary_dns/outgoing/status

DNSZone TransfersACLs

List ACLs
client.DNS.ZoneTransfers.ACLs.List(ctx, query) (*SinglePage[ACL], error)
GET/accounts/{account_id}/secondary_dns/acls
ACL Details
client.DNS.ZoneTransfers.ACLs.Get(ctx, aclID, query) (*ACL, error)
GET/accounts/{account_id}/secondary_dns/acls/{acl_id}
Create ACL
client.DNS.ZoneTransfers.ACLs.New(ctx, params) (*ACL, error)
POST/accounts/{account_id}/secondary_dns/acls
Update ACL
client.DNS.ZoneTransfers.ACLs.Update(ctx, aclID, params) (*ACL, error)
PUT/accounts/{account_id}/secondary_dns/acls/{acl_id}
Delete ACL
client.DNS.ZoneTransfers.ACLs.Delete(ctx, aclID, body) (*ZoneTransferACLDeleteResponse, error)
DELETE/accounts/{account_id}/secondary_dns/acls/{acl_id}
ModelsExpand Collapse
type ACL struct{…}
ID string
IPRange string

Allowed IPv4/IPv6 address range of primary or secondary nameservers. This will be applied for the entire account. The IP range is used to allow additional NOTIFY IPs for secondary zones and IPs Cloudflare allows AXFR/IXFR requests from for primary zones. CIDRs are limited to a maximum of /24 for IPv4 and /64 for IPv6 respectively.

Name string

The name of the acl.

DNSZone TransfersPeers

List Peers
client.DNS.ZoneTransfers.Peers.List(ctx, query) (*SinglePage[Peer], error)
GET/accounts/{account_id}/secondary_dns/peers
Peer Details
client.DNS.ZoneTransfers.Peers.Get(ctx, peerID, query) (*Peer, error)
GET/accounts/{account_id}/secondary_dns/peers/{peer_id}
Create Peer
client.DNS.ZoneTransfers.Peers.New(ctx, params) (*Peer, error)
POST/accounts/{account_id}/secondary_dns/peers
Update Peer
client.DNS.ZoneTransfers.Peers.Update(ctx, peerID, params) (*Peer, error)
PUT/accounts/{account_id}/secondary_dns/peers/{peer_id}
Delete Peer
client.DNS.ZoneTransfers.Peers.Delete(ctx, peerID, body) (*ZoneTransferPeerDeleteResponse, error)
DELETE/accounts/{account_id}/secondary_dns/peers/{peer_id}
ModelsExpand Collapse
type Peer struct{…}
ID string
Name string

The name of the peer.

IP stringoptional

IPv4/IPv6 address of primary or secondary nameserver, depending on what zone this peer is linked to. For primary zones this IP defines the IP of the secondary nameserver Cloudflare will NOTIFY upon zone changes. For secondary zones this IP defines the IP of the primary nameserver Cloudflare will send AXFR/IXFR requests to.

IxfrEnable booloptional

Enable IXFR transfer protocol, default is AXFR. Only applicable to secondary zones.

Port float64optional

DNS port of primary or secondary nameserver, depending on what zone this peer is linked to.

TSIGID stringoptional

TSIG authentication will be used for zone transfer if configured.

DNSZone TransfersTSIGs

List TSIGs
client.DNS.ZoneTransfers.TSIGs.List(ctx, query) (*SinglePage[TSIG], error)
GET/accounts/{account_id}/secondary_dns/tsigs
TSIG Details
client.DNS.ZoneTransfers.TSIGs.Get(ctx, tsigID, query) (*TSIG, error)
GET/accounts/{account_id}/secondary_dns/tsigs/{tsig_id}
Create TSIG
client.DNS.ZoneTransfers.TSIGs.New(ctx, params) (*TSIG, error)
POST/accounts/{account_id}/secondary_dns/tsigs
Update TSIG
client.DNS.ZoneTransfers.TSIGs.Update(ctx, tsigID, params) (*TSIG, error)
PUT/accounts/{account_id}/secondary_dns/tsigs/{tsig_id}
Delete TSIG
client.DNS.ZoneTransfers.TSIGs.Delete(ctx, tsigID, body) (*ZoneTransferTSIGDeleteResponse, error)
DELETE/accounts/{account_id}/secondary_dns/tsigs/{tsig_id}
ModelsExpand Collapse
type TSIG struct{…}
ID string
Algo string

TSIG algorithm.

Name string

TSIG key name.

Secret string

TSIG secret.