Batch DNS Records
Send a Batch of DNS Record API calls to be executed together.
Notes:
Although Cloudflare will execute the batched operations in a single database transaction, Cloudflare's distributed KV store must treat each record change as a single key-value pair. This means that the propagation of changes is not atomic. See the documentation for more information.
The operations you specify within the /batch request body are always executed in the following order:
- Deletes
- Patches
- Puts
- Posts
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYYAPI Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
X-Auth-Email: user@example.comThe previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194Accepted Permissions (at least one required)
DNS WriteParametersExpand Collapse
class OpenpgpkeyRecord: …
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.
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.
Comments or notes about the DNS record. This field has no effect on DNS responses.
A single Base64-encoded OpenPGP Transferable Public Key (RFC 4880 Section 11.1)
Whether the record is receiving the performance and security benefits of Cloudflare.
settings: Optional[OpenpgpkeyRecordSettings]Settings for the DNS record.
Settings for the DNS record.
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.
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.
class ARecord: …
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.
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.
Comments or notes about the DNS record. This field has no effect on DNS responses.
Whether the record is receiving the performance and security benefits of Cloudflare.
settings: Optional[Settings]Settings for the DNS record.
Settings for the DNS record.
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.
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.
class AAAARecord: …
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.
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.
Comments or notes about the DNS record. This field has no effect on DNS responses.
Whether the record is receiving the performance and security benefits of Cloudflare.
settings: Optional[Settings]Settings for the DNS record.
Settings for the DNS record.
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.
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.
class CNAMERecord: …
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.
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.
Comments or notes about the DNS record. This field has no effect on DNS responses.
Whether the record is receiving the performance and security benefits of Cloudflare.
settings: Optional[Settings]Settings for the DNS record.
Settings for the DNS record.
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.
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.
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.
class MXRecord: …
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.
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.
Comments or notes about the DNS record. This field has no effect on DNS responses.
Required for MX and URI records; ignored for other record types (but may still be returned by the API). Records with lower priorities are preferred. This field is to be deprecated in favor of the priority field within the data map.
Whether the record is receiving the performance and security benefits of Cloudflare.
settings: Optional[Settings]Settings for the DNS record.
Settings for the DNS record.
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.
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.
class NSRecord: …
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.
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.
Comments or notes about the DNS record. This field has no effect on DNS responses.
Whether the record is receiving the performance and security benefits of Cloudflare.
settings: Optional[Settings]Settings for the DNS record.
Settings for the DNS record.
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.
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.
class PostDNSRecordsOpenpgpkeyRecord: …
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.
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.
Comments or notes about the DNS record. This field has no effect on DNS responses.
A single Base64-encoded OpenPGP Transferable Public Key (RFC 4880 Section 11.1)
Whether the record is receiving the performance and security benefits of Cloudflare.
settings: Optional[PostDNSRecordsOpenpgpkeyRecordSettings]Settings for the DNS record.
Settings for the DNS record.
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.
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.
class PTRRecord: …
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.
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.
Comments or notes about the DNS record. This field has no effect on DNS responses.
Whether the record is receiving the performance and security benefits of Cloudflare.
settings: Optional[Settings]Settings for the DNS record.
Settings for the DNS record.
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.
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.
class TXTRecord: …
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.
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.
Comments or notes about the DNS record. This field has no effect on DNS responses.
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/.
Whether the record is receiving the performance and security benefits of Cloudflare.
settings: Optional[Settings]Settings for the DNS record.
Settings for the DNS record.
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.
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.
class CAARecord: …
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.
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.
Comments or notes about the DNS record. This field has no effect on DNS responses.
Whether the record is receiving the performance and security benefits of Cloudflare.
settings: Optional[Settings]Settings for the DNS record.
Settings for the DNS record.
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.
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.
class CERTRecord: …
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.
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.
Comments or notes about the DNS record. This field has no effect on DNS responses.
Whether the record is receiving the performance and security benefits of Cloudflare.
settings: Optional[Settings]Settings for the DNS record.
Settings for the DNS record.
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.
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.
class DNSKEYRecord: …
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.
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.
Comments or notes about the DNS record. This field has no effect on DNS responses.
Whether the record is receiving the performance and security benefits of Cloudflare.
settings: Optional[Settings]Settings for the DNS record.
Settings for the DNS record.
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.
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.
class DSRecord: …
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.
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.
Comments or notes about the DNS record. This field has no effect on DNS responses.
Whether the record is receiving the performance and security benefits of Cloudflare.
settings: Optional[Settings]Settings for the DNS record.
Settings for the DNS record.
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.
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.
class HTTPSRecord: …
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.
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.
Comments or notes about the DNS record. This field has no effect on DNS responses.
Whether the record is receiving the performance and security benefits of Cloudflare.
settings: Optional[Settings]Settings for the DNS record.
Settings for the DNS record.
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.
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.
class LOCRecord: …
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.
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.
Comments or notes about the DNS record. This field has no effect on DNS responses.
Whether the record is receiving the performance and security benefits of Cloudflare.
settings: Optional[Settings]Settings for the DNS record.
Settings for the DNS record.
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.
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.
class NAPTRRecord: …
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.
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.
Comments or notes about the DNS record. This field has no effect on DNS responses.
Whether the record is receiving the performance and security benefits of Cloudflare.
settings: Optional[Settings]Settings for the DNS record.
Settings for the DNS record.
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.
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.
class SMIMEARecord: …
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.
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.
Comments or notes about the DNS record. This field has no effect on DNS responses.
Whether the record is receiving the performance and security benefits of Cloudflare.
settings: Optional[Settings]Settings for the DNS record.
Settings for the DNS record.
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.
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.
class SRVRecord: …
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.
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.
Comments or notes about the DNS record. This field has no effect on DNS responses.
Priority, weight, port, and SRV target. See 'data' for setting the individual component values.
data: Optional[Data]Components of a SRV record.
Components of a SRV record.
Whether the record is receiving the performance and security benefits of Cloudflare.
settings: Optional[Settings]Settings for the DNS record.
Settings for the DNS record.
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.
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.
class SSHFPRecord: …
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.
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.
Comments or notes about the DNS record. This field has no effect on DNS responses.
Whether the record is receiving the performance and security benefits of Cloudflare.
settings: Optional[Settings]Settings for the DNS record.
Settings for the DNS record.
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.
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.
class SVCBRecord: …
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.
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.
Comments or notes about the DNS record. This field has no effect on DNS responses.
Whether the record is receiving the performance and security benefits of Cloudflare.
settings: Optional[Settings]Settings for the DNS record.
Settings for the DNS record.
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.
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.
class TLSARecord: …
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.
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.
Comments or notes about the DNS record. This field has no effect on DNS responses.
Whether the record is receiving the performance and security benefits of Cloudflare.
settings: Optional[Settings]Settings for the DNS record.
Settings for the DNS record.
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.
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.
class URIRecord: …
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.
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.
Comments or notes about the DNS record. This field has no effect on DNS responses.
Required for MX and URI records; ignored for other record types (but may still be returned by the API). Records with lower priorities are preferred. This field is to be deprecated in favor of the priority field within the data map.
Whether the record is receiving the performance and security benefits of Cloudflare.
settings: Optional[Settings]Settings for the DNS record.
Settings for the DNS record.
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.
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.
class OpenpgpkeyRecord: …
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.
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.
Comments or notes about the DNS record. This field has no effect on DNS responses.
A single Base64-encoded OpenPGP Transferable Public Key (RFC 4880 Section 11.1)
Whether the record is receiving the performance and security benefits of Cloudflare.
settings: Optional[OpenpgpkeyRecordSettings]Settings for the DNS record.
Settings for the DNS record.
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.
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.
ReturnsExpand Collapse
class RecordBatchResponse: …
class A: …
class AAAA: …
class CNAME: …
class MX: …
class NS: …
class Openpgpkey: …
settings: OpenpgpkeySettingsSettings for the DNS record.
Settings for the DNS record.
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.
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.
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.
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.
class PTR: …
class TXT: …
class CAA: …
class CERT: …
class DNSKEY: …
class DS: …
class HTTPS: …
class LOC: …
class NAPTR: …
class SMIMEA: …
class SRV: …
class SSHFP: …
class SVCB: …
class TLSA: …
class A: …
class AAAA: …
class CNAME: …
class MX: …
class NS: …
class Openpgpkey: …
settings: OpenpgpkeySettingsSettings for the DNS record.
Settings for the DNS record.
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.
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.
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.
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.
class PTR: …
class TXT: …
class CAA: …
class CERT: …
class DNSKEY: …
class DS: …
class HTTPS: …
class LOC: …
class NAPTR: …
class SMIMEA: …
class SRV: …
class SSHFP: …
class SVCB: …
class TLSA: …
class A: …
class AAAA: …
class CNAME: …
class MX: …
class NS: …
class Openpgpkey: …
settings: OpenpgpkeySettingsSettings for the DNS record.
Settings for the DNS record.
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.
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.
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.
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.
class PTR: …
class TXT: …
class CAA: …
class CERT: …
class DNSKEY: …
class DS: …
class HTTPS: …
class LOC: …
class NAPTR: …
class SMIMEA: …
class SRV: …
class SSHFP: …
class SVCB: …
class TLSA: …
class A: …
class AAAA: …
class CNAME: …
class MX: …
class NS: …
class Openpgpkey: …
settings: OpenpgpkeySettingsSettings for the DNS record.
Settings for the DNS record.
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.
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.
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.
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.
class PTR: …
class TXT: …
class CAA: …
class CERT: …
class DNSKEY: …
class DS: …
class HTTPS: …
class LOC: …
class NAPTR: …
class SMIMEA: …
class SRV: …
class SSHFP: …
class SVCB: …
class TLSA: …
Batch DNS Records
import os
from cloudflare import Cloudflare
client = Cloudflare(
api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted
)
response = client.dns.records.batch(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
print(response.deletes){
"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": {
"deletes": [
{
"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"
}
],
"patches": [
{
"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"
}
],
"posts": [
{
"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"
}
],
"puts": [
{
"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": {
"deletes": [
{
"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"
}
],
"patches": [
{
"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"
}
],
"posts": [
{
"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"
}
],
"puts": [
{
"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"
}
]
}
}