Skip to content
Start here

Overwrite DNS Record

client.dns.records.update(stringdnsRecordId, RecordUpdateParamsparams, RequestOptionsoptions?): RecordResponse
PUT/zones/{zone_id}/dns_records/{dns_record_id}

Overwrite an existing DNS record.

Notes:

  • A/AAAA records cannot exist on the same name as CNAME records.
  • NS records cannot exist on the same name as any other record type.
  • Domain names are always represented in Punycode, even if Unicode characters were used when creating the record.
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
ParametersExpand Collapse
dnsRecordId: string

Identifier.

maxLength32
RecordUpdateParams = ARecord | AAAARecord | CNAMERecord | 18 more
RecordUpdateParamsBase
ARecord extends RecordUpdateParamsBase
AAAARecord extends RecordUpdateParamsBase
CNAMERecord extends RecordUpdateParamsBase
MXRecord extends RecordUpdateParamsBase
NSRecord extends RecordUpdateParamsBase
DNSRecordsOpenpgpkeyRecord extends RecordUpdateParamsBase
PTRRecord extends RecordUpdateParamsBase
TXTRecord extends RecordUpdateParamsBase
CAARecord extends RecordUpdateParamsBase
CERTRecord extends RecordUpdateParamsBase
DNSKEYRecord extends RecordUpdateParamsBase
DSRecord extends RecordUpdateParamsBase
HTTPSRecord extends RecordUpdateParamsBase
LOCRecord extends RecordUpdateParamsBase
NAPTRRecord extends RecordUpdateParamsBase
SMIMEARecord extends RecordUpdateParamsBase
SRVRecord extends RecordUpdateParamsBase
SSHFPRecord extends RecordUpdateParamsBase
SVCBRecord extends RecordUpdateParamsBase
TLSARecord extends RecordUpdateParamsBase
URIRecord extends RecordUpdateParamsBase
ReturnsExpand Collapse
RecordResponse = ARecord { id, created_on, meta, 4 more } | AAAARecord { id, created_on, meta, 4 more } | CNAMERecord { id, created_on, meta, 4 more } | 18 more
One of the following:
ARecord extends ARecord { name, ttl, type, 6 more } { id, created_on, meta, 4 more }
id: string

Identifier.

maxLength32
created_on: string

When the record was created.

formatdate-time
meta: Meta { dead_glue, is_glue, shadowed_by, shadowed_records_count }

Extra Cloudflare-specific metadata about the record.

dead_glue?: boolean

Whether this glue record is not served because a shallower NS delegation takes precedence over the deeper delegation that needs it. Present only when true; reachable glue carries only is_glue. See Unreachable glue records.

is_glue?: boolean

Whether this A or AAAA record is glue for a subdomain NS delegation. See Glue records.

shadowed_by?: Array<string>

IDs of the NS records that shadow this record. See Shadowed records.

shadowed_records_count?: number

Number of records shadowed by this NS delegation. See Shadowed records.

maximum10000
minimum0
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?: string

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

formatdate-time
tags_modified_on?: string

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

formatdate-time
AAAARecord extends AAAARecord { name, ttl, type, 6 more } { id, created_on, meta, 4 more }
id: string

Identifier.

maxLength32
created_on: string

When the record was created.

formatdate-time
meta: Meta { dead_glue, is_glue, shadowed_by, shadowed_records_count }

Extra Cloudflare-specific metadata about the record.

dead_glue?: boolean

Whether this glue record is not served because a shallower NS delegation takes precedence over the deeper delegation that needs it. Present only when true; reachable glue carries only is_glue. See Unreachable glue records.

is_glue?: boolean

Whether this A or AAAA record is glue for a subdomain NS delegation. See Glue records.

shadowed_by?: Array<string>

IDs of the NS records that shadow this record. See Shadowed records.

shadowed_records_count?: number

Number of records shadowed by this NS delegation. See Shadowed records.

maximum10000
minimum0
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?: string

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

formatdate-time
tags_modified_on?: string

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

formatdate-time
CNAMERecord extends CNAMERecord { name, ttl, type, 5 more } { id, created_on, meta, 4 more }
id: string

Identifier.

maxLength32
created_on: string

When the record was created.

formatdate-time
meta: Meta { dead_glue, is_glue, shadowed_by, shadowed_records_count }

Extra Cloudflare-specific metadata about the record.

dead_glue?: boolean

Whether this glue record is not served because a shallower NS delegation takes precedence over the deeper delegation that needs it. Present only when true; reachable glue carries only is_glue. See Unreachable glue records.

is_glue?: boolean

Whether this A or AAAA record is glue for a subdomain NS delegation. See Glue records.

shadowed_by?: Array<string>

IDs of the NS records that shadow this record. See Shadowed records.

shadowed_records_count?: number

Number of records shadowed by this NS delegation. See Shadowed records.

maximum10000
minimum0
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?: string

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

formatdate-time
tags_modified_on?: string

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

formatdate-time
MXRecord extends MXRecord { name, ttl, type, 6 more } { id, created_on, meta, 4 more }
id: string

Identifier.

maxLength32
created_on: string

When the record was created.

formatdate-time
meta: Meta { dead_glue, is_glue, shadowed_by, shadowed_records_count }

Extra Cloudflare-specific metadata about the record.

dead_glue?: boolean

Whether this glue record is not served because a shallower NS delegation takes precedence over the deeper delegation that needs it. Present only when true; reachable glue carries only is_glue. See Unreachable glue records.

is_glue?: boolean

Whether this A or AAAA record is glue for a subdomain NS delegation. See Glue records.

shadowed_by?: Array<string>

IDs of the NS records that shadow this record. See Shadowed records.

shadowed_records_count?: number

Number of records shadowed by this NS delegation. See Shadowed records.

maximum10000
minimum0
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?: string

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

formatdate-time
tags_modified_on?: string

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

formatdate-time
NSRecord extends NSRecord { name, ttl, type, 5 more } { id, created_on, meta, 4 more }
id: string

Identifier.

maxLength32
created_on: string

When the record was created.

formatdate-time
meta: Meta { dead_glue, is_glue, shadowed_by, shadowed_records_count }

Extra Cloudflare-specific metadata about the record.

dead_glue?: boolean

Whether this glue record is not served because a shallower NS delegation takes precedence over the deeper delegation that needs it. Present only when true; reachable glue carries only is_glue. See Unreachable glue records.

is_glue?: boolean

Whether this A or AAAA record is glue for a subdomain NS delegation. See Glue records.

shadowed_by?: Array<string>

IDs of the NS records that shadow this record. See Shadowed records.

shadowed_records_count?: number

Number of records shadowed by this NS delegation. See Shadowed records.

maximum10000
minimum0
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?: string

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

formatdate-time
tags_modified_on?: string

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

formatdate-time
OpenpgpkeyRecord { 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: Meta { dead_glue, is_glue, shadowed_by, shadowed_records_count }

Extra Cloudflare-specific metadata about the record.

dead_glue?: boolean

Whether this glue record is not served because a shallower NS delegation takes precedence over the deeper delegation that needs it. Present only when true; reachable glue carries only is_glue. See Unreachable glue records.

is_glue?: boolean

Whether this A or AAAA record is glue for a subdomain NS delegation. See Glue records.

shadowed_by?: Array<string>

IDs of the NS records that shadow this record. See Shadowed records.

shadowed_records_count?: number

Number of records shadowed by this NS delegation. See Shadowed records.

maximum10000
minimum0
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: Settings { ipv4_only, ipv6_only }

Settings for the DNS record.

ipv4_only?: 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?: 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<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
type: "OPENPGPKEY"

Record type.

comment_modified_on?: string

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

formatdate-time
tags_modified_on?: string

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

formatdate-time
PTRRecord extends PTRRecord { name, ttl, type, 5 more } { id, created_on, meta, 4 more }
id: string

Identifier.

maxLength32
created_on: string

When the record was created.

formatdate-time
meta: Meta { dead_glue, is_glue, shadowed_by, shadowed_records_count }

Extra Cloudflare-specific metadata about the record.

dead_glue?: boolean

Whether this glue record is not served because a shallower NS delegation takes precedence over the deeper delegation that needs it. Present only when true; reachable glue carries only is_glue. See Unreachable glue records.

is_glue?: boolean

Whether this A or AAAA record is glue for a subdomain NS delegation. See Glue records.

shadowed_by?: Array<string>

IDs of the NS records that shadow this record. See Shadowed records.

shadowed_records_count?: number

Number of records shadowed by this NS delegation. See Shadowed records.

maximum10000
minimum0
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?: string

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

formatdate-time
tags_modified_on?: string

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

formatdate-time
TXTRecord extends TXTRecord { name, ttl, type, 5 more } { id, created_on, meta, 4 more }
id: string

Identifier.

maxLength32
created_on: string

When the record was created.

formatdate-time
meta: Meta { dead_glue, is_glue, shadowed_by, shadowed_records_count }

Extra Cloudflare-specific metadata about the record.

dead_glue?: boolean

Whether this glue record is not served because a shallower NS delegation takes precedence over the deeper delegation that needs it. Present only when true; reachable glue carries only is_glue. See Unreachable glue records.

is_glue?: boolean

Whether this A or AAAA record is glue for a subdomain NS delegation. See Glue records.

shadowed_by?: Array<string>

IDs of the NS records that shadow this record. See Shadowed records.

shadowed_records_count?: number

Number of records shadowed by this NS delegation. See Shadowed records.

maximum10000
minimum0
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?: string

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

formatdate-time
tags_modified_on?: string

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

formatdate-time
CAARecord extends CAARecord { name, ttl, type, 6 more } { id, created_on, meta, 4 more }
id: string

Identifier.

maxLength32
created_on: string

When the record was created.

formatdate-time
meta: Meta { dead_glue, is_glue, shadowed_by, shadowed_records_count }

Extra Cloudflare-specific metadata about the record.

dead_glue?: boolean

Whether this glue record is not served because a shallower NS delegation takes precedence over the deeper delegation that needs it. Present only when true; reachable glue carries only is_glue. See Unreachable glue records.

is_glue?: boolean

Whether this A or AAAA record is glue for a subdomain NS delegation. See Glue records.

shadowed_by?: Array<string>

IDs of the NS records that shadow this record. See Shadowed records.

shadowed_records_count?: number

Number of records shadowed by this NS delegation. See Shadowed records.

maximum10000
minimum0
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?: string

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

formatdate-time
tags_modified_on?: string

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

formatdate-time
CERTRecord extends CERTRecord { name, ttl, type, 6 more } { id, created_on, meta, 4 more }
id: string

Identifier.

maxLength32
created_on: string

When the record was created.

formatdate-time
meta: Meta { dead_glue, is_glue, shadowed_by, shadowed_records_count }

Extra Cloudflare-specific metadata about the record.

dead_glue?: boolean

Whether this glue record is not served because a shallower NS delegation takes precedence over the deeper delegation that needs it. Present only when true; reachable glue carries only is_glue. See Unreachable glue records.

is_glue?: boolean

Whether this A or AAAA record is glue for a subdomain NS delegation. See Glue records.

shadowed_by?: Array<string>

IDs of the NS records that shadow this record. See Shadowed records.

shadowed_records_count?: number

Number of records shadowed by this NS delegation. See Shadowed records.

maximum10000
minimum0
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?: string

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

formatdate-time
tags_modified_on?: string

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

formatdate-time
DNSKEYRecord extends DNSKEYRecord { name, ttl, type, 6 more } { id, created_on, meta, 4 more }
id: string

Identifier.

maxLength32
created_on: string

When the record was created.

formatdate-time
meta: Meta { dead_glue, is_glue, shadowed_by, shadowed_records_count }

Extra Cloudflare-specific metadata about the record.

dead_glue?: boolean

Whether this glue record is not served because a shallower NS delegation takes precedence over the deeper delegation that needs it. Present only when true; reachable glue carries only is_glue. See Unreachable glue records.

is_glue?: boolean

Whether this A or AAAA record is glue for a subdomain NS delegation. See Glue records.

shadowed_by?: Array<string>

IDs of the NS records that shadow this record. See Shadowed records.

shadowed_records_count?: number

Number of records shadowed by this NS delegation. See Shadowed records.

maximum10000
minimum0
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?: string

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

formatdate-time
tags_modified_on?: string

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

formatdate-time
DSRecord extends DSRecord { name, ttl, type, 6 more } { id, created_on, meta, 4 more }
id: string

Identifier.

maxLength32
created_on: string

When the record was created.

formatdate-time
meta: Meta { dead_glue, is_glue, shadowed_by, shadowed_records_count }

Extra Cloudflare-specific metadata about the record.

dead_glue?: boolean

Whether this glue record is not served because a shallower NS delegation takes precedence over the deeper delegation that needs it. Present only when true; reachable glue carries only is_glue. See Unreachable glue records.

is_glue?: boolean

Whether this A or AAAA record is glue for a subdomain NS delegation. See Glue records.

shadowed_by?: Array<string>

IDs of the NS records that shadow this record. See Shadowed records.

shadowed_records_count?: number

Number of records shadowed by this NS delegation. See Shadowed records.

maximum10000
minimum0
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?: string

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

formatdate-time
tags_modified_on?: string

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

formatdate-time
HTTPSRecord extends HTTPSRecord { name, ttl, type, 6 more } { id, created_on, meta, 4 more }
id: string

Identifier.

maxLength32
created_on: string

When the record was created.

formatdate-time
meta: Meta { dead_glue, is_glue, shadowed_by, shadowed_records_count }

Extra Cloudflare-specific metadata about the record.

dead_glue?: boolean

Whether this glue record is not served because a shallower NS delegation takes precedence over the deeper delegation that needs it. Present only when true; reachable glue carries only is_glue. See Unreachable glue records.

is_glue?: boolean

Whether this A or AAAA record is glue for a subdomain NS delegation. See Glue records.

shadowed_by?: Array<string>

IDs of the NS records that shadow this record. See Shadowed records.

shadowed_records_count?: number

Number of records shadowed by this NS delegation. See Shadowed records.

maximum10000
minimum0
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?: string

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

formatdate-time
tags_modified_on?: string

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

formatdate-time
LOCRecord extends LOCRecord { name, ttl, type, 6 more } { id, created_on, meta, 4 more }
id: string

Identifier.

maxLength32
created_on: string

When the record was created.

formatdate-time
meta: Meta { dead_glue, is_glue, shadowed_by, shadowed_records_count }

Extra Cloudflare-specific metadata about the record.

dead_glue?: boolean

Whether this glue record is not served because a shallower NS delegation takes precedence over the deeper delegation that needs it. Present only when true; reachable glue carries only is_glue. See Unreachable glue records.

is_glue?: boolean

Whether this A or AAAA record is glue for a subdomain NS delegation. See Glue records.

shadowed_by?: Array<string>

IDs of the NS records that shadow this record. See Shadowed records.

shadowed_records_count?: number

Number of records shadowed by this NS delegation. See Shadowed records.

maximum10000
minimum0
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?: string

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

formatdate-time
tags_modified_on?: string

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

formatdate-time
NAPTRRecord extends NAPTRRecord { name, ttl, type, 6 more } { id, created_on, meta, 4 more }
id: string

Identifier.

maxLength32
created_on: string

When the record was created.

formatdate-time
meta: Meta { dead_glue, is_glue, shadowed_by, shadowed_records_count }

Extra Cloudflare-specific metadata about the record.

dead_glue?: boolean

Whether this glue record is not served because a shallower NS delegation takes precedence over the deeper delegation that needs it. Present only when true; reachable glue carries only is_glue. See Unreachable glue records.

is_glue?: boolean

Whether this A or AAAA record is glue for a subdomain NS delegation. See Glue records.

shadowed_by?: Array<string>

IDs of the NS records that shadow this record. See Shadowed records.

shadowed_records_count?: number

Number of records shadowed by this NS delegation. See Shadowed records.

maximum10000
minimum0
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?: string

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

formatdate-time
tags_modified_on?: string

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

formatdate-time
SMIMEARecord extends SMIMEARecord { name, ttl, type, 6 more } { id, created_on, meta, 4 more }
id: string

Identifier.

maxLength32
created_on: string

When the record was created.

formatdate-time
meta: Meta { dead_glue, is_glue, shadowed_by, shadowed_records_count }

Extra Cloudflare-specific metadata about the record.

dead_glue?: boolean

Whether this glue record is not served because a shallower NS delegation takes precedence over the deeper delegation that needs it. Present only when true; reachable glue carries only is_glue. See Unreachable glue records.

is_glue?: boolean

Whether this A or AAAA record is glue for a subdomain NS delegation. See Glue records.

shadowed_by?: Array<string>

IDs of the NS records that shadow this record. See Shadowed records.

shadowed_records_count?: number

Number of records shadowed by this NS delegation. See Shadowed records.

maximum10000
minimum0
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?: string

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

formatdate-time
tags_modified_on?: string

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

formatdate-time
SRVRecord extends SRVRecord { name, ttl, type, 6 more } { id, created_on, meta, 4 more }
id: string

Identifier.

maxLength32
created_on: string

When the record was created.

formatdate-time
meta: Meta { dead_glue, is_glue, shadowed_by, shadowed_records_count }

Extra Cloudflare-specific metadata about the record.

dead_glue?: boolean

Whether this glue record is not served because a shallower NS delegation takes precedence over the deeper delegation that needs it. Present only when true; reachable glue carries only is_glue. See Unreachable glue records.

is_glue?: boolean

Whether this A or AAAA record is glue for a subdomain NS delegation. See Glue records.

shadowed_by?: Array<string>

IDs of the NS records that shadow this record. See Shadowed records.

shadowed_records_count?: number

Number of records shadowed by this NS delegation. See Shadowed records.

maximum10000
minimum0
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?: string

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

formatdate-time
tags_modified_on?: string

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

formatdate-time
SSHFPRecord extends SSHFPRecord { name, ttl, type, 6 more } { id, created_on, meta, 4 more }
id: string

Identifier.

maxLength32
created_on: string

When the record was created.

formatdate-time
meta: Meta { dead_glue, is_glue, shadowed_by, shadowed_records_count }

Extra Cloudflare-specific metadata about the record.

dead_glue?: boolean

Whether this glue record is not served because a shallower NS delegation takes precedence over the deeper delegation that needs it. Present only when true; reachable glue carries only is_glue. See Unreachable glue records.

is_glue?: boolean

Whether this A or AAAA record is glue for a subdomain NS delegation. See Glue records.

shadowed_by?: Array<string>

IDs of the NS records that shadow this record. See Shadowed records.

shadowed_records_count?: number

Number of records shadowed by this NS delegation. See Shadowed records.

maximum10000
minimum0
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?: string

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

formatdate-time
tags_modified_on?: string

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

formatdate-time
SVCBRecord extends SVCBRecord { name, ttl, type, 6 more } { id, created_on, meta, 4 more }
id: string

Identifier.

maxLength32
created_on: string

When the record was created.

formatdate-time
meta: Meta { dead_glue, is_glue, shadowed_by, shadowed_records_count }

Extra Cloudflare-specific metadata about the record.

dead_glue?: boolean

Whether this glue record is not served because a shallower NS delegation takes precedence over the deeper delegation that needs it. Present only when true; reachable glue carries only is_glue. See Unreachable glue records.

is_glue?: boolean

Whether this A or AAAA record is glue for a subdomain NS delegation. See Glue records.

shadowed_by?: Array<string>

IDs of the NS records that shadow this record. See Shadowed records.

shadowed_records_count?: number

Number of records shadowed by this NS delegation. See Shadowed records.

maximum10000
minimum0
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?: string

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

formatdate-time
tags_modified_on?: string

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

formatdate-time
TLSARecord extends TLSARecord { name, ttl, type, 6 more } { id, created_on, meta, 4 more }
id: string

Identifier.

maxLength32
created_on: string

When the record was created.

formatdate-time
meta: Meta { dead_glue, is_glue, shadowed_by, shadowed_records_count }

Extra Cloudflare-specific metadata about the record.

dead_glue?: boolean

Whether this glue record is not served because a shallower NS delegation takes precedence over the deeper delegation that needs it. Present only when true; reachable glue carries only is_glue. See Unreachable glue records.

is_glue?: boolean

Whether this A or AAAA record is glue for a subdomain NS delegation. See Glue records.

shadowed_by?: Array<string>

IDs of the NS records that shadow this record. See Shadowed records.

shadowed_records_count?: number

Number of records shadowed by this NS delegation. See Shadowed records.

maximum10000
minimum0
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?: string

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

formatdate-time
tags_modified_on?: string

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

formatdate-time
URIRecord extends URIRecord { name, ttl, type, 7 more } { id, created_on, meta, 4 more }
id: string

Identifier.

maxLength32
created_on: string

When the record was created.

formatdate-time
meta: Meta { dead_glue, is_glue, shadowed_by, shadowed_records_count }

Extra Cloudflare-specific metadata about the record.

dead_glue?: boolean

Whether this glue record is not served because a shallower NS delegation takes precedence over the deeper delegation that needs it. Present only when true; reachable glue carries only is_glue. See Unreachable glue records.

is_glue?: boolean

Whether this A or AAAA record is glue for a subdomain NS delegation. See Glue records.

shadowed_by?: Array<string>

IDs of the NS records that shadow this record. See Shadowed records.

shadowed_records_count?: number

Number of records shadowed by this NS delegation. See Shadowed records.

maximum10000
minimum0
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?: string

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

formatdate-time
tags_modified_on?: string

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

formatdate-time

Overwrite DNS Record

import Cloudflare from 'cloudflare';

const client = new Cloudflare({
  apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted
});

const recordResponse = await client.dns.records.update('023e105f4ecef8ad9ca31a8372d0c353', {
  zone_id: '023e105f4ecef8ad9ca31a8372d0c353',
  name: 'example.com',
  ttl: 3600,
  type: 'A',
});

console.log(recordResponse);
{
  "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": {
      "dead_glue": true,
      "is_glue": true,
      "shadowed_by": [
        "372e67954025e0ba6aaa6d586b9e0b59"
      ],
      "shadowed_records_count": 42
    },
    "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": {
      "dead_glue": true,
      "is_glue": true,
      "shadowed_by": [
        "372e67954025e0ba6aaa6d586b9e0b59"
      ],
      "shadowed_records_count": 42
    },
    "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"
  }
}