Skip to content
Start here

Create DNS Record

POST/zones/{zone_id}/dns_records

Create a new DNS record for a zone.

Notes:

  • A/AAAA records cannot exist on the same name as CNAME records.
  • NS records cannot exist on the same name as any other record type.
  • Domain names are always represented in Punycode, even if Unicode characters were used when creating the record.
Security
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
Accepted Permissions (at least one required)
DNS Write
Path ParametersExpand Collapse
zone_id: string

Identifier.

maxLength32
Body ParametersJSONExpand Collapse
body: ARecord { name, ttl, type, 6 more } or AAAARecord { name, ttl, type, 6 more } or CNAMERecord { name, ttl, type, 5 more } or 18 more
One of the following:
ARecord = object { name, ttl, type, 6 more }
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.

One of the following:
number
1

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

type: "A"

Record type.

comment: optional string

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

content: optional string

A valid IPv4 address.

formatipv4
private_routing: optional boolean

Enables private network routing to the origin.

proxied: optional boolean

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

settings: optional object { ipv4_only, ipv6_only }

Settings for the DNS record.

ipv4_only: optional boolean

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.

ipv6_only: optional boolean

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: optional array of RecordTags

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

AAAARecord = object { name, ttl, type, 6 more }
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.

One of the following:
number
1

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

type: "AAAA"

Record type.

comment: optional string

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

content: optional string

A valid IPv6 address.

formatipv6
private_routing: optional boolean

Enables private network routing to the origin.

proxied: optional boolean

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

settings: optional object { ipv4_only, ipv6_only }

Settings for the DNS record.

ipv4_only: optional boolean

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.

ipv6_only: optional boolean

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: optional array of RecordTags

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

CNAMERecord = object { name, ttl, type, 5 more }
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.

One of the following:
number
1

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

type: "CNAME"

Record type.

comment: optional string

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

content: optional string

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

proxied: optional boolean

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

settings: optional object { flatten_cname, ipv4_only, ipv6_only }

Settings for the DNS record.

flatten_cname: optional boolean

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.

ipv4_only: optional boolean

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.

ipv6_only: optional boolean

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: optional array of RecordTags

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

MXRecord = object { name, ttl, type, 6 more }
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.

One of the following:
number
1

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

type: "MX"

Record type.

comment: optional string

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

content: optional string

A valid mail server hostname.

formathostname
priority: optional number

Required for MX, SRV and URI records; unused by other record types. Records with lower priorities are preferred.

maximum65535
minimum0
proxied: optional boolean

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

settings: optional object { ipv4_only, ipv6_only }

Settings for the DNS record.

ipv4_only: optional boolean

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.

ipv6_only: optional boolean

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: optional array of RecordTags

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

NSRecord = object { name, ttl, type, 5 more }
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.

One of the following:
number
1

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

type: "NS"

Record type.

comment: optional string

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

content: optional string

A valid name server host name.

proxied: optional boolean

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

settings: optional object { ipv4_only, ipv6_only }

Settings for the DNS record.

ipv4_only: optional boolean

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.

ipv6_only: optional boolean

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: optional array of RecordTags

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

DNSRecordsOpenpgpkeyRecord = object { name, ttl, type, 5 more }
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.

One of the following:
number
1

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

type: "OPENPGPKEY"

Record type.

comment: optional string

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

content: optional string

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

proxied: optional boolean

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

settings: optional object { ipv4_only, ipv6_only }

Settings for the DNS record.

ipv4_only: optional boolean

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.

ipv6_only: optional boolean

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: optional array of RecordTags

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

PTRRecord = object { name, ttl, type, 5 more }
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.

One of the following:
number
1

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

type: "PTR"

Record type.

comment: optional string

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

content: optional string

Domain name pointing to the address.

proxied: optional boolean

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

settings: optional object { ipv4_only, ipv6_only }

Settings for the DNS record.

ipv4_only: optional boolean

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.

ipv6_only: optional boolean

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: optional array of RecordTags

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

TXTRecord = object { name, ttl, type, 5 more }
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.

One of the following:
number
1

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

type: "TXT"

Record type.

comment: optional string

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

content: optional string

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: optional boolean

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

settings: optional object { ipv4_only, ipv6_only }

Settings for the DNS record.

ipv4_only: optional boolean

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.

ipv6_only: optional boolean

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: optional array of RecordTags

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

CAARecord = object { name, ttl, type, 6 more }
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.

One of the following:
number
1

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

type: "CAA"

Record type.

comment: optional string

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

content: optional string

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

data: optional object { flags, tag, value }

Components of a CAA record.

flags: optional number

Flags for the CAA record.

maximum255
minimum0
tag: optional string

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

value: optional string

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

proxied: optional boolean

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

settings: optional object { ipv4_only, ipv6_only }

Settings for the DNS record.

ipv4_only: optional boolean

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.

ipv6_only: optional boolean

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: optional array of RecordTags

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

CERTRecord = object { name, ttl, type, 6 more }
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.

One of the following:
number
1

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

type: "CERT"

Record type.

comment: optional string

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

content: optional string

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

data: optional object { algorithm, certificate, key_tag, type }

Components of a CERT record.

algorithm: optional number

Algorithm.

maximum255
minimum0
certificate: optional string

Certificate.

key_tag: optional number

Key Tag.

maximum65535
minimum0
type: optional number

Type.

maximum65535
minimum0
proxied: optional boolean

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

settings: optional object { ipv4_only, ipv6_only }

Settings for the DNS record.

ipv4_only: optional boolean

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.

ipv6_only: optional boolean

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: optional array of RecordTags

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

DNSKEYRecord = object { name, ttl, type, 6 more }
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.

One of the following:
number
1

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

type: "DNSKEY"

Record type.

comment: optional string

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

content: optional string

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

data: optional object { algorithm, flags, protocol, public_key }

Components of a DNSKEY record.

algorithm: optional number

Algorithm.

maximum255
minimum0
flags: optional number

Flags.

maximum65535
minimum0
protocol: optional number

Protocol.

maximum255
minimum0
public_key: optional string

Public Key.

proxied: optional boolean

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

settings: optional object { ipv4_only, ipv6_only }

Settings for the DNS record.

ipv4_only: optional boolean

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.

ipv6_only: optional boolean

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: optional array of RecordTags

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

DSRecord = object { name, ttl, type, 6 more }
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.

One of the following:
number
1

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

type: "DS"

Record type.

comment: optional string

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

content: optional string

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

data: optional object { algorithm, digest, digest_type, key_tag }

Components of a DS record.

algorithm: optional number

Algorithm.

maximum255
minimum0
digest: optional string

Digest.

digest_type: optional number

Digest Type.

maximum255
minimum0
key_tag: optional number

Key Tag.

maximum65535
minimum0
proxied: optional boolean

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

settings: optional object { ipv4_only, ipv6_only }

Settings for the DNS record.

ipv4_only: optional boolean

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.

ipv6_only: optional boolean

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: optional array of RecordTags

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

HTTPSRecord = object { name, ttl, type, 6 more }
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.

One of the following:
number
1

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

type: "HTTPS"

Record type.

comment: optional string

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

content: optional string

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

data: optional object { priority, target, value }

Components of a HTTPS record.

priority: optional number

Priority.

maximum65535
minimum0
target: optional string

Target.

value: optional string

Value.

proxied: optional boolean

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

settings: optional object { ipv4_only, ipv6_only }

Settings for the DNS record.

ipv4_only: optional boolean

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.

ipv6_only: optional boolean

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: optional array of RecordTags

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

LOCRecord = object { name, ttl, type, 6 more }
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.

One of the following:
number
1

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

type: "LOC"

Record type.

comment: optional string

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

content: optional string

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

data: optional object { altitude, lat_degrees, lat_direction, 9 more }

Components of a LOC record.

altitude: optional number

Altitude of location in meters.

maximum42849672.95
minimum-100000
lat_degrees: optional number

Degrees of latitude.

maximum90
minimum0
lat_direction: optional "N" or "S"

Latitude direction.

One of the following:
"N"
"S"
lat_minutes: optional number

Minutes of latitude.

maximum59
minimum0
lat_seconds: optional number

Seconds of latitude.

maximum59.999
minimum0
long_degrees: optional number

Degrees of longitude.

maximum180
minimum0
long_direction: optional "E" or "W"

Longitude direction.

One of the following:
"E"
"W"
long_minutes: optional number

Minutes of longitude.

maximum59
minimum0
long_seconds: optional number

Seconds of longitude.

maximum59.999
minimum0
precision_horz: optional number

Horizontal precision of location.

maximum90000000
minimum0
precision_vert: optional number

Vertical precision of location.

maximum90000000
minimum0
size: optional number

Size of location in meters.

maximum90000000
minimum0
proxied: optional boolean

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

settings: optional object { ipv4_only, ipv6_only }

Settings for the DNS record.

ipv4_only: optional boolean

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.

ipv6_only: optional boolean

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: optional array of RecordTags

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

NAPTRRecord = object { name, ttl, type, 6 more }
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.

One of the following:
number
1

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

type: "NAPTR"

Record type.

comment: optional string

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

content: optional string

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

data: optional object { flags, order, preference, 3 more }

Components of a NAPTR record.

flags: optional string

Flags.

order: optional number

Order.

maximum65535
minimum0
preference: optional number

Preference.

maximum65535
minimum0
regex: optional string

Regex.

replacement: optional string

Replacement.

service: optional string

Service.

proxied: optional boolean

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

settings: optional object { ipv4_only, ipv6_only }

Settings for the DNS record.

ipv4_only: optional boolean

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.

ipv6_only: optional boolean

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: optional array of RecordTags

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

SMIMEARecord = object { name, ttl, type, 6 more }
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.

One of the following:
number
1

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

type: "SMIMEA"

Record type.

comment: optional string

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

content: optional string

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

data: optional object { certificate, matching_type, selector, usage }

Components of a SMIMEA record.

certificate: optional string

Certificate.

matching_type: optional number

Matching Type.

maximum255
minimum0
selector: optional number

Selector.

maximum255
minimum0
usage: optional number

Usage.

maximum255
minimum0
proxied: optional boolean

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

settings: optional object { ipv4_only, ipv6_only }

Settings for the DNS record.

ipv4_only: optional boolean

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.

ipv6_only: optional boolean

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: optional array of RecordTags

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

SRVRecord = object { name, ttl, type, 6 more }
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.

One of the following:
number
1

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

type: "SRV"

Record type.

comment: optional string

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

content: optional string

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

data: optional object { port, priority, target, weight }

Components of a SRV record.

port: optional number

The port of the service.

maximum65535
minimum0
priority: optional number

Required for MX, SRV and URI records; unused by other record types. Records with lower priorities are preferred.

maximum65535
minimum0
target: optional string

A valid hostname.

formathostname
weight: optional number

The record weight.

maximum65535
minimum0
proxied: optional boolean

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

settings: optional object { ipv4_only, ipv6_only }

Settings for the DNS record.

ipv4_only: optional boolean

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.

ipv6_only: optional boolean

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: optional array of RecordTags

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

SSHFPRecord = object { name, ttl, type, 6 more }
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.

One of the following:
number
1

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

type: "SSHFP"

Record type.

comment: optional string

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

content: optional string

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

data: optional object { algorithm, fingerprint, type }

Components of a SSHFP record.

algorithm: optional number

Algorithm.

maximum255
minimum0
fingerprint: optional string

Fingerprint.

type: optional number

Type.

maximum255
minimum0
proxied: optional boolean

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

settings: optional object { ipv4_only, ipv6_only }

Settings for the DNS record.

ipv4_only: optional boolean

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.

ipv6_only: optional boolean

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: optional array of RecordTags

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

SVCBRecord = object { name, ttl, type, 6 more }
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.

One of the following:
number
1

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

type: "SVCB"

Record type.

comment: optional string

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

content: optional string

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

data: optional object { priority, target, value }

Components of a SVCB record.

priority: optional number

Priority.

maximum65535
minimum0
target: optional string

Target.

value: optional string

Value.

proxied: optional boolean

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

settings: optional object { ipv4_only, ipv6_only }

Settings for the DNS record.

ipv4_only: optional boolean

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.

ipv6_only: optional boolean

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: optional array of RecordTags

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

TLSARecord = object { name, ttl, type, 6 more }
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.

One of the following:
number
1

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

type: "TLSA"

Record type.

comment: optional string

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

content: optional string

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

data: optional object { certificate, matching_type, selector, usage }

Components of a TLSA record.

certificate: optional string

Certificate.

matching_type: optional number

Matching Type.

maximum255
minimum0
selector: optional number

Selector.

maximum255
minimum0
usage: optional number

Usage.

maximum255
minimum0
proxied: optional boolean

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

settings: optional object { ipv4_only, ipv6_only }

Settings for the DNS record.

ipv4_only: optional boolean

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.

ipv6_only: optional boolean

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: optional array of RecordTags

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

URIRecord = object { name, ttl, type, 7 more }
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.

One of the following:
number
1

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

type: "URI"

Record type.

comment: optional string

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

content: optional string

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

data: optional object { target, weight }

Components of a URI record.

target: optional string

The record content.

weight: optional number

The record weight.

maximum65535
minimum0
priority: optional number

Required for MX, SRV and URI records; unused by other record types. Records with lower priorities are preferred.

maximum65535
minimum0
proxied: optional boolean

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

settings: optional object { ipv4_only, ipv6_only }

Settings for the DNS record.

ipv4_only: optional boolean

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.

ipv6_only: optional boolean

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: optional array of RecordTags

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

ReturnsExpand Collapse
errors: array of object { code, message, documentation_url, source }
code: number
minimum1000
message: string
documentation_url: optional string
source: optional object { pointer }
pointer: optional string
messages: array of object { code, message, documentation_url, source }
code: number
minimum1000
message: string
documentation_url: optional string
source: optional object { pointer }
pointer: optional string
success: true

Whether the API call was successful.

result: optional RecordResponse
One of the following:
A = ARecord { name, ttl, type, 6 more }
id: string

Identifier.

maxLength32
created_on: string

When the record was created.

formatdate-time
meta: unknown

Extra Cloudflare-specific information about the record.

modified_on: string

When the record was last modified.

formatdate-time
proxiable: boolean

Whether the record can be proxied by Cloudflare or not.

comment_modified_on: optional string

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

formatdate-time
tags_modified_on: optional string

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

formatdate-time
AAAA = AAAARecord { name, ttl, type, 6 more }
id: string

Identifier.

maxLength32
created_on: string

When the record was created.

formatdate-time
meta: unknown

Extra Cloudflare-specific information about the record.

modified_on: string

When the record was last modified.

formatdate-time
proxiable: boolean

Whether the record can be proxied by Cloudflare or not.

comment_modified_on: optional string

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

formatdate-time
tags_modified_on: optional string

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

formatdate-time
CNAME = CNAMERecord { name, ttl, type, 5 more }
id: string

Identifier.

maxLength32
created_on: string

When the record was created.

formatdate-time
meta: unknown

Extra Cloudflare-specific information about the record.

modified_on: string

When the record was last modified.

formatdate-time
proxiable: boolean

Whether the record can be proxied by Cloudflare or not.

comment_modified_on: optional string

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

formatdate-time
tags_modified_on: optional string

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

formatdate-time
MX = MXRecord { name, ttl, type, 6 more }
id: string

Identifier.

maxLength32
created_on: string

When the record was created.

formatdate-time
meta: unknown

Extra Cloudflare-specific information about the record.

modified_on: string

When the record was last modified.

formatdate-time
proxiable: boolean

Whether the record can be proxied by Cloudflare or not.

comment_modified_on: optional string

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

formatdate-time
tags_modified_on: optional string

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

formatdate-time
NS = NSRecord { name, ttl, type, 5 more }
id: string

Identifier.

maxLength32
created_on: string

When the record was created.

formatdate-time
meta: unknown

Extra Cloudflare-specific information about the record.

modified_on: string

When the record was last modified.

formatdate-time
proxiable: boolean

Whether the record can be proxied by Cloudflare or not.

comment_modified_on: optional string

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

formatdate-time
tags_modified_on: optional string

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

formatdate-time
Openpgpkey = object { id, comment, content, 12 more }
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)

created_on: string

When the record was created.

formatdate-time
meta: unknown

Extra Cloudflare-specific information about the record.

modified_on: string

When the record was last modified.

formatdate-time
name: string

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

maxLength255
minLength1
proxiable: boolean

Whether the record can be proxied by Cloudflare or not.

proxied: boolean

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

settings: object { ipv4_only, ipv6_only }

Settings for the DNS record.

ipv4_only: optional boolean

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.

ipv6_only: optional boolean

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: array of 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.

One of the following:
number
1

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

type: "OPENPGPKEY"

Record type.

comment_modified_on: optional string

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

formatdate-time
tags_modified_on: optional string

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

formatdate-time
PTR = PTRRecord { name, ttl, type, 5 more }
id: string

Identifier.

maxLength32
created_on: string

When the record was created.

formatdate-time
meta: unknown

Extra Cloudflare-specific information about the record.

modified_on: string

When the record was last modified.

formatdate-time
proxiable: boolean

Whether the record can be proxied by Cloudflare or not.

comment_modified_on: optional string

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

formatdate-time
tags_modified_on: optional string

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

formatdate-time
TXT = TXTRecord { name, ttl, type, 5 more }
id: string

Identifier.

maxLength32
created_on: string

When the record was created.

formatdate-time
meta: unknown

Extra Cloudflare-specific information about the record.

modified_on: string

When the record was last modified.

formatdate-time
proxiable: boolean

Whether the record can be proxied by Cloudflare or not.

comment_modified_on: optional string

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

formatdate-time
tags_modified_on: optional string

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

formatdate-time
CAA = CAARecord { name, ttl, type, 6 more }
id: string

Identifier.

maxLength32
created_on: string

When the record was created.

formatdate-time
meta: unknown

Extra Cloudflare-specific information about the record.

modified_on: string

When the record was last modified.

formatdate-time
proxiable: boolean

Whether the record can be proxied by Cloudflare or not.

comment_modified_on: optional string

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

formatdate-time
tags_modified_on: optional string

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

formatdate-time
CERT = CERTRecord { name, ttl, type, 6 more }
id: string

Identifier.

maxLength32
created_on: string

When the record was created.

formatdate-time
meta: unknown

Extra Cloudflare-specific information about the record.

modified_on: string

When the record was last modified.

formatdate-time
proxiable: boolean

Whether the record can be proxied by Cloudflare or not.

comment_modified_on: optional string

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

formatdate-time
tags_modified_on: optional string

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

formatdate-time
DNSKEY = DNSKEYRecord { name, ttl, type, 6 more }
id: string

Identifier.

maxLength32
created_on: string

When the record was created.

formatdate-time
meta: unknown

Extra Cloudflare-specific information about the record.

modified_on: string

When the record was last modified.

formatdate-time
proxiable: boolean

Whether the record can be proxied by Cloudflare or not.

comment_modified_on: optional string

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

formatdate-time
tags_modified_on: optional string

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

formatdate-time
DS = DSRecord { name, ttl, type, 6 more }
id: string

Identifier.

maxLength32
created_on: string

When the record was created.

formatdate-time
meta: unknown

Extra Cloudflare-specific information about the record.

modified_on: string

When the record was last modified.

formatdate-time
proxiable: boolean

Whether the record can be proxied by Cloudflare or not.

comment_modified_on: optional string

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

formatdate-time
tags_modified_on: optional string

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

formatdate-time
HTTPS = HTTPSRecord { name, ttl, type, 6 more }
id: string

Identifier.

maxLength32
created_on: string

When the record was created.

formatdate-time
meta: unknown

Extra Cloudflare-specific information about the record.

modified_on: string

When the record was last modified.

formatdate-time
proxiable: boolean

Whether the record can be proxied by Cloudflare or not.

comment_modified_on: optional string

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

formatdate-time
tags_modified_on: optional string

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

formatdate-time
LOC = LOCRecord { name, ttl, type, 6 more }
id: string

Identifier.

maxLength32
created_on: string

When the record was created.

formatdate-time
meta: unknown

Extra Cloudflare-specific information about the record.

modified_on: string

When the record was last modified.

formatdate-time
proxiable: boolean

Whether the record can be proxied by Cloudflare or not.

comment_modified_on: optional string

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

formatdate-time
tags_modified_on: optional string

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

formatdate-time
NAPTR = NAPTRRecord { name, ttl, type, 6 more }
id: string

Identifier.

maxLength32
created_on: string

When the record was created.

formatdate-time
meta: unknown

Extra Cloudflare-specific information about the record.

modified_on: string

When the record was last modified.

formatdate-time
proxiable: boolean

Whether the record can be proxied by Cloudflare or not.

comment_modified_on: optional string

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

formatdate-time
tags_modified_on: optional string

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

formatdate-time
SMIMEA = SMIMEARecord { name, ttl, type, 6 more }
id: string

Identifier.

maxLength32
created_on: string

When the record was created.

formatdate-time
meta: unknown

Extra Cloudflare-specific information about the record.

modified_on: string

When the record was last modified.

formatdate-time
proxiable: boolean

Whether the record can be proxied by Cloudflare or not.

comment_modified_on: optional string

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

formatdate-time
tags_modified_on: optional string

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

formatdate-time
SRV = SRVRecord { name, ttl, type, 6 more }
id: string

Identifier.

maxLength32
created_on: string

When the record was created.

formatdate-time
meta: unknown

Extra Cloudflare-specific information about the record.

modified_on: string

When the record was last modified.

formatdate-time
proxiable: boolean

Whether the record can be proxied by Cloudflare or not.

comment_modified_on: optional string

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

formatdate-time
tags_modified_on: optional string

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

formatdate-time
SSHFP = SSHFPRecord { name, ttl, type, 6 more }
id: string

Identifier.

maxLength32
created_on: string

When the record was created.

formatdate-time
meta: unknown

Extra Cloudflare-specific information about the record.

modified_on: string

When the record was last modified.

formatdate-time
proxiable: boolean

Whether the record can be proxied by Cloudflare or not.

comment_modified_on: optional string

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

formatdate-time
tags_modified_on: optional string

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

formatdate-time
SVCB = SVCBRecord { name, ttl, type, 6 more }
id: string

Identifier.

maxLength32
created_on: string

When the record was created.

formatdate-time
meta: unknown

Extra Cloudflare-specific information about the record.

modified_on: string

When the record was last modified.

formatdate-time
proxiable: boolean

Whether the record can be proxied by Cloudflare or not.

comment_modified_on: optional string

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

formatdate-time
tags_modified_on: optional string

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

formatdate-time
TLSA = TLSARecord { name, ttl, type, 6 more }
id: string

Identifier.

maxLength32
created_on: string

When the record was created.

formatdate-time
meta: unknown

Extra Cloudflare-specific information about the record.

modified_on: string

When the record was last modified.

formatdate-time
proxiable: boolean

Whether the record can be proxied by Cloudflare or not.

comment_modified_on: optional string

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

formatdate-time
tags_modified_on: optional string

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

formatdate-time
URI = URIRecord { name, ttl, type, 7 more }
id: string

Identifier.

maxLength32
created_on: string

When the record was created.

formatdate-time
meta: unknown

Extra Cloudflare-specific information about the record.

modified_on: string

When the record was last modified.

formatdate-time
proxiable: boolean

Whether the record can be proxied by Cloudflare or not.

comment_modified_on: optional string

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

formatdate-time
tags_modified_on: optional string

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

formatdate-time

Create DNS Record

curl https://api.cloudflare.com/client/v4/zones/$ZONE_ID/dns_records \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
    -d '{
          "name": "example.com",
          "ttl": 3600,
          "type": "A",
          "comment": "Domain verification record",
          "content": "198.51.100.4",
          "private_routing": true,
          "proxied": true
        }'
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "name": "example.com",
    "ttl": 3600,
    "type": "A",
    "comment": "Domain verification record",
    "content": "198.51.100.4",
    "private_routing": true,
    "proxied": true,
    "settings": {
      "ipv4_only": true,
      "ipv6_only": true
    },
    "tags": [
      "owner:dns-team"
    ],
    "id": "023e105f4ecef8ad9ca31a8372d0c353",
    "created_on": "2014-01-01T05:20:00.12345Z",
    "meta": {},
    "modified_on": "2014-01-01T05:20:00.12345Z",
    "proxiable": true,
    "comment_modified_on": "2024-01-01T05:20:00.12345Z",
    "tags_modified_on": "2025-01-01T05:20:00.12345Z"
  }
}
Returns Examples
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "name": "example.com",
    "ttl": 3600,
    "type": "A",
    "comment": "Domain verification record",
    "content": "198.51.100.4",
    "private_routing": true,
    "proxied": true,
    "settings": {
      "ipv4_only": true,
      "ipv6_only": true
    },
    "tags": [
      "owner:dns-team"
    ],
    "id": "023e105f4ecef8ad9ca31a8372d0c353",
    "created_on": "2014-01-01T05:20:00.12345Z",
    "meta": {},
    "modified_on": "2014-01-01T05:20:00.12345Z",
    "proxiable": true,
    "comment_modified_on": "2024-01-01T05:20:00.12345Z",
    "tags_modified_on": "2025-01-01T05:20:00.12345Z"
  }
}