Cloudflare MCP Server & CLI (navid.me) README

The full upstream README, mirrored for reference. Install config, tool schemas, adoption signals and our own overview live on the Cloudflare MCP Server & CLI (navid.me) listing page.

Cloudflare

Cloudflare MCP Server & CLI

npm CI License YouTube X LinkedIn

Cloudflare MCP server and CLI for Codex and AI agents. 29 tools for current DNS, cache, zone settings, Rulesets, Worker metadata and read-only analytics, with private accounts and explicit operation approval. One shared implementation supplies both binaries and a desktop bundle.

Built and maintained by Navid Moazzez. Built on Slipway, which turns one definition of each tool into the MCP server and the CLI. The complete guide is on navid.me.

Illustrated workflow in the house terminal component

The terminal illustrates real command names and approval flow. It is not a recording of a provider account run. Cloudflare already has official CLI and hosted MCP products; their current schemas, approval policies and supported workflows are compared below.

Requires Node 22+ and eligible Cloudflare API access for account operations. Validation: fixture tests, schema validation and protocol/artifact discovery are separate from provider-account outcomes and desktop GUI outcomes, which remain unverified. Section 7 has the measured token costs; no success rate is invented.

Two ways to use it

Command line

Terminal
npm install -g @thenavidm/cloudflare-mcp-cli@latest
cloudflare-cli tools
cloudflare-cli list-zones --per-page 10 --agent
cloudflare-cli schema create-dns-record
cloudflare-cli create-dns-record --zone-id YOUR_ZONE_ID --payload-file /absolute/private/approved-dns.json --account work --confirm --agent

MCP server, for your AI app

bash
codex mcp add cloudflare -- npx -y @thenavidm/cloudflare-mcp-cli@latest

Configure private credentials first. Ask: “Read DNS for this exact zone; do not change any records.” Full setup is in INSTALL.md.

Which one

Where you workSurface
Codex or shell agentShared CLI, local MCP or both
Desktop chatCompatible local MCP or desktop bundle
Scripts / CICLI or MCP client
Remote-only client / broad APIOfficial Cloudflare hosted MCP / cf
Workers deploymentOfficial Wrangler / cf

Features

CapabilityCLIMCP
Zone/DNS readslist-zones / list-dns-recordslist_zones / list_dns_records
Explicit DNS changescreate-dns-record / update-dns-recordcreate_dns_record / update_dns_record
Exact DNS review/applypreview-dns-batch / apply-dns-batchpreview_dns_batch / apply_dns_batch
Rulesets and settingsget-zone-ruleset / get-zone-settingget_zone_ruleset / get_zone_setting
Bounded reads / analyticsquery-pages / analytics-queryquery_pages / analytics_query
Local schemas / previewsget-operation-schema / preview-operationget_operation_schema / preview_operation
Profiles and policylist-accounts / --account / --confirmlist_accounts / account / confirm

Contents

NumberSectionWhat it covers
1What you can ask itWhat you can ask it
2Quick installQuick install
3Set up Cloudflare accessSet up Cloudflare access
4Connect your clientConnect your client
5Check it worksCheck it works
6Output, flags and exit codesOutput, flags and exit codes
7MCP or CLI and token costMCP or CLI and token cost
8Every tool and argumentEvery tool and argument
9DNS, Rulesets, cache and analyticsDNS, Rulesets, cache and analytics
10Pagination, retries and local input filesPagination, retries and local input files
11Several private accountsSeveral private accounts
12Writing safelyWriting safely
13How the two surfaces workHow the two surfaces work
14Privacy and data handlingPrivacy and data handling
15Environment variablesEnvironment variables
16Updates and removalUpdates and removal
17TroubleshootingTroubleshooting
18API coverage and comparisonsAPI coverage and comparisons
19VersionsVersions
20FAQFAQ

1. What you can ask it

  • Read the intended zone's DNS records without changing anything.
  • Inspect the exact native schema for an A, AAAA, TXT, MX or other supported DNS request.
  • Preview a small reviewed DNS batch and submit only the same approved zone/profile/body.
  • Apply one explicit DNS edit or deletion after inspecting its record ID and content.
  • Read the selected zone setting, then change only the approved value.
  • Inspect current Rulesets and the selected phase entrypoint before approving a Ruleset change.
  • Purge only the requested cache targets after confirmation.
  • Query an eligible analytics dataset for an explicit time window without mutations.

Actual credential-free stdio discovery supplies 29 tools: 18 reads and 11 confirmation-gated mutations. Twenty-two native operations use a pinned, reviewed current REST schema; seven helpers provide local profile/schema/preview, bounded reads, DNS review/apply and query-only analytics. This is a focused management surface. It does not deploy Workers, expose an unrestricted raw API request or implement every Cloudflare product.

2. Quick install

Terminal
npm install -g @thenavidm/cloudflare-mcp-cli@latest
cloudflare-cli --version
cloudflare-cli tools
cloudflare-cli schema create-dns-record
cloudflare-cli login

Requires Node 22+ for manual installs. Configure private tokens before provider calls. Discovery and local previews work without provider authentication. See INSTALL.md for macOS, Windows, Linux, every supported local client, Docker and desktop extension setup.

3. Set up Cloudflare access

Private API tokens and resource access

  1. Choose the intended Cloudflare user/account and zone. Create a least-privilege API token through My Profile > API Tokens, or Manage account > Account API tokens for an account-owned token.
  2. Choose only the permissions needed below and restrict account/zone resources. Check optional expiry and IP filters. Save the secret privately outside every repository; never use the Global API Key with this Bearer-only package.
  3. Configure CLOUDFLARE_TOKEN_FILE as an absolute token-only file, or privately set CLOUDFLARE_API_TOKEN. Optional CLOUDFLARE_ACCOUNT_ID and CLOUDFLARE_ZONE_ID supply input defaults. A default does not restrict token permissions.
  4. Run cloudflare-cli doctor for local configuration checks. Deliberately run doctor --network to verify token status: user tokens use GET /user/tokens/verify; account-owned tokens need CLOUDFLARE_TOKEN_KIND=account and a private account ID, using GET /accounts/{account_id}/tokens/verify. Only an active result is accepted; token IDs/status bodies are not printed.
  5. Read the exact zone and DNS records, inspect the complete current input schema, preview the intended change locally and approve only the chosen request. A local preview does not verify provider permissions, conflicts or current remote state.

Requests use Authorization: Bearer on the fixed https://api.cloudflare.com/client/v4 origin. Token-kind selection changes the diagnostic route, not ordinary authorization or resource access. The wrapper does not implement OAuth login, refresh, saved official cf sessions, automatic .env loading or global CLI config ingestion. login prints instructions; it neither opens consent nor saves credentials.

User tokens inherit permitted user access. Account-owned tokens act as service principals; creation requires the provider's token-provisioning capability or Super Administrator role and grants cannot exceed the creator's permissions. Some products still have compatibility restrictions; verify the exact operation in the account-token compatibility documentation.

Intended taskPermission to review with the providerResource scope
Discover zones / zone identityZone: ReadIntended zone(s)
Read DNS recordsDNS: ReadIntended zone(s)
Create/edit/delete/batch DNSDNS: EditIntended zone(s)
Purge cacheCache Purge permissionIntended zone(s)
Read/change zone settingsZone Settings: Read / EditIntended zone(s) and supported setting
Read/change a RulesetThe permission for its Ruleset phase, such as zone WAF or Transform Rules read/editIntended zone(s); phase/plan restrictions apply
Worker script metadataWorkers Scripts: ReadIntended account(s)
Query analyticsAnalytics: Read and current dataset accessIntended account/zone(s)
Read Page RulesPage Rules: ReadIntended zone(s)
List provider accountsAccount Settings: Read or provider-documented account listing grantAccessible intended accounts

Review API token permissions and the selected endpoint's accepted grant list; this table is task guidance, not a complete static authorization manifest. Do not grant token-management, account administration or every zone solely for installation.

Use a private 0700 directory and regular 0600 token-only file on macOS/Linux. Windows users must restrict the file ACL to their own user; POSIX checks do not establish Windows ACL protection. Token files cannot be symlinks or exceed 64 KiB. File credentials override environment credentials and are cached until restart. GUI applications may have a different environment from your terminal.

Plans and limits

This AGPL wrapper is free; Cloudflare services and plan restrictions remain separate. DNS, proxy, cache purge, setting values, Ruleset phases and analytics availability are controlled by Cloudflare. Read metadata for the selected setting or dataset rather than assuming every write is allowed on every plan.

Current general API limits list 1200 requests per five minutes for a user/account token and 200 per second per IP, with cumulative user limits and endpoint-specific exceptions. Other sessions and processes consume the same upstream quota. Local pacing defaults to 200 ms per profile/process; it does not reserve quota. No reads or mutations retry automatically after 429, timeout, network failure or HTTP 200 provider errors. Wait according to current provider response/reset policy and inspect state before a deliberate repeat.

GraphQL analytics limits separately describe a default 300-query/five-minute user quota, up to ten zones or one account per scoped query, and dataset-specific retention/record limits. The general limits table uses a different GraphQL maximum figure; use the current analytics rules and returned policy for the actual query. Account-based limiting can be enabled through provider controls; the wrapper does not opt you into it. Inspect the provider's settings node for your dataset and resource. Adaptive analytics may be sampled; an aggregate is not necessarily an exact event ledger.

Reviewed DNS batches have a local cap of 1–50 total actions, deliberately below many provider plan limits. The underlying native batch command uses the reviewed source schema and provider limits. Request JSON is capped at 1 MiB; responses at 5 MiB; GraphQL query text at 64 KiB and 10000 parsed tokens; default timeout is 30 seconds. These caps do not raise Cloudflare quotas or plan allowances.

Rotation and revocation

Revoke or rotate the selected user/account token in its Cloudflare settings, update private configuration and restart every client using it. npm uninstall does not revoke the token, restore DNS, remove Rulesets or undo a cache purge. Keep account exports, DNS TXT values, signed URLs and diagnostic responses out of public issues.

4. Connect your client

Codex is the primary documented agent. After private credential setup:

bash
codex mcp add cloudflare -- npx -y @thenavidm/cloudflare-mcp-cli@latest
codex mcp list

Use the private env_vars TOML configuration in INSTALL.md to forward token/profile settings. Fully restart an npx @latest server to resolve the latest npm release. An already-running process keeps its existing version.

ClientSetup routeImportant detail
Codex desktop / CLIcodex mcp add or private config.tomlForward private env vars; choose CLI with SKILL.md for shell tasks
Claude DesktopVersioned .mcpb or manual local stdioSet sensitive token/file, defaults and policy in private extension settings
Claude Codeclaude mcp add --scope userOptional client; section 7 has its measured costs
CursorPrivate user mcp.jsonInterpolation/envFile must refer to private local settings
VS Code / CopilotUser MCP configurationservers root and secure input prompts
WindsurfPrivate Cascade MCP settingsReconnect after changes
Zedcontext_serversDirect command/args/env shape
Gemini CLIPrivate settings.jsonMerge mcpServers and inspect /mcp
Cline / other stdio clientsAdd local MCPAdapt command/args without committed credentials
Remote-only clientsOfficial HTTPS MCPThis package supplies local stdio, no public listener

The desktop archive vendors production dependencies. Host policies/runtime support and actual GUI installation remain separate from protocol discovery. INSTALL.md retains click-by-click steps and platform-specific launcher advice.

5. Check it works

bash
cloudflare-cli doctor
cloudflare-cli doctor --network
cloudflare-cli list-accounts --agent
cloudflare-cli list-zones --per-page 10 --agent
cloudflare-cli get-zone --zone-id YOUR_ZONE_ID --agent

Local doctor reports configuration, not credentials validated. --network checks an active token through its configured token-kind route; it does not prove access to every endpoint. First provider read should be the exact zone needed for the task. Do not create DNS records or purge cache merely to verify installation.

Full discovery has 29 tools; CLOUDFLARE_READ_ONLY=1 hides eleven mutations and direct calls still refuse. Local helpers expose no tokens or provider IDs. A missing credential exits 10; a valid install is not proof of provider account access.

6. Output, flags and exit codes

The house CLI derives tool flags from the same input schemas used by MCP. Tool names use underscores in MCP and hyphens in the shell. Native path/query arguments are top-level flags; current native request bodies use --payload JSON or --payload-file PATH, never both. --select filters returned data locally; it does not change Cloudflare's upstream fields or quota.

Flag / commandContract
tools / no commandDiscover every command; confirmed mutations are marked
COMMAND --helpActual tool schema arguments
schema COMMANDComplete JSON input schema, including native payload unions/references
--agentCompact JSON and no prompts; never confirms a write
--json / --compactMachine JSON, optionally compact
--select a,b.cLocal dotted result selection
--payload / --payload-fileNative JSON body / private regular JSON file
--account NAMEExact private profile label
--confirmExplicit intent for the selected mutation only
--no-input / --no-color / --yesNoninteractive formatting/prompt policy; no mutation permission
ExitMeaning
0Success
1Unexpected error
2Invalid input or refused mutation, an unknown command or a hidden write
3Not found
4Authentication/permission error
5Provider or transport failure
7Rate limited
10No credentials configured

Provider REST results retain success/result/result_info envelopes; query-only analytics retains data. HTTP 200 with provider errors fails. JSON output is not proof that DNS has propagated or every downstream service accepted a setting.

7. MCP or CLI and token cost

ModeWhat the client receivesEvidence required
Local MCPTool descriptions/schemas according to the client's loading policy; returned provider dataActual client/model usage for that loading mode
Shared CLIDiscovered help/SKILL.md and chosen command outputActual successful matched task usage
Official Code ModeSmall docs/search/execute interface and generated execution/resultIts provider claims are not our Codex measurements
Read-only / bounded outputFewer exposed writes, bounded pages and local --selectPolicy/output bounds, not a measured token reduction

Measured on 2026-10-05 against 2.0.1, the same day, with Claude Code 2.1.286 on Claude Opus 5.5 (one short prompt with and without the server connected, the difference read from the API's own usage figures) and Codex 0.159.3 on gpt-6.1-sol:

Cost2.0.13.0.0
Claude Code, every tool loaded, every message230,145144,067
Claude Code's default, tool search, every message608611
SKILL.md, read once3,9304,014
Codex over the CLI, one task, median of five104,40183,426
Codex over MCP, the same task, median of five40,54841,139

The task was "find the command that purges a zone's cache, and the flags it requires". Every tool loaded costs less because each native body appeared twice, as its own fields and inside payload, and 3.0.0 writes each repeated part once under $defs. Over the CLI, three 2.0.1 runs guessed a command that does not exist, cache or schema with no name, and every extra step carries the whole conversation forward; every 3.0.0 run read the help, asked which and read purge-cache --help. Over MCP, Codex prints its own TypeScript rendering of the tools it picks: it leaves the argument descriptions out of a tool whose schema is large, and sharing the repeats brought purge_cache under that size, so Codex now shows how to purge by tags, hosts or prefixes, 2,344 characters that 2.0.1's rendering left out. SKILL.md costs 84 more because it now says how approval works over MCP and lists every exit code.

Do not compare 29 tools against three Code Mode tools as a winner or claim a universal CLI saving; no other offering was measured.

8. Every tool and argument

Twenty-two current native operations and seven helpers. Each schema below comes from actual stdio discovery. Native payload bodies preserve required keys, enums, unions, nested references and source constraints. Missing zone_id/account_id may use the selected private profile default; other required arguments remain required. Confirmation is enforced outside ordinary schema-required lists.

MCP toolCLI commandPolicy
list_provider_accountscloudflare-cli list-provider-accountsRead / local helper
list_zonescloudflare-cli list-zonesRead / local helper
get_zonecloudflare-cli get-zoneRead / local helper
list_dns_recordscloudflare-cli list-dns-recordsRead / local helper
get_dns_recordcloudflare-cli get-dns-recordRead / local helper
create_dns_recordcloudflare-cli create-dns-recordExplicit confirmation required
update_dns_recordcloudflare-cli update-dns-recordExplicit confirmation required
overwrite_dns_recordcloudflare-cli overwrite-dns-recordExplicit confirmation required
delete_dns_recordcloudflare-cli delete-dns-recordExplicit confirmation required
batch_dns_recordscloudflare-cli batch-dns-recordsExplicit confirmation required
purge_cachecloudflare-cli purge-cacheExplicit confirmation required
get_zone_settingcloudflare-cli get-zone-settingRead / local helper
update_zone_settingcloudflare-cli update-zone-settingExplicit confirmation required
list_workerscloudflare-cli list-workersRead / local helper
list_zone_rulesetscloudflare-cli list-zone-rulesetsRead / local helper
get_zone_rulesetcloudflare-cli get-zone-rulesetRead / local helper
get_zone_entrypointcloudflare-cli get-zone-entrypointRead / local helper
create_zone_rulesetcloudflare-cli create-zone-rulesetExplicit confirmation required
update_zone_rulesetcloudflare-cli update-zone-rulesetExplicit confirmation required
delete_zone_rulesetcloudflare-cli delete-zone-rulesetExplicit confirmation required
list_page_rulescloudflare-cli list-page-rulesRead / local helper
get_page_rulecloudflare-cli get-page-ruleRead / local helper
list_accountscloudflare-cli list-accountsRead / local helper
get_operation_schemacloudflare-cli get-operation-schemaRead / local helper
preview_operationcloudflare-cli preview-operationRead / local helper
query_pagescloudflare-cli query-pagesRead / local helper
preview_dns_batchcloudflare-cli preview-dns-batchRead / local helper
apply_dns_batchcloudflare-cli apply-dns-batchExplicit confirmation required
analytics_querycloudflare-cli analytics-queryRead / local helper

list_provider_accounts

cloudflare-cli list-provider-accounts

List all accounts you have ownership or verified access to. Read operation.

ArgumentRequiredTypeDetails
nameNo; body and guard rules applystringName of the account.
pageNo; body and guard rules applynumberPage number of paginated results. minimum: 1. default: 1.
per_pageNo; body and guard rules applynumberMaximum number of results per page. minimum: 5. maximum: 50. default: 20.
directionNo; body and guard rules applystringDirection to order results. Values: asc, desc.
accountNo; body and guard rules applystringExact private profile label. Account/zone defaults route inputs; token permissions remain provider controlled.

Native operation: GET /accounts; accounts-list-accounts. Native body not required. Schema discovery is local; endpoint permissions/plan decisions remain provider controlled.

list_zones

cloudflare-cli list-zones

Lists, searches, sorts, and filters your zones. Listing zones across more than 500 accounts is currently not allowed. Read operation.

ArgumentRequiredTypeDetails
nameNo; body and guard rules applystringA domain name. Optional filter operators can be provided to extend refine the search: * equal (default) * not_equal * starts_with * ends_with * contains * starts_with_case_sensitive * ends_with_case_sensitive * contains_case_sensitive maxLength: 253.
statusNo; body and guard rules applystringSpecify a zone status to filter by. Values: initializing, pending, active, moved.
typeNo; body and guard rules applyarrayZone types to filter by. Multiple types can be specified as a comma-separated list (e.g., ?type=full,partial,secondary). When this parameter is not provided, zones with type "internal" are excluded from the results. Items: string.
account_idNo; body and guard rules applystringFilter by an account ID.
account_nameNo; body and guard rules applystringAn account Name. Optional filter operators can be provided to extend refine the search: * equal (default) * not_equal * starts_with * ends_with * contains * starts_with_case_sensitive * ends_with_case_sensitive * contains_case_sensitive maxLength: 253.
pageNo; body and guard rules applynumberPage number of paginated results. minimum: 1. default: 1.
per_pageNo; body and guard rules applynumberNumber of zones per page. minimum: 5. maximum: 50. default: 20.
orderNo; body and guard rules applystringField to order zones by. Values: name, status, account.id, account.name, plan.id.
directionNo; body and guard rules applystringDirection to order zones. Values: asc, desc.
matchNo; body and guard rules applystringWhether to match all search requirements or at least one (any). Values: any, all. default: all.
accountNo; body and guard rules applystringExact private profile label. Account/zone defaults route inputs; token permissions remain provider controlled.

Native operation: GET /zones; zones-get. Native body not required. Schema discovery is local; endpoint permissions/plan decisions remain provider controlled.

get_zone

cloudflare-cli get-zone

Retrieves detailed information about a specific zone identified by its zone ID.

Returns zone configuration, status, nameservers, and associated metadata. Read operation.

ArgumentRequiredTypeDetails
zone_idNo; body and guard rules applyzones_identifierSee current schema minLength: 1.
accountNo; body and guard rules applystringExact private profile label. Account/zone defaults route inputs; token permissions remain provider controlled.

Native operation: GET /zones/{zone_id}; zones-0-get. Native body not required. Schema discovery is local; endpoint permissions/plan decisions remain provider controlled.

list_dns_records

cloudflare-cli list-dns-records

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

ArgumentRequiredTypeDetails
zone_idNo; body and guard rules applydns-records_identifierSee current schema minLength: 1.
nameNo; body and guard rules applystringExact value of the DNS record name. This is a convenience alias for name.exact.
name_exactNo; body and guard rules applystringExact value of the DNS record name. Name filters are case-insensitive.
name_containsNo; body and guard rules applystringSubstring of the DNS record name. Name filters are case-insensitive.
name_startswithNo; body and guard rules applystringPrefix of the DNS record name. Name filters are case-insensitive.
name_endswithNo; body and guard rules applystringSuffix of the DNS record name. Name filters are case-insensitive.
typeNo; body and guard rules applydns-records_typeSee current schema
contentNo; body and guard rules applystringExact value of the DNS record content. This is a convenience alias for content.exact.
content_exactNo; body and guard rules applystringExact value of the DNS record content. Content filters are case-insensitive.
content_containsNo; body and guard rules applystringSubstring of the DNS record content. Content filters are case-insensitive.
content_startswithNo; body and guard rules applystringPrefix of the DNS record content. Content filters are case-insensitive.
content_endswithNo; body and guard rules applystringSuffix of the DNS record content. Content filters are case-insensitive.
proxiedNo; body and guard rules applydns-records_proxiedSee current schema
matchNo; body and guard rules applydns-records_matchSee current schema
commentNo; body and guard rules applystringExact value of the DNS record comment. This is a convenience alias for comment.exact.
comment_presentNo; body and guard rules applystringIf this parameter is present, only records with a comment are returned.
comment_absentNo; body and guard rules applystringIf this parameter is present, only records without a comment are returned.
comment_exactNo; body and guard rules applystringExact value of the DNS record comment. Comment filters are case-insensitive.
comment_containsNo; body and guard rules applystringSubstring of the DNS record comment. Comment filters are case-insensitive.
comment_startswithNo; body and guard rules applystringPrefix of the DNS record comment. Comment filters are case-insensitive.
comment_endswithNo; body and guard rules applystringSuffix of the DNS record comment. Comment filters are case-insensitive.
tagNo; body and guard rules applystringCondition on the DNS record tag. Parameter values can be of the form : to search for an exact name:value pair, or just `` to search for records with a specific tag name regardless of its value. This is a convenience shorthand for the more powerful tag. parameters. Examples: - tag=important is equivalent to tag.present=important - tag=team:DNS is equivalent to tag.exact=team:DNS
tag_presentNo; body and guard rules applystringName of a tag which must be present on the DNS record. Tag filters are case-insensitive.
tag_absentNo; body and guard rules applystringName of a tag which must not be present on the DNS record. Tag filters are case-insensitive.
tag_exactNo; body and guard rules applystringA tag and value, of the form :. The API will only return DNS records that have a tag named whose value is. Tag filters are case-insensitive.
tag_containsNo; body and guard rules applystringA tag and value, of the form :. The API will only return DNS records that have a tag named whose value contains. Tag filters are case-insensitive.
tag_startswithNo; body and guard rules applystringA tag and value, of the form :. The API will only return DNS records that have a tag named whose value starts with. Tag filters are case-insensitive.
tag_endswithNo; body and guard rules applystringA tag and value, of the form :. The API will only return DNS records that have a tag named whose value ends with. Tag filters are case-insensitive.
searchNo; body and guard rules applydns-records_searchSee current schema
tag_matchNo; body and guard rules applydns-records_tag_matchSee current schema
pageNo; body and guard rules applydns-records_pageSee current schema
per_pageNo; body and guard rules applydns-records_per_pageSee current schema
orderNo; body and guard rules applydns-records_orderSee current schema
directionNo; body and guard rules applydns-records_directionSee current schema
include_shadow_metadataNo; body and guard rules applybooleanWhether to include shadow metadata in the meta field of each record in the response. See Shadowed records. default: False.
shadowed_by_nameNo; body and guard rules applystringFilters the response to records at or below the specified NS delegation name. NS, DS, and NSEC records at the delegation name are excluded because they are not shadowed by that delegation. Those record types are included only when they exist below the delegation. The value must be a non-apex subdomain of the zone. Requires include_shadow_metadata=true. See Shadowed records.
shadowing_nameNo; body and guard rules applystringReturns NS records that shadow the given name, searching at the name itself and each of its ancestor names within the zone, excluding the zone apex. The value must be a subdomain of the zone; the zone apex is not accepted. See Shadowed records.
accountNo; body and guard rules applystringExact private profile label. Account/zone defaults route inputs; token permissions remain provider controlled.

Native operation: GET /zones/{zone_id}/dns_records; dns-records-for-a-zone-list-dns-records. Native body not required. Schema discovery is local; endpoint permissions/plan decisions remain provider controlled.

get_dns_record

cloudflare-cli get-dns-record

Retrieves details for a specific DNS record in the zone. Read operation.

ArgumentRequiredTypeDetails
dns_record_idYesdns-records_identifierSee current schema minLength: 1.
zone_idNo; body and guard rules applydns-records_identifierSee current schema minLength: 1.
include_shadow_metadataNo; body and guard rules applybooleanWhether to include shadow metadata in the meta field of each record in the response. See Shadowed records. default: False.
accountNo; body and guard rules applystringExact private profile label. Account/zone defaults route inputs; token permissions remain provider controlled.

Native operation: GET /zones/{zone_id}/dns_records/{dns_record_id}; dns-records-for-a-zone-dns-record-details. Native body not required. Schema discovery is local; endpoint permissions/plan decisions remain provider controlled.

create_dns_record

cloudflare-cli create-dns-record

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. Every change requires explicit confirmation; never repeat an unknown outcome automatically.
ArgumentRequiredTypeDetails
zone_idNo; body and guard rules applydns-records_identifierSee current schema minLength: 1.
include_shadow_metadataNo; body and guard rules applybooleanWhether to include shadow metadata in the meta field of each record in the response. See Shadowed records. default: False.
accountNo; body and guard rules applystringExact private profile label. Account/zone defaults route inputs; token permissions remain provider controlled.
confirmNo; body and guard rules applybooleanSet true only when the user asked for exactly this action.
payloadNo; body and guard rules applyobjectComplete current native JSON request body. Do not mix with payload_file.
payload_fileNo; body and guard rules applystringRegular non-symlink local JSON request file, at most 1 MiB. No credentials in public files. minLength: 1.

Native operation: POST /zones/{zone_id}/dns_records; dns-records-for-a-zone-create-dns-record. Native body required through payload or payload_file. Schema discovery is local; endpoint permissions/plan decisions remain provider controlled.

update_dns_record

cloudflare-cli update-dns-record

Update an existing DNS record.

Notes:

  • A/AAAA records cannot exist on the same name as CNAME records.
  • NS records cannot exist on the same name as any other record type.
  • Domain names are always represented in Punycode, even if Unicode characters were used when creating the record. Every change requires explicit confirmation; never repeat an unknown outcome automatically.
ArgumentRequiredTypeDetails
dns_record_idYesdns-records_identifierSee current schema minLength: 1.
zone_idNo; body and guard rules applydns-records_identifierSee current schema minLength: 1.
include_shadow_metadataNo; body and guard rules applybooleanWhether to include shadow metadata in the meta field of each record in the response. See Shadowed records. default: False.
accountNo; body and guard rules applystringExact private profile label. Account/zone defaults route inputs; token permissions remain provider controlled.
confirmNo; body and guard rules applybooleanSet true only when the user asked for exactly this action.
payloadNo; body and guard rules applyobjectComplete current native JSON request body. Do not mix with payload_file.
payload_fileNo; body and guard rules applystringRegular non-symlink local JSON request file, at most 1 MiB. No credentials in public files. minLength: 1.

Native operation: PATCH /zones/{zone_id}/dns_records/{dns_record_id}; dns-records-for-a-zone-patch-dns-record. Native body required through payload or payload_file. Schema discovery is local; endpoint permissions/plan decisions remain provider controlled.

overwrite_dns_record

cloudflare-cli overwrite-dns-record

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. Every change requires explicit confirmation; never repeat an unknown outcome automatically.
ArgumentRequiredTypeDetails
dns_record_idYesdns-records_identifierSee current schema minLength: 1.
zone_idNo; body and guard rules applydns-records_identifierSee current schema minLength: 1.
include_shadow_metadataNo; body and guard rules applybooleanWhether to include shadow metadata in the meta field of each record in the response. See Shadowed records. default: False.
accountNo; body and guard rules applystringExact private profile label. Account/zone defaults route inputs; token permissions remain provider controlled.
confirmNo; body and guard rules applybooleanSet true only when the user asked for exactly this action.
payloadNo; body and guard rules applyobjectComplete current native JSON request body. Do not mix with payload_file.
payload_fileNo; body and guard rules applystringRegular non-symlink local JSON request file, at most 1 MiB. No credentials in public files. minLength: 1.

Native operation: PUT /zones/{zone_id}/dns_records/{dns_record_id}; dns-records-for-a-zone-update-dns-record. Native body required through payload or payload_file. Schema discovery is local; endpoint permissions/plan decisions remain provider controlled.

delete_dns_record

cloudflare-cli delete-dns-record

Permanently removes a DNS record from the zone. Every change requires explicit confirmation; never repeat an unknown outcome automatically.

ArgumentRequiredTypeDetails
dns_record_idYesdns-records_identifierSee current schema minLength: 1.
zone_idNo; body and guard rules applydns-records_identifierSee current schema minLength: 1.
accountNo; body and guard rules applystringExact private profile label. Account/zone defaults route inputs; token permissions remain provider controlled.
confirmNo; body and guard rules applybooleanSet true only when the user asked for exactly this action.

Native operation: DELETE /zones/{zone_id}/dns_records/{dns_record_id}; dns-records-for-a-zone-delete-dns-record. Native body not required. Schema discovery is local; endpoint permissions/plan decisions remain provider controlled.

batch_dns_records

cloudflare-cli 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 Every change requires explicit confirmation; never repeat an unknown outcome automatically.
ArgumentRequiredTypeDetails
zone_idNo; body and guard rules applydns-records_identifierSee current schema minLength: 1.
include_shadow_metadataNo; body and guard rules applybooleanWhether to include shadow metadata in the meta field of each record in the response. See Shadowed records. default: False.
accountNo; body and guard rules applystringExact private profile label. Account/zone defaults route inputs; token permissions remain provider controlled.
confirmNo; body and guard rules applybooleanSet true only when the user asked for exactly this action.
payloadNo; body and guard rules applyobjectComplete current native JSON request body. Do not mix with payload_file.
payload_fileNo; body and guard rules applystringRegular non-symlink local JSON request file, at most 1 MiB. No credentials in public files. minLength: 1.

Native operation: POST /zones/{zone_id}/dns_records/batch; dns-records-for-a-zone-batch-dns-records. Native body required through payload or payload_file. Schema discovery is local; endpoint permissions/plan decisions remain provider controlled.

purge_cache

cloudflare-cli purge-cache

Deletes cached content in every Cloudflare data center and cache tier, including Cache Reserve. The next request for purged content is a cache MISS: Cloudflare fetches the full response from your origin and caches it again. Cloudflare does not serve purged content from cache again, even if your origin is unavailable.

To keep content cached and have Cloudflare revalidate it with your origin instead, use POST /zones/{zone_id}/invalidate_cache.

Choose what to purge

Send one of these fields in the request body:

  • files: specific URLs. If your cache key includes request headers, send each URL with the header values it was cached with.
  • tags: all content whose Cache-Tag response header contains one of the tags.
  • hosts: all content cached for the hostnames.
  • prefixes: all content whose URL starts with one of the prefixes.
  • purge_everything: all cached content in the zone.

Check the result

A 200 response with success: true means Cloudflare accepted the request. It does not confirm that any content was cached or removed. To check, request a purged URL and confirm that the CF-Cache-Status response header is MISS.

Availability and limits

Rate limits and the number of items you can send in one request depend on your plan. See Purge cache: availability and limits. Every change requires explicit confirmation; never repeat an unknown outcome automatically.

ArgumentRequiredTypeDetails
zone_idNo; body and guard rules applycache-purge_identifierThe zone ID. minLength: 1.
accountNo; body and guard rules applystringExact private profile label. Account/zone defaults route inputs; token permissions remain provider controlled.
confirmNo; body and guard rules applybooleanSet true only when the user asked for exactly this action.
payloadNo; body and guard rules applyUnionComplete current native JSON request body. Do not mix with payload_file.
payload_fileNo; body and guard rules applystringRegular non-symlink local JSON request file, at most 1 MiB. No credentials in public files. minLength: 1.

Native operation: POST /zones/{zone_id}/purge_cache; zone-purge. Native body required through payload or payload_file. Schema discovery is local; endpoint permissions/plan decisions remain provider controlled.

get_zone_setting

cloudflare-cli get-zone-setting

Fetch a single zone setting by name Read operation.

ArgumentRequiredTypeDetails
zone_idNo; body and guard rules applyzones_identifierSee current schema minLength: 1.
setting_idYeszones_setting_nameSee current schema minLength: 1.
accountNo; body and guard rules applystringExact private profile label. Account/zone defaults route inputs; token permissions remain provider controlled.

Native operation: GET /zones/{zone_id}/settings/{setting_id}; zone-settings-get-single-setting. Native body not required. Schema discovery is local; endpoint permissions/plan decisions remain provider controlled.

update_zone_setting

cloudflare-cli update-zone-setting

Updates a single zone setting by the identifier Every change requires explicit confirmation; never repeat an unknown outcome automatically.

ArgumentRequiredTypeDetails
zone_idNo; body and guard rules applyzones_identifierSee current schema minLength: 1.
setting_idYeszones_setting_nameSee current schema minLength: 1.
accountNo; body and guard rules applystringExact private profile label. Account/zone defaults route inputs; token permissions remain provider controlled.
confirmNo; body and guard rules applybooleanSet true only when the user asked for exactly this action.
payloadNo; body and guard rules applyUnionComplete current native JSON request body. Do not mix with payload_file.
payload_fileNo; body and guard rules applystringRegular non-symlink local JSON request file, at most 1 MiB. No credentials in public files. minLength: 1.

Native operation: PATCH /zones/{zone_id}/settings/{setting_id}; zone-settings-edit-single-setting. Native body required through payload or payload_file. Schema discovery is local; endpoint permissions/plan decisions remain provider controlled.

list_workers

cloudflare-cli list-workers

Fetch a list of uploaded Worker scripts. Read operation.

ArgumentRequiredTypeDetails
account_idNo; body and guard rules applyworkers_identifierSee current schema minLength: 1.
tagsNo; body and guard rules applystringFilter scripts by tags. Format: comma-separated list of tag:allowed pairs where allowed is 'yes' or 'no'.
accountNo; body and guard rules applystringExact private profile label. Account/zone defaults route inputs; token permissions remain provider controlled.

Native operation: GET /accounts/{account_id}/workers/scripts; worker-script-list-workers. Native body not required. Schema discovery is local; endpoint permissions/plan decisions remain provider controlled.

list_zone_rulesets

cloudflare-cli list-zone-rulesets

Fetches all rulesets at the zone level. Read operation.

ArgumentRequiredTypeDetails
zone_idNo; body and guard rules applyrulesets_ZoneIdSee current schema minLength: 1.
cursorNo; body and guard rules applyrulesets_CursorSee current schema
per_pageNo; body and guard rules applyrulesets_PerPageSee current schema
accountNo; body and guard rules applystringExact private profile label. Account/zone defaults route inputs; token permissions remain provider controlled.

Native operation: GET /zones/{zone_id}/rulesets; listZoneRulesets. Native body not required. Schema discovery is local; endpoint permissions/plan decisions remain provider controlled.

get_zone_ruleset

cloudflare-cli get-zone-ruleset

Fetches the latest version of a zone ruleset. Read operation.

ArgumentRequiredTypeDetails
ruleset_idYesrulesets_RulesetIdSee current schema minLength: 1.
zone_idNo; body and guard rules applyrulesets_ZoneIdSee current schema minLength: 1.
accountNo; body and guard rules applystringExact private profile label. Account/zone defaults route inputs; token permissions remain provider controlled.

Native operation: GET /zones/{zone_id}/rulesets/{ruleset_id}; getZoneRuleset. Native body not required. Schema discovery is local; endpoint permissions/plan decisions remain provider controlled.

get_zone_entrypoint

cloudflare-cli get-zone-entrypoint

Fetches the latest version of the zone entry point ruleset for a given phase. Read operation.

ArgumentRequiredTypeDetails
ruleset_phaseYesrulesets_RulesetPhaseSee current schema minLength: 1.
zone_idNo; body and guard rules applyrulesets_ZoneIdSee current schema minLength: 1.
accountNo; body and guard rules applystringExact private profile label. Account/zone defaults route inputs; token permissions remain provider controlled.

Native operation: GET /zones/{zone_id}/rulesets/phases/{ruleset_phase}/entrypoint; getZoneEntrypointRuleset. Native body not required. Schema discovery is local; endpoint permissions/plan decisions remain provider controlled.

create_zone_ruleset

cloudflare-cli create-zone-ruleset

Creates a ruleset at the zone level. Every change requires explicit confirmation; never repeat an unknown outcome automatically.

ArgumentRequiredTypeDetails
zone_idNo; body and guard rules applyrulesets_ZoneIdSee current schema minLength: 1.
dry_runNo; body and guard rules applybooleanValidates the request without persisting changes when set to true. Responses that normally return 200 return result: null; endpoints that normally return 204 continue to return 204. default: False.
accountNo; body and guard rules applystringExact private profile label. Account/zone defaults route inputs; token permissions remain provider controlled.
confirmNo; body and guard rules applybooleanSet true only when the user asked for exactly this action.
payloadNo; body and guard rules applyJSONComplete current native JSON request body. Do not mix with payload_file.
payload_fileNo; body and guard rules applystringRegular non-symlink local JSON request file, at most 1 MiB. No credentials in public files. minLength: 1.

Native operation: POST /zones/{zone_id}/rulesets; createZoneRuleset. Native body required through payload or payload_file. Schema discovery is local; endpoint permissions/plan decisions remain provider controlled.

update_zone_ruleset

cloudflare-cli update-zone-ruleset

Updates a zone ruleset, creating a new version. Every change requires explicit confirmation; never repeat an unknown outcome automatically.

ArgumentRequiredTypeDetails
ruleset_idYesrulesets_RulesetIdSee current schema minLength: 1.
zone_idNo; body and guard rules applyrulesets_ZoneIdSee current schema minLength: 1.
dry_runNo; body and guard rules applybooleanValidates the request without persisting changes when set to true. Responses that normally return 200 return result: null; endpoints that normally return 204 continue to return 204. default: False.
accountNo; body and guard rules applystringExact private profile label. Account/zone defaults route inputs; token permissions remain provider controlled.
confirmNo; body and guard rules applybooleanSet true only when the user asked for exactly this action.
payloadNo; body and guard rules applyJSONComplete current native JSON request body. Do not mix with payload_file.
payload_fileNo; body and guard rules applystringRegular non-symlink local JSON request file, at most 1 MiB. No credentials in public files. minLength: 1.

Native operation: PUT /zones/{zone_id}/rulesets/{ruleset_id}; updateZoneRuleset. Native body required through payload or payload_file. Schema discovery is local; endpoint permissions/plan decisions remain provider controlled.

delete_zone_ruleset

cloudflare-cli delete-zone-ruleset

Deletes all versions of an existing zone ruleset. Every change requires explicit confirmation; never repeat an unknown outcome automatically.

ArgumentRequiredTypeDetails
ruleset_idYesrulesets_RulesetIdSee current schema minLength: 1.
zone_idNo; body and guard rules applyrulesets_ZoneIdSee current schema minLength: 1.
dry_runNo; body and guard rules applybooleanValidates the request without persisting changes when set to true. Responses that normally return 200 return result: null; endpoints that normally return 204 continue to return 204. default: False.
accountNo; body and guard rules applystringExact private profile label. Account/zone defaults route inputs; token permissions remain provider controlled.
confirmNo; body and guard rules applybooleanSet true only when the user asked for exactly this action.

Native operation: DELETE /zones/{zone_id}/rulesets/{ruleset_id}; deleteZoneRuleset. Native body not required. Schema discovery is local; endpoint permissions/plan decisions remain provider controlled.

list_page_rules

cloudflare-cli list-page-rules

Fetches Page Rules in a zone. Read operation.

ArgumentRequiredTypeDetails
zone_idNo; body and guard rules applyzones_identifier-2See current schema minLength: 1.
orderNo; body and guard rules applystringThe field used to sort returned Page Rules. Values: status, priority. default: priority.
directionNo; body and guard rules applystringThe direction used to sort returned Page Rules. Values: asc, desc. default: desc.
matchNo; body and guard rules applystringWhen set to all, all the search requirements must match. When set to any, only one of the search requirements has to match. Values: any, all. default: all.
statusNo; body and guard rules applystringThe status of the Page Rule. Values: active, disabled. default: disabled.
accountNo; body and guard rules applystringExact private profile label. Account/zone defaults route inputs; token permissions remain provider controlled.

Native operation: GET /zones/{zone_id}/pagerules; page-rules-list-page-rules. Native body not required. Schema discovery is local; endpoint permissions/plan decisions remain provider controlled.

get_page_rule

cloudflare-cli get-page-rule

Fetches the details of a Page Rule. Read operation.

ArgumentRequiredTypeDetails
pagerule_idYeszones_identifier-2See current schema minLength: 1.
zone_idNo; body and guard rules applyzones_identifier-2See current schema minLength: 1.
accountNo; body and guard rules applystringExact private profile label. Account/zone defaults route inputs; token permissions remain provider controlled.

Native operation: GET /zones/{zone_id}/pagerules/{pagerule_id}; page-rules-get-a-page-rule. Native body not required. Schema discovery is local; endpoint permissions/plan decisions remain provider controlled.

list_accounts

cloudflare-cli list-accounts

Local profile labels/default/auth method only. No provider IDs, credential values or paths. No network.

ArgumentRequiredTypeDetails
NoneNoNoneNo arguments

get_operation_schema

cloudflare-cli get-operation-schema

Complete selected current API input, path and query schema. Local metadata only.

ArgumentRequiredTypeDetails
operationYesstringSee the full input schema. Values: list_provider_accounts, list_zones, get_zone, list_dns_records, get_dns_record, create_dns_record, update_dns_record, overwrite_dns_record, delete_dns_record, batch_dns_records, purge_cache, get_zone_setting, update_zone_setting, list_workers, list_zone_rulesets, get_zone_ruleset, get_zone_entrypoint, create_zone_ruleset, update_zone_ruleset, delete_zone_ruleset, list_page_rules, get_page_rule.

preview_operation

cloudflare-cli preview-operation

Validate a named operation and return its exact local method/path/query/body/profile. No request, auth validation or provider policy checks.

ArgumentRequiredTypeDetails
operationYesstringSee the full input schema. Values: list_provider_accounts, list_zones, get_zone, list_dns_records, get_dns_record, create_dns_record, update_dns_record, overwrite_dns_record, delete_dns_record, batch_dns_records, purge_cache, get_zone_setting, update_zone_setting, list_workers, list_zone_rulesets, get_zone_ruleset, get_zone_entrypoint, create_zone_ruleset, update_zone_ruleset, delete_zone_ruleset, list_page_rules, get_page_rule.
argumentsYesobjectSee the full input schema.

query_pages

cloudflare-cli query-pages

Read at most five pages of a supported paginated named operation. Provider page metadata determines continuation; missing metadata stops with an explicit unknown continuation.

ArgumentRequiredTypeDetails
operationYesstringSee the full input schema. Values: list_provider_accounts, list_zones, list_dns_records.
argumentsYesobjectSee the full input schema.
max_pagesNo; body and guard rules applyintegerSee the full input schema. minimum: 1. maximum: 5. default: 1.

preview_dns_batch

cloudflare-cli preview-dns-batch

Local schema-validated DNS batch review capped at 50 actions. Digest binds exact JSON body, zone path and profile label; no account or DNS state read. Not a provider authorization grant.

ArgumentRequiredTypeDetails
zone_idNo; body and guard rules applystringSee the full input schema. minLength: 1. maxLength: 32.
accountNo; body and guard rules applystringSee the full input schema.
payloadNo; body and guard rules applyobjectSee the full input schema.
payload_fileNo; body and guard rules applystringSee the full input schema. minLength: 1.

apply_dns_batch

cloudflare-cli apply-dns-batch

Verify the reviewed digest and submit one exact native DNS batch with mandatory confirmation. Does not assert remote-state consistency or atomic DNS propagation; no retry.

ArgumentRequiredTypeDetails
zone_idNo; body and guard rules applystringSee the full input schema. minLength: 1. maxLength: 32.
accountNo; body and guard rules applystringSee the full input schema.
payloadNo; body and guard rules applyobjectSee the full input schema.
payload_fileNo; body and guard rules applystringSee the full input schema. minLength: 1.
preview_sha256YesstringSee the full input schema. pattern: ^[0-9a-f]{64}$.
confirmNo; body and guard rules applybooleanSet true only when the user asked for exactly this action.

analytics_query

cloudflare-cli analytics-query

One parsed GraphQL query only, with variables. No mutations, subscriptions or multiple operations. Permissions, dataset retention, sampling and query limits remain provider controlled.

ArgumentRequiredTypeDetails
queryYesstringSee the full input schema. minLength: 1. maxLength: 65536.
variablesNo; body and guard rules applyobjectSee the full input schema.
accountNo; body and guard rules applystringSee the full input schema.

Nested native input definitions

Identical object shapes are listed once below. References point to the named definitions; union branches retain their individual requirements. Some provider JSON-schema conditions do not fit a flat table; use schema COMMAND or get_operation_schema for complete validation. Unknown native root body keys are refused locally; provider constraints still apply.

list_provider_accounts
ArgumentRequiredTypeDetails
nameNo; body and guard rules applystringName of the account.
pageNo; body and guard rules applynumberPage number of paginated results. minimum: 1. default: 1.
per_pageNo; body and guard rules applynumberMaximum number of results per page. minimum: 5. maximum: 50. default: 20.
directionNo; body and guard rules applystringDirection to order results. Values: asc, desc.
accountNo; body and guard rules applystringExact private profile label. Account/zone defaults route inputs; token permissions remain provider controlled.
list_zones
ArgumentRequiredTypeDetails
nameNo; body and guard rules applystringA domain name. Optional filter operators can be provided to extend refine the search: * equal (default) * not_equal * starts_with * ends_with * contains * starts_with_case_sensitive * ends_with_case_sensitive * contains_case_sensitive maxLength: 253.
statusNo; body and guard rules applystringSpecify a zone status to filter by. Values: initializing, pending, active, moved.
typeNo; body and guard rules applyarrayZone types to filter by. Multiple types can be specified as a comma-separated list (e.g., ?type=full,partial,secondary). When this parameter is not provided, zones with type "internal" are excluded from the results. Items: string.
account_idNo; body and guard rules applystringFilter by an account ID.
account_nameNo; body and guard rules applystringAn account Name. Optional filter operators can be provided to extend refine the search: * equal (default) * not_equal * starts_with * ends_with * contains * starts_with_case_sensitive * ends_with_case_sensitive * contains_case_sensitive maxLength: 253.
pageNo; body and guard rules applynumberPage number of paginated results. minimum: 1. default: 1.
per_pageNo; body and guard rules applynumberNumber of zones per page. minimum: 5. maximum: 50. default: 20.
orderNo; body and guard rules applystringField to order zones by. Values: name, status, account.id, account.name, plan.id.
directionNo; body and guard rules applystringDirection to order zones. Values: asc, desc.
matchNo; body and guard rules applystringWhether to match all search requirements or at least one (any). Values: any, all. default: all.
accountNo; body and guard rules applystringExact private profile label. Account/zone defaults route inputs; token permissions remain provider controlled.
get_zone
ArgumentRequiredTypeDetails
zone_idNo; body and guard rules applyzones_identifierSee current schema minLength: 1.
accountNo; body and guard rules applystringExact private profile label. Account/zone defaults route inputs; token permissions remain provider controlled.
list_dns_records
ArgumentRequiredTypeDetails
zone_idNo; body and guard rules applydns-records_identifierSee current schema minLength: 1.
nameNo; body and guard rules applystringExact value of the DNS record name. This is a convenience alias for name.exact.
name_exactNo; body and guard rules applystringExact value of the DNS record name. Name filters are case-insensitive.
name_containsNo; body and guard rules applystringSubstring of the DNS record name. Name filters are case-insensitive.
name_startswithNo; body and guard rules applystringPrefix of the DNS record name. Name filters are case-insensitive.
name_endswithNo; body and guard rules applystringSuffix of the DNS record name. Name filters are case-insensitive.
typeNo; body and guard rules applydns-records_typeSee current schema
contentNo; body and guard rules applystringExact value of the DNS record content. This is a convenience alias for content.exact.
content_exactNo; body and guard rules applystringExact value of the DNS record content. Content filters are case-insensitive.
content_containsNo; body and guard rules applystringSubstring of the DNS record content. Content filters are case-insensitive.
content_startswithNo; body and guard rules applystringPrefix of the DNS record content. Content filters are case-insensitive.
content_endswithNo; body and guard rules applystringSuffix of the DNS record content. Content filters are case-insensitive.
proxiedNo; body and guard rules applydns-records_proxiedSee current schema
matchNo; body and guard rules applydns-records_matchSee current schema
commentNo; body and guard rules applystringExact value of the DNS record comment. This is a convenience alias for comment.exact.
comment_presentNo; body and guard rules applystringIf this parameter is present, only records with a comment are returned.
comment_absentNo; body and guard rules applystringIf this parameter is present, only records without a comment are returned.
comment_exactNo; body and guard rules applystringExact value of the DNS record comment. Comment filters are case-insensitive.
comment_containsNo; body and guard rules applystringSubstring of the DNS record comment. Comment filters are case-insensitive.
comment_startswithNo; body and guard rules applystringPrefix of the DNS record comment. Comment filters are case-insensitive.
comment_endswithNo; body and guard rules applystringSuffix of the DNS record comment. Comment filters are case-insensitive.
tagNo; body and guard rules applystringCondition on the DNS record tag. Parameter values can be of the form : to search for an exact name:value pair, or just `` to search for records with a specific tag name regardless of its value. This is a convenience shorthand for the more powerful tag. parameters. Examples: - tag=important is equivalent to tag.present=important - tag=team:DNS is equivalent to tag.exact=team:DNS
tag_presentNo; body and guard rules applystringName of a tag which must be present on the DNS record. Tag filters are case-insensitive.
tag_absentNo; body and guard rules applystringName of a tag which must not be present on the DNS record. Tag filters are case-insensitive.
tag_exactNo; body and guard rules applystringA tag and value, of the form :. The API will only return DNS records that have a tag named whose value is. Tag filters are case-insensitive.
tag_containsNo; body and guard rules applystringA tag and value, of the form :. The API will only return DNS records that have a tag named whose value contains. Tag filters are case-insensitive.
tag_startswithNo; body and guard rules applystringA tag and value, of the form :. The API will only return DNS records that have a tag named whose value starts with. Tag filters are case-insensitive.
tag_endswithNo; body and guard rules applystringA tag and value, of the form :. The API will only return DNS records that have a tag named whose value ends with. Tag filters are case-insensitive.
searchNo; body and guard rules applydns-records_searchSee current schema
tag_matchNo; body and guard rules applydns-records_tag_matchSee current schema
pageNo; body and guard rules applydns-records_pageSee current schema
per_pageNo; body and guard rules applydns-records_per_pageSee current schema
orderNo; body and guard rules applydns-records_orderSee current schema
directionNo; body and guard rules applydns-records_directionSee current schema
include_shadow_metadataNo; body and guard rules applybooleanWhether to include shadow metadata in the meta field of each record in the response. See Shadowed records. default: False.
shadowed_by_nameNo; body and guard rules applystringFilters the response to records at or below the specified NS delegation name. NS, DS, and NSEC records at the delegation name are excluded because they are not shadowed by that delegation. Those record types are included only when they exist below the delegation. The value must be a non-apex subdomain of the zone. Requires include_shadow_metadata=true. See Shadowed records.
shadowing_nameNo; body and guard rules applystringReturns NS records that shadow the given name, searching at the name itself and each of its ancestor names within the zone, excluding the zone apex. The value must be a subdomain of the zone; the zone apex is not accepted. See Shadowed records.
accountNo; body and guard rules applystringExact private profile label. Account/zone defaults route inputs; token permissions remain provider controlled.
get_dns_record
ArgumentRequiredTypeDetails
dns_record_idYesdns-records_identifierSee current schema minLength: 1.
zone_idNo; body and guard rules applydns-records_identifierSee current schema minLength: 1.
include_shadow_metadataNo; body and guard rules applybooleanWhether to include shadow metadata in the meta field of each record in the response. See Shadowed records. default: False.
accountNo; body and guard rules applystringExact private profile label. Account/zone defaults route inputs; token permissions remain provider controlled.
create_dns_record
ArgumentRequiredTypeDetails
zone_idNo; body and guard rules applydns-records_identifierSee current schema minLength: 1.
include_shadow_metadataNo; body and guard rules applybooleanWhether to include shadow metadata in the meta field of each record in the response. See Shadowed records. default: False.
accountNo; body and guard rules applystringExact private profile label. Account/zone defaults route inputs; token permissions remain provider controlled.
confirmNo; body and guard rules applybooleanSet true only when the user asked for exactly this action.
payloadNo; body and guard rules applyobjectComplete current native JSON request body. Do not mix with payload_file.
payload_fileNo; body and guard rules applystringRegular non-symlink local JSON request file, at most 1 MiB. No credentials in public files. minLength: 1.
update_dns_record
ArgumentRequiredTypeDetails
dns_record_idYesdns-records_identifierSee current schema minLength: 1.
zone_idNo; body and guard rules applydns-records_identifierSee current schema minLength: 1.
include_shadow_metadataNo; body and guard rules applybooleanWhether to include shadow metadata in the meta field of each record in the response. See Shadowed records. default: False.
accountNo; body and guard rules applystringExact private profile label. Account/zone defaults route inputs; token permissions remain provider controlled.
confirmNo; body and guard rules applybooleanSet true only when the user asked for exactly this action.
payloadNo; body and guard rules applyobjectComplete current native JSON request body. Do not mix with payload_file.
payload_fileNo; body and guard rules applystringRegular non-symlink local JSON request file, at most 1 MiB. No credentials in public files. minLength: 1.
delete_dns_record
ArgumentRequiredTypeDetails
dns_record_idYesdns-records_identifierSee current schema minLength: 1.
zone_idNo; body and guard rules applydns-records_identifierSee current schema minLength: 1.
accountNo; body and guard rules applystringExact private profile label. Account/zone defaults route inputs; token permissions remain provider controlled.
confirmNo; body and guard rules applybooleanSet true only when the user asked for exactly this action.
batch_dns_records
ArgumentRequiredTypeDetails
zone_idNo; body and guard rules applydns-records_identifierSee current schema minLength: 1.
include_shadow_metadataNo; body and guard rules applybooleanWhether to include shadow metadata in the meta field of each record in the response. See Shadowed records. default: False.
accountNo; body and guard rules applystringExact private profile label. Account/zone defaults route inputs; token permissions remain provider controlled.
confirmNo; body and guard rules applybooleanSet true only when the user asked for exactly this action.
payloadNo; body and guard rules applyobjectComplete current native JSON request body. Do not mix with payload_file.
payload_fileNo; body and guard rules applystringRegular non-symlink local JSON request file, at most 1 MiB. No credentials in public files. minLength: 1.
batch_dns_records.payload
ArgumentRequiredTypeDetails
deletesNo; body and guard rules applyarraySee the full input schema. Items: dns-records_dns-record-batch-delete.
patchesNo; body and guard rules applyarraySee the full input schema. Items: dns-records_dns-record-batch-patch.
postsNo; body and guard rules applyarraySee the full input schema. Items: dns-records_dns-record-batch-post.
putsNo; body and guard rules applyarraySee the full input schema. Items: dns-records_dns-record-batch-put.
purge_cache
ArgumentRequiredTypeDetails
zone_idNo; body and guard rules applycache-purge_identifierThe zone ID. minLength: 1.
accountNo; body and guard rules applystringExact private profile label. Account/zone defaults route inputs; token permissions remain provider controlled.
confirmNo; body and guard rules applybooleanSet true only when the user asked for exactly this action.
payloadNo; body and guard rules applyUnionComplete current native JSON request body. Do not mix with payload_file.
payload_fileNo; body and guard rules applystringRegular non-symlink local JSON request file, at most 1 MiB. No credentials in public files. minLength: 1.
get_zone_setting
ArgumentRequiredTypeDetails
zone_idNo; body and guard rules applyzones_identifierSee current schema minLength: 1.
setting_idYeszones_setting_nameSee current schema minLength: 1.
accountNo; body and guard rules applystringExact private profile label. Account/zone defaults route inputs; token permissions remain provider controlled.
update_zone_setting
ArgumentRequiredTypeDetails
zone_idNo; body and guard rules applyzones_identifierSee current schema minLength: 1.
setting_idYeszones_setting_nameSee current schema minLength: 1.
accountNo; body and guard rules applystringExact private profile label. Account/zone defaults route inputs; token permissions remain provider controlled.
confirmNo; body and guard rules applybooleanSet true only when the user asked for exactly this action.
payloadNo; body and guard rules applyUnionComplete current native JSON request body. Do not mix with payload_file.
payload_fileNo; body and guard rules applystringRegular non-symlink local JSON request file, at most 1 MiB. No credentials in public files. minLength: 1.
update_zone_setting.payload.oneOf[0]
ArgumentRequiredTypeDetails
enabledNo; body and guard rules applyzones_ssl_recommender_enabledSee the full input schema.
update_zone_setting.payload.oneOf[1]
ArgumentRequiredTypeDetails
valueNo; body and guard rules applyzones_setting_valueSee the full input schema.
list_workers
ArgumentRequiredTypeDetails
account_idNo; body and guard rules applyworkers_identifierSee current schema minLength: 1.
tagsNo; body and guard rules applystringFilter scripts by tags. Format: comma-separated list of tag:allowed pairs where allowed is 'yes' or 'no'.
accountNo; body and guard rules applystringExact private profile label. Account/zone defaults route inputs; token permissions remain provider controlled.
list_zone_rulesets
ArgumentRequiredTypeDetails
zone_idNo; body and guard rules applyrulesets_ZoneIdSee current schema minLength: 1.
cursorNo; body and guard rules applyrulesets_CursorSee current schema
per_pageNo; body and guard rules applyrulesets_PerPageSee current schema
accountNo; body and guard rules applystringExact private profile label. Account/zone defaults route inputs; token permissions remain provider controlled.
get_zone_ruleset
ArgumentRequiredTypeDetails
ruleset_idYesrulesets_RulesetIdSee current schema minLength: 1.
zone_idNo; body and guard rules applyrulesets_ZoneIdSee current schema minLength: 1.
accountNo; body and guard rules applystringExact private profile label. Account/zone defaults route inputs; token permissions remain provider controlled.
get_zone_entrypoint
ArgumentRequiredTypeDetails
ruleset_phaseYesrulesets_RulesetPhaseSee current schema minLength: 1.
zone_idNo; body and guard rules applyrulesets_ZoneIdSee current schema minLength: 1.
accountNo; body and guard rules applystringExact private profile label. Account/zone defaults route inputs; token permissions remain provider controlled.
create_zone_ruleset
ArgumentRequiredTypeDetails
zone_idNo; body and guard rules applyrulesets_ZoneIdSee current schema minLength: 1.
dry_runNo; body and guard rules applybooleanValidates the request without persisting changes when set to true. Responses that normally return 200 return result: null; endpoints that normally return 204 continue to return 204. default: False.
accountNo; body and guard rules applystringExact private profile label. Account/zone defaults route inputs; token permissions remain provider controlled.
confirmNo; body and guard rules applybooleanSet true only when the user asked for exactly this action.
payloadNo; body and guard rules applyJSONComplete current native JSON request body. Do not mix with payload_file.
payload_fileNo; body and guard rules applystringRegular non-symlink local JSON request file, at most 1 MiB. No credentials in public files. minLength: 1.
create_zone_ruleset.payload.allOf[1]
ArgumentRequiredTypeDetails
kindNo; body and guard rules applyrulesets_RulesetKindSee the full input schema.
phaseNo; body and guard rules applyrulesets_RulesetPhaseSee the full input schema.
rulesNo; body and guard rules applyrulesets_RequestRulesSee the full input schema.
update_zone_ruleset
ArgumentRequiredTypeDetails
ruleset_idYesrulesets_RulesetIdSee current schema minLength: 1.
zone_idNo; body and guard rules applyrulesets_ZoneIdSee current schema minLength: 1.
dry_runNo; body and guard rules applybooleanValidates the request without persisting changes when set to true. Responses that normally return 200 return result: null; endpoints that normally return 204 continue to return 204. default: False.
accountNo; body and guard rules applystringExact private profile label. Account/zone defaults route inputs; token permissions remain provider controlled.
confirmNo; body and guard rules applybooleanSet true only when the user asked for exactly this action.
payloadNo; body and guard rules applyJSONComplete current native JSON request body. Do not mix with payload_file.
payload_fileNo; body and guard rules applystringRegular non-symlink local JSON request file, at most 1 MiB. No credentials in public files. minLength: 1.
delete_zone_ruleset
ArgumentRequiredTypeDetails
ruleset_idYesrulesets_RulesetIdSee current schema minLength: 1.
zone_idNo; body and guard rules applyrulesets_ZoneIdSee current schema minLength: 1.
dry_runNo; body and guard rules applybooleanValidates the request without persisting changes when set to true. Responses that normally return 200 return result: null; endpoints that normally return 204 continue to return 204. default: False.
accountNo; body and guard rules applystringExact private profile label. Account/zone defaults route inputs; token permissions remain provider controlled.
confirmNo; body and guard rules applybooleanSet true only when the user asked for exactly this action.
list_page_rules
ArgumentRequiredTypeDetails
zone_idNo; body and guard rules applyzones_identifier-2See current schema minLength: 1.
orderNo; body and guard rules applystringThe field used to sort returned Page Rules. Values: status, priority. default: priority.
directionNo; body and guard rules applystringThe direction used to sort returned Page Rules. Values: asc, desc. default: desc.
matchNo; body and guard rules applystringWhen set to all, all the search requirements must match. When set to any, only one of the search requirements has to match. Values: any, all. default: all.
statusNo; body and guard rules applystringThe status of the Page Rule. Values: active, disabled. default: disabled.
accountNo; body and guard rules applystringExact private profile label. Account/zone defaults route inputs; token permissions remain provider controlled.
get_page_rule
ArgumentRequiredTypeDetails
pagerule_idYeszones_identifier-2See current schema minLength: 1.
zone_idNo; body and guard rules applyzones_identifier-2See current schema minLength: 1.
accountNo; body and guard rules applystringExact private profile label. Account/zone defaults route inputs; token permissions remain provider controlled.
get_operation_schema
ArgumentRequiredTypeDetails
operationYesstringSee the full input schema. Values: list_provider_accounts, list_zones, get_zone, list_dns_records, get_dns_record, create_dns_record, update_dns_record, overwrite_dns_record, delete_dns_record, batch_dns_records, purge_cache, get_zone_setting, update_zone_setting, list_workers, list_zone_rulesets, get_zone_ruleset, get_zone_entrypoint, create_zone_ruleset, update_zone_ruleset, delete_zone_ruleset, list_page_rules, get_page_rule.
preview_operation
ArgumentRequiredTypeDetails
operationYesstringSee the full input schema. Values: list_provider_accounts, list_zones, get_zone, list_dns_records, get_dns_record, create_dns_record, update_dns_record, overwrite_dns_record, delete_dns_record, batch_dns_records, purge_cache, get_zone_setting, update_zone_setting, list_workers, list_zone_rulesets, get_zone_ruleset, get_zone_entrypoint, create_zone_ruleset, update_zone_ruleset, delete_zone_ruleset, list_page_rules, get_page_rule.
argumentsYesobjectSee the full input schema.
query_pages
ArgumentRequiredTypeDetails
operationYesstringSee the full input schema. Values: list_provider_accounts, list_zones, list_dns_records.
argumentsYesobjectSee the full input schema.
max_pagesNo; body and guard rules applyintegerSee the full input schema. minimum: 1. maximum: 5. default: 1.
preview_dns_batch
ArgumentRequiredTypeDetails
zone_idNo; body and guard rules applystringSee the full input schema. minLength: 1. maxLength: 32.
accountNo; body and guard rules applystringSee the full input schema.
payloadNo; body and guard rules applyobjectSee the full input schema.
payload_fileNo; body and guard rules applystringSee the full input schema. minLength: 1.
preview_dns_batch.payload
ArgumentRequiredTypeDetails
deletesNo; body and guard rules applyarraySee the full input schema. Items: dns-records_dns-record-batch-delete.
patchesNo; body and guard rules applyarraySee the full input schema. Items: dns-records_dns-record-batch-patch.
postsNo; body and guard rules applyarraySee the full input schema. Items: dns-records_dns-record-batch-post.
putsNo; body and guard rules applyarraySee the full input schema. Items: dns-records_dns-record-batch-put.
apply_dns_batch
ArgumentRequiredTypeDetails
zone_idNo; body and guard rules applystringSee the full input schema. minLength: 1. maxLength: 32.
accountNo; body and guard rules applystringSee the full input schema.
payloadNo; body and guard rules applyobjectSee the full input schema.
payload_fileNo; body and guard rules applystringSee the full input schema. minLength: 1.
preview_sha256YesstringSee the full input schema. pattern: ^[0-9a-f]{64}$.
confirmNo; body and guard rules applybooleanSet true only when the user asked for exactly this action.
analytics_query
ArgumentRequiredTypeDetails
queryYesstringSee the full input schema. minLength: 1. maxLength: 65536.
variablesNo; body and guard rules applyobjectSee the full input schema.
accountNo; body and guard rules applystringSee the full input schema.
dns-records_AAAARecord.allOf[1]
ArgumentRequiredTypeDetails
contentNo; body and guard rules applystringA valid IPv6 address. format: ipv6.
private_routingNo; body and guard rules applybooleanEnables private network routing to the origin. default: False.
typeNo; body and guard rules applystringRecord type. Values: AAAA.
dns-records_ARecord.allOf[1]
ArgumentRequiredTypeDetails
contentNo; body and guard rules applystringA valid IPv4 address. format: ipv4.
private_routingNo; body and guard rules applybooleanEnables private network routing to the origin. default: False.
typeNo; body and guard rules applystringRecord type. Values: A.
dns-records_CAARecord.allOf[1]
ArgumentRequiredTypeDetails
contentNo; body and guard rules applystringFormatted CAA content. See 'data' to set CAA properties.
dataNo; body and guard rules applyobjectComponents of a CAA record.
typeNo; body and guard rules applystringRecord type. Values: CAA.
dns-records_CAARecord.allOf[1].data
ArgumentRequiredTypeDetails
flagsNo; body and guard rules applynumberFlags for the CAA record. minimum: 0. maximum: 255.
tagNo; body and guard rules applystringName of the property controlled by this record (e.g.: issue, issuewild, iodef).
valueNo; body and guard rules applystringValue of the record. This field's semantics depend on the chosen tag.
dns-records_CERTRecord.allOf[1]
ArgumentRequiredTypeDetails
contentNo; body and guard rules applystringFormatted CERT content. See 'data' to set CERT properties.
dataNo; body and guard rules applyobjectComponents of a CERT record.
typeNo; body and guard rules applystringRecord type. Values: CERT.
dns-records_CERTRecord.allOf[1].data
ArgumentRequiredTypeDetails
algorithmNo; body and guard rules applynumberAlgorithm. minimum: 0. maximum: 255.
certificateNo; body and guard rules applystringCertificate.
key_tagNo; body and guard rules applynumberKey Tag. minimum: 0. maximum: 65535.
typeNo; body and guard rules applynumberType. minimum: 0. maximum: 65535.
dns-records_CNAMERecord.allOf[1]
ArgumentRequiredTypeDetails
contentNo; body and guard rules applystringA valid hostname. Must not match the record's name.
settingsNo; body and guard rules applyobjectSee the full input schema.
typeNo; body and guard rules applystringRecord type. Values: CNAME.
dns-records_CNAMERecord.allOf[1].settings
ArgumentRequiredTypeDetails
flatten_cnameNo; body and guard rules applybooleanIf 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. default: False.
dns-records_DNSKEYRecord.allOf[1]
ArgumentRequiredTypeDetails
contentNo; body and guard rules applystringFormatted DNSKEY content. See 'data' to set DNSKEY properties.
dataNo; body and guard rules applyobjectComponents of a DNSKEY record.
typeNo; body and guard rules applystringRecord type. Values: DNSKEY.
dns-records_DNSKEYRecord.allOf[1].data
ArgumentRequiredTypeDetails
algorithmNo; body and guard rules applynumberAlgorithm. minimum: 0. maximum: 255.
flagsNo; body and guard rules applynumberFlags. minimum: 0. maximum: 65535.
protocolNo; body and guard rules applynumberProtocol. minimum: 0. maximum: 255.
public_keyNo; body and guard rules applystringPublic Key.
dns-records_DSRecord.allOf[1]
ArgumentRequiredTypeDetails
contentNo; body and guard rules applystringFormatted DS content. See 'data' to set DS properties.
dataNo; body and guard rules applyobjectComponents of a DS record.
typeNo; body and guard rules applystringRecord type. Values: DS.
dns-records_DSRecord.allOf[1].data
ArgumentRequiredTypeDetails
algorithmNo; body and guard rules applynumberAlgorithm. minimum: 0. maximum: 255.
digestNo; body and guard rules applystringDigest.
digest_typeNo; body and guard rules applynumberDigest Type. minimum: 0. maximum: 255.
key_tagNo; body and guard rules applynumberKey Tag. minimum: 0. maximum: 65535.
dns-records_HTTPSRecord.allOf[1]
ArgumentRequiredTypeDetails
contentNo; body and guard rules applystringFormatted HTTPS content. See 'data' to set HTTPS properties.
dataNo; body and guard rules applyobjectComponents of a HTTPS record.
typeNo; body and guard rules applystringRecord type. Values: HTTPS.
dns-records_HTTPSRecord.allOf[1].data
ArgumentRequiredTypeDetails
priorityNo; body and guard rules applynumberPriority. minimum: 0. maximum: 65535.
targetNo; body and guard rules applystringTarget.
valueNo; body and guard rules applystringValue.
dns-records_LOCRecord.allOf[1]
ArgumentRequiredTypeDetails
contentNo; body and guard rules applystringFormatted LOC content. See 'data' to set LOC properties.
dataNo; body and guard rules applyobjectComponents of a LOC record.
typeNo; body and guard rules applystringRecord type. Values: LOC.
dns-records_LOCRecord.allOf[1].data
ArgumentRequiredTypeDetails
altitudeNo; body and guard rules applynumberAltitude of location in meters. minimum: -100000. maximum: 42849672.95.
lat_degreesNo; body and guard rules applynumberDegrees of latitude. minimum: 0. maximum: 90.
lat_directionNo; body and guard rules applystringLatitude direction. Values: N, S.
lat_minutesNo; body and guard rules applynumberMinutes of latitude. minimum: 0. maximum: 59.
lat_secondsNo; body and guard rules applynumberSeconds of latitude. minimum: 0. maximum: 59.999.
long_degreesNo; body and guard rules applynumberDegrees of longitude. minimum: 0. maximum: 180.
long_directionNo; body and guard rules applystringLongitude direction. Values: E, W.
long_minutesNo; body and guard rules applynumberMinutes of longitude. minimum: 0. maximum: 59.
long_secondsNo; body and guard rules applynumberSeconds of longitude. minimum: 0. maximum: 59.999.
precision_horzNo; body and guard rules applynumberHorizontal precision of location. minimum: 0. maximum: 90000000.
precision_vertNo; body and guard rules applynumberVertical precision of location. minimum: 0. maximum: 90000000.
sizeNo; body and guard rules applynumberSize of location in meters. minimum: 0. maximum: 90000000.
dns-records_MXRecord.allOf[1]
ArgumentRequiredTypeDetails
contentNo; body and guard rules applystringA valid mail server hostname. format: hostname.
priorityNo; body and guard rules applydns-records_prioritySee the full input schema.
typeNo; body and guard rules applystringRecord type. Values: MX.
dns-records_NAPTRRecord.allOf[1]
ArgumentRequiredTypeDetails
contentNo; body and guard rules applystringFormatted NAPTR content. See 'data' to set NAPTR properties.
dataNo; body and guard rules applyobjectComponents of a NAPTR record.
typeNo; body and guard rules applystringRecord type. Values: NAPTR.
dns-records_NAPTRRecord.allOf[1].data
ArgumentRequiredTypeDetails
flagsNo; body and guard rules applystringFlags.
orderNo; body and guard rules applynumberOrder. minimum: 0. maximum: 65535.
preferenceNo; body and guard rules applynumberPreference. minimum: 0. maximum: 65535.
regexNo; body and guard rules applystringRegex.
replacementNo; body and guard rules applystringReplacement.
serviceNo; body and guard rules applystringService.
dns-records_NSRecord.allOf[1]
ArgumentRequiredTypeDetails
contentNo; body and guard rules applystringA valid name server host name.
typeNo; body and guard rules applystringRecord type. Values: NS.
dns-records_OPENPGPKEYRecord.allOf[1]
ArgumentRequiredTypeDetails
contentNo; body and guard rules applystringA single Base64-encoded OpenPGP Transferable Public Key (RFC 4880 Section 11.1)
typeNo; body and guard rules applystringRecord type. Values: OPENPGPKEY.
dns-records_PTRRecord.allOf[1]
ArgumentRequiredTypeDetails
contentNo; body and guard rules applystringDomain name pointing to the address.
typeNo; body and guard rules applystringRecord type. Values: PTR.
dns-records_SMIMEARecord.allOf[1]
ArgumentRequiredTypeDetails
contentNo; body and guard rules applystringFormatted SMIMEA content. See 'data' to set SMIMEA properties.
dataNo; body and guard rules applyobjectComponents of a SMIMEA record.
typeNo; body and guard rules applystringRecord type. Values: SMIMEA.
dns-records_SMIMEARecord.allOf[1].data
ArgumentRequiredTypeDetails
certificateNo; body and guard rules applystringCertificate.
matching_typeNo; body and guard rules applynumberMatching Type. minimum: 0. maximum: 255.
selectorNo; body and guard rules applynumberSelector. minimum: 0. maximum: 255.
usageNo; body and guard rules applynumberUsage. minimum: 0. maximum: 255.
dns-records_SRVRecord.allOf[1]
ArgumentRequiredTypeDetails
contentNo; body and guard rules applystringPriority, weight, port, and SRV target. See 'data' for setting the individual component values.
dataNo; body and guard rules applyobjectComponents of a SRV record.
typeNo; body and guard rules applystringRecord type. Values: SRV.
dns-records_SRVRecord.allOf[1].data
ArgumentRequiredTypeDetails
portNo; body and guard rules applynumberThe port of the service. minimum: 0. maximum: 65535.
priorityNo; body and guard rules applydns-records_prioritySee the full input schema.
targetNo; body and guard rules applystringA valid hostname. format: hostname.
weightNo; body and guard rules applynumberThe record weight. minimum: 0. maximum: 65535.
dns-records_SSHFPRecord.allOf[1]
ArgumentRequiredTypeDetails
contentNo; body and guard rules applystringFormatted SSHFP content. See 'data' to set SSHFP properties.
dataNo; body and guard rules applyobjectComponents of a SSHFP record.
typeNo; body and guard rules applystringRecord type. Values: SSHFP.
dns-records_SSHFPRecord.allOf[1].data
ArgumentRequiredTypeDetails
algorithmNo; body and guard rules applynumberAlgorithm. minimum: 0. maximum: 255.
fingerprintNo; body and guard rules applystringFingerprint.
typeNo; body and guard rules applynumberType. minimum: 0. maximum: 255.
dns-records_SVCBRecord.allOf[1]
ArgumentRequiredTypeDetails
contentNo; body and guard rules applystringFormatted SVCB content. See 'data' to set SVCB properties.
dataNo; body and guard rules applyobjectComponents of a SVCB record.
typeNo; body and guard rules applystringRecord type. Values: SVCB.
dns-records_SVCBRecord.allOf[1].data
ArgumentRequiredTypeDetails
priorityNo; body and guard rules applynumberPriority. minimum: 0. maximum: 65535.
targetNo; body and guard rules applystringTarget.
valueNo; body and guard rules applystringValue.
dns-records_TLSARecord.allOf[1]
ArgumentRequiredTypeDetails
contentNo; body and guard rules applystringFormatted TLSA content. See 'data' to set TLSA properties.
dataNo; body and guard rules applyobjectComponents of a TLSA record.
typeNo; body and guard rules applystringRecord type. Values: TLSA.
dns-records_TLSARecord.allOf[1].data
ArgumentRequiredTypeDetails
certificateNo; body and guard rules applystringCertificate.
matching_typeNo; body and guard rules applynumberMatching Type. minimum: 0. maximum: 255.
selectorNo; body and guard rules applynumberSelector. minimum: 0. maximum: 255.
usageNo; body and guard rules applynumberUsage. minimum: 0. maximum: 255.
dns-records_TXTRecord.allOf[1]
ArgumentRequiredTypeDetails
contentNo; body and guard rules applystringText 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 .
typeNo; body and guard rules applystringRecord type. Values: TXT.
dns-records_URIRecord.allOf[1]
ArgumentRequiredTypeDetails
contentNo; body and guard rules applystringFormatted URI content. See 'data' to set URI properties.
dataNo; body and guard rules applyobjectComponents of a URI record.
priorityNo; body and guard rules applydns-records_prioritySee the full input schema.
typeNo; body and guard rules applystringRecord type. Values: URI.
dns-records_URIRecord.allOf[1].data
ArgumentRequiredTypeDetails
targetNo; body and guard rules applystringThe record content.
weightNo; body and guard rules applynumberThe record weight. minimum: 0. maximum: 65535.
dns-records_dns-record-shared-fields
ArgumentRequiredTypeDetails
commentNo; body and guard rules applydns-records_commentSee the full input schema.
nameNo; body and guard rules applydns-records_nameSee the full input schema.
proxiedNo; body and guard rules applydns-records_proxiedSee the full input schema.
settingsNo; body and guard rules applydns-records_settingsSee the full input schema.
tagsNo; body and guard rules applydns-records_tagsSee the full input schema.
ttlNo; body and guard rules applydns-records_ttlSee the full input schema.
dns-records_settings
ArgumentRequiredTypeDetails
ipv4_onlyNo; body and guard rules applybooleanWhen 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. default: False.
ipv6_onlyNo; body and guard rules applybooleanWhen 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. default: False.
dns-records_dns-record-batch-delete.allOf[0]
ArgumentRequiredTypeDetails
idNo; body and guard rules applydns-records_identifierSee the full input schema.
dns-records_dns-record-batch-patch
ArgumentRequiredTypeDetails
idYesdns-records_identifierSee the full input schema.
dns-records_dns-record-batch-put
ArgumentRequiredTypeDetails
idYesdns-records_identifierSee the full input schema.
cache-purge_Everything
ArgumentRequiredTypeDetails
purge_everythingNo; body and guard rules applybooleanSet to true to target all cached content in the zone, or in the environment for the environment endpoints. Must be the only field in the request. See Purge everything.
cache-purge_FlexPurgeByHostnames
ArgumentRequiredTypeDetails
hostsNo; body and guard rules applyarrayHostnames, such as www.example.com. Targets all content cached for these hostnames. See Purge cache by hostname. Items: string.
cache-purge_FlexPurgeByPrefixes
ArgumentRequiredTypeDetails
prefixesNo; body and guard rules applyarrayURL prefixes, each a hostname followed by a path, such as www.example.com/blog/. Targets all content whose URL starts with one of these prefixes. Do not include a scheme, query string, or fragment. See Purge cache by prefix. Items: string.
cache-purge_FlexPurgeByTags
ArgumentRequiredTypeDetails
tagsNo; body and guard rules applyarrayCache tags. Targets all content whose Cache-Tag response header contains at least one of these tags. See Purge cache by cache-tags. Items: string.
cache-purge_SingleFile
ArgumentRequiredTypeDetails
filesNo; body and guard rules applyarrayFull URLs, such as https://www.example.com/css/styles.css. Targets the content cached for each URL. If your cache key includes request headers, send objects with url and headers instead. See Purge by single-file. Items: string.
cache-purge_SingleFileWithUrlAndHeaders
ArgumentRequiredTypeDetails
filesNo; body and guard rules applyarrayURLs with the request headers your cache key uses. Use this form when your cache key includes request headers, or the visitor's device type, country, or language: send the header values each URL was cached with, such as CF-Device-Type, CF-IPCountry, or Accept-Language. When you send the Origin header, include the scheme and hostname. Include the port unless it is the default for the scheme: 80 for http, 443 for https. See Purge by single-file. Items: object.
cache-purge_SingleFileWithUrlAndHeaders.files[]
ArgumentRequiredTypeDetails
headersNo; body and guard rules applyobjectRequest headers and the values the content was cached with.
urlNo; body and guard rules applystringFull URL of the content.
zones_automatic_platform_optimization
ArgumentRequiredTypeDetails
cache_by_device_typeYesbooleanIndicates whether or not cache by device type is enabled.
cfYesbooleanIndicates whether or not Cloudflare proxy is enabled. default: False.
enabledYesbooleanIndicates whether or not Automatic Platform Optimization is enabled. default: False.
hostnamesYesarrayAn array of hostnames where Automatic Platform Optimization for WordPress is activated. Items: string.
wordpressYesbooleanIndicates whether or not site is powered by WordPress. default: False.
wp_pluginYesbooleanIndicates whether or not Cloudflare for WordPress plugin is installed. default: False.
zones_cache-rules_aegis_value
ArgumentRequiredTypeDetails
enabledNo; body and guard rules applybooleanWhether the feature is enabled or not.
pool_idNo; body and guard rules applystringEgress pool id which refers to a grouping of dedicated egress IPs through which Cloudflare will connect to origin.
zones_nel_value
ArgumentRequiredTypeDetails
enabledNo; body and guard rules applybooleanSee the full input schema. default: False.
zones_security_header_value
ArgumentRequiredTypeDetails
strict_transport_securityNo; body and guard rules applyobjectStrict Transport Security.
zones_security_header_value.strict_transport_security
ArgumentRequiredTypeDetails
enabledNo; body and guard rules applybooleanWhether or not strict transport security is enabled.
include_subdomainsNo; body and guard rules applybooleanInclude all subdomains for strict transport security.
max_ageNo; body and guard rules applynumberMax age in seconds of the strict transport security.
nosniffNo; body and guard rules applybooleanWhether or not to include 'X-Content-Type-Options: nosniff' header.
preloadNo; body and guard rules applybooleanEnable automatic preload of the HSTS configuration.
rulesets_BlockRule.allOf[1]
ArgumentRequiredTypeDetails
actionNo; body and guard rules applystringSee the full input schema. Values: block.
action_parametersNo; body and guard rules applyobjectSee the full input schema.
descriptionNo; body and guard rules applystringSee the full input schema.
rulesets_BlockRule.allOf[1].action_parameters
ArgumentRequiredTypeDetails
responseNo; body and guard rules applyobjectThe response to show when the block is applied.
rulesets_BlockRule.allOf[1].action_parameters.response
ArgumentRequiredTypeDetails
contentYesstringThe content to return. minLength: 1.
content_typeYesstringThe type of the content to return. minLength: 1.
status_codeYesintegerThe status code to return. minimum: 400. maximum: 499.
rulesets_ChallengeRule.allOf[1]
ArgumentRequiredTypeDetails
actionNo; body and guard rules applystringSee the full input schema. Values: challenge.
descriptionNo; body and guard rules applystringSee the full input schema.
rulesets_CompressResponseRule.allOf[1]
ArgumentRequiredTypeDetails
actionNo; body and guard rules applystringSee the full input schema. Values: compress_response.
action_parametersNo; body and guard rules applyobjectSee the full input schema.
descriptionNo; body and guard rules applystringSee the full input schema.
rulesets_CompressResponseRule.allOf[1].action_parameters
ArgumentRequiredTypeDetails
algorithmsYesarrayCustom order for compression algorithms. minItems: 1. Items: object.
rulesets_CompressResponseRule.allOf[1].action_parameters.algorithms[]
ArgumentRequiredTypeDetails
nameNo; body and guard rules applystringName of the compression algorithm to enable. Values: none, auto, default, gzip, brotli, zstd.
rulesets_DDoSDynamicRule.allOf[1]
ArgumentRequiredTypeDetails
actionNo; body and guard rules applystringSee the full input schema. Values: ddos_dynamic.
descriptionNo; body and guard rules applystringSee the full input schema.
rulesets_ExecuteCategoryOverrides[]
ArgumentRequiredTypeDetails
actionNo; body and guard rules applyJSONSee the full input schema.
categoryYesJSONSee the full input schema.
enabledNo; body and guard rules applyJSONSee the full input schema.
sensitivity_levelNo; body and guard rules applyJSONSee the full input schema.
rulesets_ExecuteMatchedData
ArgumentRequiredTypeDetails
public_keyYesstringThe public key to encrypt matched data logs with. minLength: 1.
rulesets_ExecuteOverrides
ArgumentRequiredTypeDetails
actionNo; body and guard rules applyJSONSee the full input schema.
categoriesNo; body and guard rules applyrulesets_ExecuteCategoryOverridesSee the full input schema.
enabledNo; body and guard rules applyJSONSee the full input schema.
rulesNo; body and guard rules applyrulesets_ExecuteRuleOverridesSee the full input schema.
sensitivity_levelNo; body and guard rules applyJSONSee the full input schema.
rulesets_ExecuteRule.allOf[1]
ArgumentRequiredTypeDetails
actionNo; body and guard rules applystringSee the full input schema. Values: execute.
action_parametersNo; body and guard rules applyobjectSee the full input schema.
descriptionNo; body and guard rules applystringSee the full input schema.
rulesets_ExecuteRule.allOf[1].action_parameters
ArgumentRequiredTypeDetails
idYesJSONSee the full input schema.
matched_dataNo; body and guard rules applyrulesets_ExecuteMatchedDataSee the full input schema.
overridesNo; body and guard rules applyrulesets_ExecuteOverridesSee the full input schema.
rulesets_ExecuteRuleOverrides[]
ArgumentRequiredTypeDetails
actionNo; body and guard rules applyJSONSee the full input schema.
enabledNo; body and guard rules applyJSONSee the full input schema.
idYesJSONSee the full input schema.
score_thresholdNo; body and guard rules applyintegerThe score threshold to use for the rule.
sensitivity_levelNo; body and guard rules applyJSONSee the full input schema.
rulesets_ForceConnectionCloseRule.allOf[1]
ArgumentRequiredTypeDetails
actionNo; body and guard rules applystringSee the full input schema. Values: force_connection_close.
descriptionNo; body and guard rules applystringSee the full input schema.
rulesets_JsChallengeRule.allOf[1]
ArgumentRequiredTypeDetails
actionNo; body and guard rules applystringSee the full input schema. Values: js_challenge.
descriptionNo; body and guard rules applystringSee the full input schema.
rulesets_LogCustomFieldCookieFields[]
ArgumentRequiredTypeDetails
nameYesstringThe name of the cookie. minLength: 1.
rulesets_LogCustomFieldRawResponseFields[]
ArgumentRequiredTypeDetails
nameYesstringThe name of the response header. minLength: 1.
preserve_duplicatesNo; body and guard rules applybooleanWhether to log duplicate values of the same header. default: False.
rulesets_LogCustomFieldRequestFields[]
ArgumentRequiredTypeDetails
nameYesstringThe name of the header. minLength: 1.
rulesets_LogCustomFieldResponseFields[]
ArgumentRequiredTypeDetails
nameYesstringThe name of the response header. minLength: 1.
preserve_duplicatesNo; body and guard rules applybooleanWhether to log duplicate values of the same header. default: False.
rulesets_LogCustomFieldRule.allOf[1]
ArgumentRequiredTypeDetails
actionNo; body and guard rules applystringSee the full input schema. Values: log_custom_field.
action_parametersNo; body and guard rules applyobjectSee the full input schema.
descriptionNo; body and guard rules applystringSee the full input schema.
rulesets_LogCustomFieldRule.allOf[1].action_parameters
ArgumentRequiredTypeDetails
cookie_fieldsNo; body and guard rules applyrulesets_LogCustomFieldCookieFieldsSee the full input schema.
raw_response_fieldsNo; body and guard rules applyrulesets_LogCustomFieldRawResponseFieldsSee the full input schema.
request_fieldsNo; body and guard rules applyrulesets_LogCustomFieldRequestFieldsSee the full input schema.
response_fieldsNo; body and guard rules applyrulesets_LogCustomFieldResponseFieldsSee the full input schema.
transformed_request_fieldsNo; body and guard rules applyrulesets_LogCustomFieldTransformedRequestFieldsSee the full input schema.
rulesets_LogCustomFieldTransformedRequestFields[]
ArgumentRequiredTypeDetails
nameYesstringThe name of the header. minLength: 1.
rulesets_LogRule.allOf[1]
ArgumentRequiredTypeDetails
actionNo; body and guard rules applystringSee the full input schema. Values: log.
descriptionNo; body and guard rules applystringSee the full input schema.
rulesets_ManagedChallengeRule.allOf[1]
ArgumentRequiredTypeDetails
actionNo; body and guard rules applystringSee the full input schema. Values: managed_challenge.
descriptionNo; body and guard rules applystringSee the full input schema.
rulesets_RedirectFromList
ArgumentRequiredTypeDetails
keyYesstringAn expression that evaluates to the list lookup key. minLength: 1.
nameYesstringThe name of the list to match against. pattern: ^[a-zA-Z0-9_]+$.
rulesets_RedirectFromValue
ArgumentRequiredTypeDetails
preserve_query_stringNo; body and guard rules applybooleanWhether to keep the query string of the original request. default: False.
status_codeNo; body and guard rules applyintegerThe status code to use for the redirect. Values: 301, 302, 303, 307, 308.
target_urlYesobjectA URL to redirect the request to.
rulesets_RedirectFromValue.target_url
ArgumentRequiredTypeDetails
expressionNo; body and guard rules applystringAn expression that evaluates to a URL to redirect the request to. minLength: 1.
valueNo; body and guard rules applystringA URL to redirect the request to. minLength: 1.
rulesets_RedirectRule.allOf[1]
ArgumentRequiredTypeDetails
actionNo; body and guard rules applystringSee the full input schema. Values: redirect.
action_parametersNo; body and guard rules applyobjectSee the full input schema.
descriptionNo; body and guard rules applystringSee the full input schema.
rulesets_RedirectRule.allOf[1].action_parameters
ArgumentRequiredTypeDetails
from_listNo; body and guard rules applyrulesets_RedirectFromListSee the full input schema.
from_valueNo; body and guard rules applyrulesets_RedirectFromValueSee the full input schema.
rulesets_RewriteRule.allOf[1]
ArgumentRequiredTypeDetails
actionNo; body and guard rules applystringSee the full input schema. Values: rewrite.
action_parametersNo; body and guard rules applyobjectSee the full input schema.
descriptionNo; body and guard rules applystringSee the full input schema.
rulesets_RewriteRule.allOf[1].action_parameters
ArgumentRequiredTypeDetails
headersNo; body and guard rules applyrulesets_RewriteHeadersSee the full input schema.
uriNo; body and guard rules applyrulesets_RewriteUriSee the full input schema.
rulesets_RewriteUri.allOf[0].anyOf[0]
ArgumentRequiredTypeDetails
pathYesrulesets_RewriteUriPathSee the full input schema.
rulesets_RewriteUri.allOf[0].anyOf[1]
ArgumentRequiredTypeDetails
queryYesrulesets_RewriteUriQuerySee the full input schema.
rulesets_RewriteUri.allOf[1]
ArgumentRequiredTypeDetails
originNo; body and guard rules applybooleanWhether to propagate the rewritten URI to origin.
rulesets_RewriteUriPath
ArgumentRequiredTypeDetails
expressionNo; body and guard rules applystringAn expression that evaluates to a value to rewrite the URI path to. minLength: 1.
valueNo; body and guard rules applystringA value to rewrite the URI path to. minLength: 1.
rulesets_RewriteUriQuery
ArgumentRequiredTypeDetails
expressionNo; body and guard rules applystringAn expression that evaluates to a value to rewrite the URI query to. minLength: 1.
valueNo; body and guard rules applystringA value to rewrite the URI query to.
rulesets_RouteOrigin
ArgumentRequiredTypeDetails
hostNo; body and guard rules applystringA resolved host to route to. minLength: 1.
portNo; body and guard rules applyintegerA destination port to route to. minimum: 1. maximum: 65535.
rulesets_RouteRule.allOf[1]
ArgumentRequiredTypeDetails
actionNo; body and guard rules applystringSee the full input schema. Values: route.
action_parametersNo; body and guard rules applyobjectSee the full input schema.
descriptionNo; body and guard rules applystringSee the full input schema.
rulesets_RouteRule.allOf[1].action_parameters
ArgumentRequiredTypeDetails
host_headerNo; body and guard rules applyrulesets_RouteHostHeaderSee the full input schema.
originNo; body and guard rules applyrulesets_RouteOriginSee the full input schema.
sniNo; body and guard rules applyrulesets_RouteSNISee the full input schema.
rulesets_RouteSNI
ArgumentRequiredTypeDetails
valueYesstringA value to override the SNI to. minLength: 1.
rulesets_Rule
ArgumentRequiredTypeDetails
actionNo; body and guard rules applyrulesets_RuleActionSee the full input schema.
action_parametersNo; body and guard rules applyobjectThe parameters configuring the rule's action. default: {}.
categoriesNo; body and guard rules applyrulesets_RuleCategoriesSee the full input schema.
descriptionNo; body and guard rules applystringAn informative description of the rule. default: See current schema.
enabledNo; body and guard rules applyJSONSee the full input schema.
exposed_credential_checkNo; body and guard rules applyrulesets_RuleExposedCredentialCheckSee the full input schema.
expressionNo; body and guard rules applystringThe expression defining which traffic will match the rule. minLength: 1.
idNo; body and guard rules applyrulesets_RuleIdSee the full input schema.
last_updatedYesstringThe timestamp of when the rule was last modified. format: date-time.
loggingNo; body and guard rules applyrulesets_RuleLoggingSee the full input schema.
ratelimitNo; body and guard rules applyrulesets_RuleRatelimitSee the full input schema.
refNo; body and guard rules applystringThe reference of the rule (the rule's ID by default). minLength: 1.
versionYesstringThe version of the rule. pattern: ^[0-9]+$.
rulesets_RuleExposedCredentialCheck
ArgumentRequiredTypeDetails
password_expressionYesstringAn expression that selects the password used in the credentials check. minLength: 1.
username_expressionYesstringAn expression that selects the user ID used in the credentials check. minLength: 1.
rulesets_RuleLogging
ArgumentRequiredTypeDetails
enabledYesbooleanWhether to generate a log when the rule matches.
rulesets_RuleRatelimit
ArgumentRequiredTypeDetails
characteristicsYesarrayCharacteristics of the request on which the rate limit counter will be incremented. minItems: 1. Items: string.
counting_expressionNo; body and guard rules applystringAn expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. minLength: 1.
mitigation_timeoutNo; body and guard rules applyintegerPeriod of time in seconds after which the action will be disabled following its first execution.
periodYesintegerPeriod in seconds over which the counter is being incremented. minimum: 0.
requests_per_periodNo; body and guard rules applyintegerThe threshold of requests per period after which the action will be executed for the first time. minimum: 1.
requests_to_originNo; body and guard rules applybooleanWhether counting is only performed when an origin is reached. default: False.
score_per_periodNo; body and guard rules applyintegerThe score threshold per period for which the action will be executed the first time.
score_response_header_nameNo; body and guard rules applystringA response header name provided by the origin, which contains the score to increment rate limit counter with. minLength: 1.
rulesets_Ruleset
ArgumentRequiredTypeDetails
descriptionNo; body and guard rules applystringAn informative description of the ruleset. default: See current schema.
idYesJSONSee the full input schema.
last_updatedYesstringThe timestamp of when the ruleset was last modified. format: date-time.
nameNo; body and guard rules applystringThe human-readable name of the ruleset. minLength: 1.
versionYesJSONSee the full input schema.
rulesets_ScoreRule.allOf[1]
ArgumentRequiredTypeDetails
actionNo; body and guard rules applystringSee the full input schema. Values: score.
action_parametersNo; body and guard rules applyobjectSee the full input schema.
descriptionNo; body and guard rules applystringSee the full input schema.
rulesets_ScoreRule.allOf[1].action_parameters
ArgumentRequiredTypeDetails
incrementYesrulesets_ScoreIncrementSee the full input schema.
rulesets_ServeErrorRule.allOf[1]
ArgumentRequiredTypeDetails
actionNo; body and guard rules applystringSee the full input schema. Values: serve_error.
action_parametersNo; body and guard rules applyJSONSee the full input schema.
descriptionNo; body and guard rules applystringSee the full input schema.
rulesets_ServeErrorRule.allOf[1].action_parameters.allOf[0]
ArgumentRequiredTypeDetails
content_typeYesrulesets_ServeErrorContentTypeSee the full input schema.
status_codeNo; body and guard rules applyrulesets_ServeErrorStatusCodeSee the full input schema.
rulesets_ServeErrorRule.allOf[1].action_parameters.allOf[1].oneOf[0]
ArgumentRequiredTypeDetails
contentYesrulesets_ServeErrorContentSee the full input schema.
rulesets_ServeErrorRule.allOf[1].action_parameters.allOf[1].oneOf[1]
ArgumentRequiredTypeDetails
asset_nameYesrulesets_ServeErrorAssetNameSee the full input schema.
rulesets_SetCacheControlDirective.oneOf[0]
ArgumentRequiredTypeDetails
cloudflare_onlyNo; body and guard rules applyrulesets_SetCacheControlCloudflareOnlySee the full input schema.
operationYesJSONSee the full input schema.
rulesets_SetCacheControlDirective.oneOf[1]
ArgumentRequiredTypeDetails
cloudflare_onlyNo; body and guard rules applyrulesets_SetCacheControlCloudflareOnlySee the full input schema.
operationYesJSONSee the full input schema.
rulesets_SetCacheControlDirectiveWithQualifiers.oneOf[0]
ArgumentRequiredTypeDetails
cloudflare_onlyNo; body and guard rules applyrulesets_SetCacheControlCloudflareOnlySee the full input schema.
operationYesJSONSee the full input schema.
qualifiersNo; body and guard rules applyarrayOptional list of header names to qualify the directive (e.g., for "private" or "no-cache" directives). Items: string.
rulesets_SetCacheControlDirectiveWithValue.oneOf[0]
ArgumentRequiredTypeDetails
cloudflare_onlyNo; body and guard rules applyrulesets_SetCacheControlCloudflareOnlySee the full input schema.
operationYesJSONSee the full input schema.
valueYesintegerThe duration value in seconds for the directive. minimum: 0.
rulesets_SetCacheControlRule.allOf[1]
ArgumentRequiredTypeDetails
actionNo; body and guard rules applystringSee the full input schema. Values: set_cache_control.
action_parametersNo; body and guard rules applyobjectSee the full input schema.
descriptionNo; body and guard rules applystringSee the full input schema.
rulesets_SetCacheControlRule.allOf[1].action_parameters
ArgumentRequiredTypeDetails
immutableNo; body and guard rules applyrulesets_SetCacheControlDirectiveSee the full input schema.
max-ageNo; body and guard rules applyrulesets_SetCacheControlDirectiveWithValueSee the full input schema.
must-revalidateNo; body and guard rules applyrulesets_SetCacheControlDirectiveSee the full input schema.
must-understandNo; body and guard rules applyrulesets_SetCacheControlDirectiveSee the full input schema.
no-cacheNo; body and guard rules applyrulesets_SetCacheControlDirectiveWithQualifiersSee the full input schema.
no-storeNo; body and guard rules applyrulesets_SetCacheControlDirectiveSee the full input schema.
no-transformNo; body and guard rules applyrulesets_SetCacheControlDirectiveSee the full input schema.
privateNo; body and guard rules applyrulesets_SetCacheControlDirectiveWithQualifiersSee the full input schema.
proxy-revalidateNo; body and guard rules applyrulesets_SetCacheControlDirectiveSee the full input schema.
publicNo; body and guard rules applyrulesets_SetCacheControlDirectiveSee the full input schema.
s-maxageNo; body and guard rules applyrulesets_SetCacheControlDirectiveWithValueSee the full input schema.
stale-if-errorNo; body and guard rules applyrulesets_SetCacheControlDirectiveWithValueSee the full input schema.
stale-while-revalidateNo; body and guard rules applyrulesets_SetCacheControlDirectiveWithValueSee the full input schema.
rulesets_SetCacheSettingsBrowserTTL
ArgumentRequiredTypeDetails
defaultNo; body and guard rules applyintegerThe browser TTL (in seconds) if you choose the "override_origin" mode. minimum: 0.
modeYesstringThe browser TTL mode. Values: respect_origin, bypass_by_default, override_origin, bypass.
rulesets_SetCacheSettingsCacheKey
ArgumentRequiredTypeDetails
cache_by_device_typeNo; body and guard rules applybooleanWhether to separate cached content based on the visitor's device type.
cache_deception_armorNo; body and guard rules applybooleanWhether to protect from web cache deception attacks, while allowing static assets to be cached.
custom_keyNo; body and guard rules applyrulesets_SetCacheSettingsCustomCacheKeySee the full input schema.
ignore_query_strings_orderNo; body and guard rules applybooleanWhether to treat requests with the same query parameters the same, regardless of the order those query parameters are in.
rulesets_SetCacheSettingsCacheReserve
ArgumentRequiredTypeDetails
eligibleYesbooleanWhether Cache Reserve is enabled. If this is true and a request meets eligibility criteria, Cloudflare will write the resource to Cache Reserve.
minimum_file_sizeNo; body and guard rules applyintegerThe minimum file size eligible for storage in Cache Reserve. minimum: 0.
rulesets_SetCacheSettingsCustomCacheKey
ArgumentRequiredTypeDetails
cookieNo; body and guard rules applyrulesets_SetCacheSettingsCustomCacheKeyCookieSee the full input schema.
headerNo; body and guard rules applyrulesets_SetCacheSettingsCustomCacheKeyHeaderSee the full input schema.
hostNo; body and guard rules applyrulesets_SetCacheSettingsCustomCacheKeyHostSee the full input schema.
query_stringNo; body and guard rules applyrulesets_SetCacheSettingsCustomCacheKeyQueryStringSee the full input schema.
userNo; body and guard rules applyrulesets_SetCacheSettingsCustomCacheKeyUserSee the full input schema.
rulesets_SetCacheSettingsCustomCacheKeyCookie
ArgumentRequiredTypeDetails
check_presenceNo; body and guard rules applyarrayA list of cookies to check for the presence of. The presence of these cookies is included in the cache key. minItems: 1. Items: string.
includeNo; body and guard rules applyarrayA list of cookies to include in the cache key. minItems: 1. Items: string.
rulesets_SetCacheSettingsCustomCacheKeyHeader
ArgumentRequiredTypeDetails
check_presenceNo; body and guard rules applyarrayA list of headers to check for the presence of. The presence of these headers is included in the cache key. minItems: 1. Items: string.
containsNo; body and guard rules applyobjectA mapping of header names to a list of values. If a header is present in the request and contains any of the values provided, its value is included in the cache key.
exclude_originNo; body and guard rules applybooleanWhether to exclude the origin header in the cache key.
includeNo; body and guard rules applyarrayA list of headers to include in the cache key. minItems: 1. Items: string.
rulesets_SetCacheSettingsCustomCacheKeyHost
ArgumentRequiredTypeDetails
resolvedNo; body and guard rules applybooleanWhether to use the resolved host in the cache key.
rulesets_SetCacheSettingsCustomCacheKeyQueryString
ArgumentRequiredTypeDetails
excludeNo; body and guard rules applyobjectWhich query string parameters to exclude from the cache key.
includeNo; body and guard rules applyobjectWhich query string parameters to include in the cache key.
rulesets_SetCacheSettingsCustomCacheKeyQueryString.exclude
ArgumentRequiredTypeDetails
allNo; body and guard rules applybooleanWhether to exclude all query string parameters from the cache key. Values: True.
listNo; body and guard rules applyarrayA list of query string parameters to exclude from the cache key. minItems: 1. Items: string.
rulesets_SetCacheSettingsCustomCacheKeyQueryString.include
ArgumentRequiredTypeDetails
allNo; body and guard rules applybooleanWhether to include all query string parameters in the cache key. Values: True.
listNo; body and guard rules applyarrayA list of query string parameters to include in the cache key. minItems: 1. Items: string.
rulesets_SetCacheSettingsCustomCacheKeyUser
ArgumentRequiredTypeDetails
device_typeNo; body and guard rules applybooleanWhether to use the user agent's device type in the cache key.
geoNo; body and guard rules applybooleanWhether to use the user agents's country in the cache key.
langNo; body and guard rules applybooleanWhether to use the user agent's language in the cache key.
rulesets_SetCacheSettingsEdgeTTL
ArgumentRequiredTypeDetails
defaultNo; body and guard rules applyintegerThe edge TTL (in seconds) if you choose the "override_origin" mode. minimum: 0.
modeYesstringThe edge TTL mode. Values: respect_origin, bypass_by_default, override_origin.
status_code_ttlNo; body and guard rules applyrulesets_SetCacheSettingsStatusCodeTTLSee the full input schema.
rulesets_SetCacheSettingsOriginRangeRequests
ArgumentRequiredTypeDetails
modeYesstringWhether to use range requests. default is the behaviour the zone gets without this rule. Values: on, off, default.
rulesets_SetCacheSettingsRule.allOf[1]
ArgumentRequiredTypeDetails
actionNo; body and guard rules applystringSee the full input schema. Values: set_cache_settings.
action_parametersNo; body and guard rules applyobjectSee the full input schema.
descriptionNo; body and guard rules applystringSee the full input schema.
rulesets_SetCacheSettingsRule.allOf[1].action_parameters
ArgumentRequiredTypeDetails
additional_cacheable_portsNo; body and guard rules applyrulesets_SetCacheSettingsAdditionalCacheablePortsSee the full input schema.
browser_ttlNo; body and guard rules applyrulesets_SetCacheSettingsBrowserTTLSee the full input schema.
cacheNo; body and guard rules applyrulesets_SetCacheSettingsCacheSee the full input schema.
cache_keyNo; body and guard rules applyrulesets_SetCacheSettingsCacheKeySee the full input schema.
cache_reserveNo; body and guard rules applyrulesets_SetCacheSettingsCacheReserveSee the full input schema.
edge_ttlNo; body and guard rules applyrulesets_SetCacheSettingsEdgeTTLSee the full input schema.
origin_cache_controlNo; body and guard rules applyrulesets_SetCacheSettingsOriginCacheControlSee the full input schema.
origin_error_page_passthruNo; body and guard rules applyrulesets_SetCacheSettingsOriginErrorPagePassthruSee the full input schema.
origin_range_requestsNo; body and guard rules applyrulesets_SetCacheSettingsOriginRangeRequestsSee the full input schema.
read_timeoutNo; body and guard rules applyrulesets_SetCacheSettingsReadTimeoutSee the full input schema.
respect_strong_etagsNo; body and guard rules applyrulesets_SetCacheSettingsRespectStrongEtagsSee the full input schema.
serve_staleNo; body and guard rules applyrulesets_SetCacheSettingsServeStaleSee the full input schema.
shared_dictionaryNo; body and guard rules applyrulesets_SetCacheSettingsSharedDictionarySee the full input schema.
strip_etagsNo; body and guard rules applyrulesets_SetCacheSettingsStripETagsSee the full input schema.
strip_last_modifiedNo; body and guard rules applyrulesets_SetCacheSettingsStripLastModifiedSee the full input schema.
strip_set_cookieNo; body and guard rules applyrulesets_SetCacheSettingsStripSetCookieSee the full input schema.
varyNo; body and guard rules applyrulesets_SetCacheSettingsVarySee the full input schema.
rulesets_SetCacheSettingsServeStale
ArgumentRequiredTypeDetails
disable_stale_while_updatingNo; body and guard rules applybooleanWhether Cloudflare should disable serving stale content while getting the latest content from the origin.
rulesets_SetCacheSettingsSharedDictionary
ArgumentRequiredTypeDetails
match_patternYesstringURL pattern for the Use-As-Dictionary match field. This pattern specifies which URLs can use this response as a dictionary. minLength: 1. maxLength: 1024.
rulesets_SetCacheSettingsStatusCodeTTL[]
ArgumentRequiredTypeDetails
status_codeNo; body and guard rules applyintegerA single status code to apply the TTL to. minimum: 100. maximum: 999.
status_code_rangeNo; body and guard rules applyobjectA range of status codes to apply the TTL to.
valueYesintegerThe time to cache the response for (in seconds). A value of 0 is equivalent to setting the cache control header with the value "no-cache". A value of -1 is equivalent to setting the cache control header with the value of "no-store".
rulesets_SetCacheSettingsStatusCodeTTL[].status_code_range
ArgumentRequiredTypeDetails
fromNo; body and guard rules applyintegerThe lower bound of the range. minimum: 100. maximum: 999.
toNo; body and guard rules applyintegerThe upper bound of the range. minimum: 100. maximum: 999.
rulesets_SetCacheSettingsVary
ArgumentRequiredTypeDetails
defaultNo; body and guard rules applyrulesets_SetCacheSettingsVaryDefaultSee the full input schema.
headersNo; body and guard rules applyobjectA mapping of lowercase request header names to their vary configuration.
rulesets_SetCacheSettingsVaryDefault
ArgumentRequiredTypeDetails
actionYesstringHow the header value is treated when building the cache key. Values: bypass, passthrough, normalize.
rulesets_SetCacheSettingsVaryHeader
ArgumentRequiredTypeDetails
actionYesstringHow the header value is treated when building the cache key. Values: bypass, passthrough, normalize.
languagesNo; body and guard rules applyarrayThe set of languages to normalize against. Only valid for the accept-language header. maxItems: 20. Items: string.
media_typesNo; body and guard rules applyarrayThe set of media types to normalize against. Only valid for the accept header. maxItems: 10. Items: string.
rulesets_SetCacheTagsRule.allOf[1]
ArgumentRequiredTypeDetails
actionNo; body and guard rules applystringSee the full input schema. Values: set_cache_tags.
action_parametersNo; body and guard rules applyUnionSee the full input schema.
descriptionNo; body and guard rules applystringSee the full input schema.
rulesets_SetCacheTagsRule.allOf[1].action_parameters.oneOf[0]
ArgumentRequiredTypeDetails
operationYesJSONSee the full input schema.
valuesYesrulesets_SetCacheTagsValuesSee the full input schema.
rulesets_SetCacheTagsRule.allOf[1].action_parameters.oneOf[1]
ArgumentRequiredTypeDetails
expressionYesrulesets_SetCacheTagsExpressionSee the full input schema.
operationYesJSONSee the full input schema.
rulesets_SetCacheTagsRule.allOf[1].action_parameters.oneOf[2]
ArgumentRequiredTypeDetails
operationYesJSONSee the full input schema.
valuesYesrulesets_SetCacheTagsValuesSee the full input schema.
rulesets_SetCacheTagsRule.allOf[1].action_parameters.oneOf[3]
ArgumentRequiredTypeDetails
expressionYesrulesets_SetCacheTagsExpressionSee the full input schema.
operationYesJSONSee the full input schema.
rulesets_SetCacheTagsRule.allOf[1].action_parameters.oneOf[4]
ArgumentRequiredTypeDetails
operationYesJSONSee the full input schema.
valuesYesrulesets_SetCacheTagsValuesSee the full input schema.
rulesets_SetCacheTagsRule.allOf[1].action_parameters.oneOf[5]
ArgumentRequiredTypeDetails
expressionYesrulesets_SetCacheTagsExpressionSee the full input schema.
operationYesJSONSee the full input schema.
rulesets_SetConfigAutominify
ArgumentRequiredTypeDetails
cssNo; body and guard rules applybooleanWhether to minify CSS files. default: False.
htmlNo; body and guard rules applybooleanWhether to minify HTML files. default: False.
jsNo; body and guard rules applybooleanWhether to minify JavaScript files. default: False.
rulesets_SetConfigRule.allOf[1]
ArgumentRequiredTypeDetails
actionNo; body and guard rules applystringSee the full input schema. Values: set_config.
action_parametersNo; body and guard rules applyobjectSee the full input schema.
descriptionNo; body and guard rules applystringSee the full input schema.
rulesets_SetConfigRule.allOf[1].action_parameters
ArgumentRequiredTypeDetails
automatic_https_rewritesNo; body and guard rules applybooleanWhether to enable Automatic HTTPS Rewrites.
autominifyNo; body and guard rules applyrulesets_SetConfigAutominifySee the full input schema.
bicNo; body and guard rules applybooleanWhether to enable Browser Integrity Check (BIC).
content_converterNo; body and guard rules applybooleanWhether to enable content conversion (e.g., HTML to Markdown).
disable_appsNo; body and guard rules applybooleanWhether to disable Cloudflare Apps. Values: True.
disable_pay_per_crawlNo; body and guard rules applybooleanWhether to disable Pay Per Crawl. Values: True.
disable_rumNo; body and guard rules applybooleanWhether to disable Real User Monitoring (RUM). Values: True.
disable_zarazNo; body and guard rules applybooleanWhether to disable Zaraz. Values: True.
email_obfuscationNo; body and guard rules applybooleanWhether to enable Email Obfuscation.
fontsNo; body and guard rules applybooleanWhether to enable Cloudflare Fonts.
hotlink_protectionNo; body and guard rules applybooleanWhether to enable Hotlink Protection.
mirageNo; body and guard rules applybooleanWhether to enable Mirage.
opportunistic_encryptionNo; body and guard rules applybooleanWhether to enable Opportunistic Encryption.
polishNo; body and guard rules applystringThe Polish level to configure. Values: off, lossless, lossy, webp.
redirects_for_ai_trainingNo; body and guard rules applybooleanWhether to redirect verified AI training crawlers to canonical URLs found in the HTML response.
request_body_bufferingNo; body and guard rules applystringThe request body buffering mode. Values: none, standard, full.
response_body_bufferingNo; body and guard rules applystringThe response body buffering mode. Values: none, standard.
rocket_loaderNo; body and guard rules applybooleanWhether to enable Rocket Loader.
security_levelNo; body and guard rules applystringThe Security Level to configure. Values: off, essentially_off, low, medium, high, under_attack.
server_side_excludesNo; body and guard rules applybooleanWhether to enable Server-Side Excludes.
sslNo; body and guard rules applystringThe SSL level to configure. Values: off, flexible, full, strict, origin_pull.
sxgNo; body and guard rules applybooleanWhether to enable Signed Exchanges (SXG).
webmcp_enabledNo; body and guard rules applybooleanWhether to serve the WebMCP bridge script, which exposes the page's tools to browser AI agents.
webmcp_packsNo; body and guard rules applyarrayBundled WebMCP tool packs to activate for matching requests. An empty array disables all packs. Omitting this parameter leaves the pack selection unchanged. Does not enable the WebMCP bridge itself. Non-empty selections require the WebMCP Configuration Rules entitlement. maxItems: 100. Items: string.
rulesets_SkipRule.allOf[1]
ArgumentRequiredTypeDetails
actionNo; body and guard rules applystringSee the full input schema. Values: skip.
action_parametersNo; body and guard rules applyobjectSee the full input schema.
descriptionNo; body and guard rules applystringSee the full input schema.
rulesets_SkipRule.allOf[1].action_parameters
ArgumentRequiredTypeDetails
phaseNo; body and guard rules applyrulesets_SkipPhaseSee the full input schema.
phasesNo; body and guard rules applyrulesets_SkipPhasesSee the full input schema.
productsNo; body and guard rules applyrulesets_SkipProductsSee the full input schema.
rulesNo; body and guard rules applyrulesets_SkipRulesSee the full input schema.
rulesetNo; body and guard rules applyrulesets_SkipRulesetSee the full input schema.
rulesetsNo; body and guard rules applyrulesets_SkipRulesetsSee the full input schema.
rulesets_TransformResponseHTMLRule.allOf[1]
ArgumentRequiredTypeDetails
actionNo; body and guard rules applystringSee the full input schema. Values: transform_response_html.
action_parametersNo; body and guard rules applyobjectSee the full input schema.
descriptionNo; body and guard rules applystringSee the full input schema.
rulesets_TransformResponseHTMLRule.allOf[1].action_parameters
ArgumentRequiredTypeDetails
link_mazeYesobjectEnables the link maze transformation on the response.

9. DNS, Rulesets, cache and analytics

A deliberate DNS change

Read list_zones, get_zone and list_dns_records to establish the exact zone and record. Inspect get_operation_schema for create_dns_record or update_dns_record. A PATCH edits provided fields; a PUT replacement can alter omitted-field behavior. Choose ttl/proxied/type/content deliberately rather than assuming every record should be proxied. DNS conflicts, plan constraints and semantic validity are finally decided by Cloudflare.

bash
cloudflare-cli preview-operation --operation create_dns_record --arguments '{"zone_id":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","payload":{"name":"review.example.com","type":"A","content":"192.0.2.1","ttl":1,"proxied":false}}' --agent
cloudflare-cli create-dns-record --zone-id YOUR_ZONE_ID --payload-file /absolute/private/approved-dns.json --account work --confirm --agent

The first command is a local illustration using documentation-only IDs/IPs. It makes no provider request. The second is a real mutation only when private credentials, a real resource and the explicitly approved body are supplied. After any approved change, read the returned record and check the intended resolver/service.

Review a small DNS batch

Save only the chosen native deletes/patches/puts/posts body in a private JSON file. preview_dns_batch validates the same native schema and 1–50 total-action cap, then returns a SHA-256 digest of method, exact zone path, profile label and canonically sorted JSON object keys. Array order is preserved. Read and approve the full body, target and profile before apply_dns_batch.

bash
cloudflare-cli preview-dns-batch --zone-id YOUR_ZONE_ID --payload-file /absolute/private/approved-dns-batch.json --account work --agent
cloudflare-cli apply-dns-batch --zone-id YOUR_ZONE_ID --payload-file /absolute/private/approved-dns-batch.json --account work --preview-sha256 REVIEWED_64_CHARACTER_HASH --confirm --agent

Any change to that reviewed request requires a new preview. This does not detect concurrent remote edits, credential rotation under the same label or changes in token grants. The digest is not an authorization secret, human approval signature or remote-state transaction lock. The direct native batch_dns_records command also exists, requires --confirm and does not require a digest; choose the review/apply workflow when you need exact local review.

Cloudflare batch semantics execute deletes, patches, puts, then posts in a database transaction; distributed DNS propagation remains non-atomic. If provider validation fails, no batch changes apply. A network failure after submission can leave the outcome unknown; read the affected records before repeating. The wrapper never promises all resolvers change at once or supplies a rollback.

Settings and Rulesets

get_zone_setting with setting_id=ssl replaces the older SSL helper. Inspect the setting's editable/value metadata before update_zone_setting. Ruleset actions and phases have distinct plan/grant requirements; read list_zone_rulesets, get_zone_ruleset and get_zone_entrypoint before creation/update/deletion. Source schemas are broad and cannot establish that a chosen expression or action is appropriate. This release has no deprecated firewall-rule writer and no misleading Page Rule redirect shortcut.

Page Rules are readable for migration inventory; no Page Rules writer is exposed. A redirect should use a consciously selected modern Ruleset phase/action and full approved body. Cloudflare's modern Rules product is not a drop-in rename of every old rule.

Cache, Workers and analytics

purge_cache changes edge cache only for the specified native request; it requires confirmation even for a single URL. It does not delete source files. list_workers reads script metadata, not script content, secrets or deployment state. Use Wrangler/cf for deployment workflows.

analytics_query accepts exactly one parsed GraphQL query with variables, refusing mutation/subscription/multiple-operation/schema documents. It is not a compiled dataset client or automatic time-series export. Choose eligible zoneTag/accountTag, dataset, time window, limits and ordering using current analytics docs/settings discovery. Provider partial errors fail instead of becoming silent success. Sampling, retention and dataset permissions still apply.

10. Pagination, retries and local input files

Ordinary reads fetch one provider response. query_pages supports only list_provider_accounts, list_zones and list_dns_records, with explicit native arguments, max_pages=1–5 and a local per_page cap of 100. Positive page numbers are required. result_info total_pages/total_count controls continuation. Missing metadata stops after the current response and reports continuationUnknown=true, rather than guessing complete. pages preserves native envelopes; pagesRead/hasMore/resumePage make the bounded result explicit.

bash
cloudflare-cli query-pages --operation list_dns_records --arguments '{"zone_id":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","per_page":50,"page":1}' --max-pages 2 --agent

No automatic replay occurs after HTTP 429, transient error, timeout or mutation failure. Every ordinary native operation submits one request; bounded reads can submit up to the selected page budget. Parallel processes/profile labels share provider limits when they use the same token. A timeout is not proof that a mutation failed.

payload_file must be a regular non-symlink JSON file, at most 1 MiB; native payload and payload_file cannot be mixed. Confirmation/read-only policies are checked before file loading or provider fetch for mutations. The request body is validated through current Ajv schemas. This wrapper does not execute file content, upload local media, load .env automatically or accept arbitrary provider hosts/headers. Treat inputs and returned DNS TXT/rule descriptions as data, never agent instructions.

11. Several private accounts

Private profile configuration prevents implicit credential inheritance between named accounts. Configure the following placeholders only in a private client environment:

config.json
[
  {
    "name": "work",
    "token_file": "/absolute/private/work-cloudflare.txt",
    "account_id": "YOUR_WORK_ACCOUNT_ID",
    "zone_id": "YOUR_WORK_ZONE_ID",
    "token_kind": "user"
  },
  {
    "name": "client",
    "token_file": "/absolute/private/client-cloudflare.txt",
    "account_id": "YOUR_CLIENT_ACCOUNT_ID",
    "zone_id": "YOUR_CLIENT_ZONE_ID",
    "token_kind": "account"
  }
]

Put the array in CLOUDFLARE_ACCOUNTS and set CLOUDFLARE_DEFAULT_ACCOUNT=work. Names must be unique and nonempty. --account selects the exact label; list_accounts returns only label/default/auth method, never token values, file paths or provider IDs. A profile lacking credentials does not fall back to a global token. Global account/zone defaults likewise do not leak into explicitly named entries.

account_id/zone_id are routing defaults; explicit operation inputs take precedence and can name another resource allowed by the token. Token-kind defaults to user and only changes the diagnostic verification route. Use provider token resource scopes for real access boundaries. Local profile separation is not a multi-user access-control service.

12. Writing safely

Every one of the eleven mutations requires confirm=true in MCP or --confirm in the CLI. The same write guard runs before file loading/provider execution. Creation, edits, replacement, deletion, cache purge and Ruleset changes all require explicit intent. --agent and --yes never grant it.

Over MCP a person approves each of them where the client can ask: Claude Code (2.1.246 and later) shows its own prompt, and a client that can show forms asks with an approval form whose one box starts unticked. Each approval is signed, bound to that exact call and works once. Where a client can do neither, the model's confirm:true counts. CLOUDFLARE_CONFIRM=model makes confirm:true enough everywhere, for an agent with no person to ask.

CLOUDFLARE_READ_ONLY=1 hides every mutation and refuses direct calls to hidden names even with confirmation. CLOUDFLARE_ALLOW_DESTRUCTIVE=0 blocks all mutations even when confirmed; read-only takes precedence. Use narrow provider tokens as the authorization boundary. A model can assert confirm=true; where the client can ask, the person approves instead, and that approval is signed and bound to the exact call. Where it cannot, confirm=true is the model's assertion, not a person's approval.

Review the exact zone/account, profile, record/rule IDs and full native body. apply_dns_batch additionally compares the reviewed request digest and makes one native request without automatic replay. Local preview does not authenticate the account, check conflicts or read remote state. Direct native batch also needs confirmation but does not require the digest.

An optional CLOUDFLARE_AUDIT_LOG records timestamp, surface, tool, risk, static summary, decision and who approved it, then a done or failed line for each allowed call. It excludes request bodies, account IDs and tokens. Existing file ACLs/rotation are your responsibility; a failed audit append does not block the action. Account data returned after a change is untrusted content.

13. How the two surfaces work

src/tools/index.ts builds one ALL_TOOLS catalogue from reviewed operation metadata and seven helpers. Slipway builds both binaries from it: the MCP server, over stdio or --http, and the CLI, with the same schemas, validation, profile routing, API client and write guard. CLI command names are the tool names with hyphens.

The server can initialize/discover without credentials. Local helper annotations accurately distinguish local work from provider calls. API requests use one fixed origin, no arbitrary headers or redirects and no automatic retries. Current selected body schemas use Ajv with formats; analytics is parsed through GraphQL's AST before fetch. Version comes from package.json; the desktop manifest/root lock must agree.

The public metadata excludes vendor examples/code samples. scripts/sync-openapi.mjs checks distributed metadata offline or compares against a checksum-reviewed local official JSON file. Refresh requires an explicit reviewed checksum and source commit; it has no network or source-code import path. Review changes, scan, rebuild, regenerate docs and bump versions before release.

14. Privacy and data handling

Account commands send the selected token in a Bearer header only to api.cloudflare.com. Prompts are not forwarded by this package; the native request/query content you select is. Your AI client may send returned DNS records, rule expressions and analytics to its model provider according to its own policy. The wrapper has no telemetry, public HTTP listener or hosted account store.

Named private profiles do not inherit global credentials. Token files use size/type/POSIX owner-only checks and are cached until restart. Windows ACLs require separate user configuration. Never commit credentials, .env, token files, real account exports or signed URLs; keep all such files outside public source and release staging.

Known credential keys, configured secrets and recognized signed URLs are redacted from ordinary output/errors. Legitimate URLs are preserved. Redaction is not complete anonymization: DNS TXT records, names, expressions and returned account data may still be sensitive. --select is local data shaping, not an authorization boundary or upstream privacy filter. Capture only needed output; terminal history and client transcripts can persist it.

Optional audit logging stores policy metadata, not bodies. The package does not automatically persist provider responses or backups; private input/output files you create remain on your system until you manage them. Revoke tokens through Cloudflare, not npm.

15. Environment variables

Configure these privately in the environment of the actual client process. The package does not automatically load a .env file. GUI clients may need private settings rather than shell exports.

VariablePurpose / default
CLOUDFLARE_API_TOKENPrivate Bearer API token; no Global API Key support
CLOUDFLARE_TOKEN_FILEAbsolute regular owner-only token-only file; max 64 KiB; takes precedence
CLOUDFLARE_ACCOUNTSPrivate JSON array of explicit named profiles; no global credential/default inheritance
CLOUDFLARE_DEFAULT_ACCOUNTExact profile name; first profile default when omitted
CLOUDFLARE_ACCOUNT_IDOptional default account ID when using the single global profile
CLOUDFLARE_ZONE_IDOptional default zone ID when using the single global profile
CLOUDFLARE_TOKEN_KINDuser (default) or account; doctor verification route only
CLOUDFLARE_READ_ONLY1/true hides/refuses every mutation
CLOUDFLARE_ALLOW_DESTRUCTIVE0/false refuses confirmed mutations; otherwise enabled
CLOUDFLARE_AUDIT_LOGOptional private append-only metadata path
CLOUDFLARE_REQUEST_TIMEOUT_MSDefault 30000; integer 100–300000; no automatic retry
CLOUDFLARE_MIN_REQUEST_INTERVAL_MSDefault 200; integer 0–10000; per profile/process
CLOUDFLARE_CONFIRMhuman by default; model lets confirm:true alone approve over MCP, for an agent with no person to ask
CLOUDFLARE_SURFACEfull by default; search lists three tools that find, describe and run the rest
CLOUDFLARE_TOOL_TIMEOUT_MSGive up on any tool after this long
CLOUDFLARE_HTTP_PORT, CLOUDFLARE_HTTP_HOST, CLOUDFLARE_HTTP_TOKENFor --http: port 8787 and host 127.0.0.1 by default; any other host needs the bearer token
CLOUDFLARE_HTTP_ALLOWED_ORIGINSComma-separated browser origins allowed to call --http; a page from any other site is refused
CLOUDFLARE_DEBUG1 prints debug lines on stderr

Credential/profile fields are strings without line breaks. Only 1/true enables read-only; 0/false disables destructive operations. Named profile keys are name, api_key or api_token, token_file, account_id, zone_id and token_kind. api_key is a compatibility field name holding a Bearer token, never a Global API Key.

16. Updates and removal

Terminal
npm install -g @thenavidm/cloudflare-mcp-cli@latest
cloudflare-cli --version
npm uninstall -g @thenavidm/cloudflare-mcp-cli
codex mcp remove cloudflare

npx @latest resolves again when the server starts; restart/reconnect to use the release. Global npm installs need an explicit update. Desktop extensions need the new versioned archive installed separately. Check CHANGELOG.md and the manifest; remove duplicate MCP entries rather than running two account servers accidentally.

Remove client configuration/skill references and deliberately manage private files. Uninstall does not revoke tokens or undo DNS, Rulesets/cache changes. Existing private legacy refs stay private; migrate configuration/commands deliberately using the map below. Pin 2.0.0 if reproducible installation matters more than automatically receiving the latest release.

17. Troubleshooting

SymptomCheck
Binary missing / PowerShell policyNode/npm version, npm global prefix/PATH, npm.cmd or Command Prompt; reopen terminal
GUI cannot launch npxClient environment; Windows cmd /c launcher or absolute node and entry path
Exit 10Private token/file for the selected profile; no implicit global inheritance
Token doctor failsToken kind, account ID for account-owned verification, expiry/IP filter and active status
Token verifies but zone read failsExact resource IDs, token permissions/resource restrictions and membership
Mutation refusesExact --confirm/confirm:true, read-only and disabled-operation policy
Native body rejectedComplete current JSON payload, type-specific union branch, required keys and no unknown root fields
Batch digest changedRe-preview exact zone/profile/body; do not copy a digest from another request
Unknown continuationProvider metadata absent; bounded result does not establish the entire library
HTTP 200 but command failsProvider success/errors or GraphQL partial errors; inspect sanitized error
HTTP 429 / timeoutProvider quota/reset; no automatic replay; inspect state before deliberate retry
Setting/rule unsupportedProvider plan, editable state, selected Ruleset phase/action and accepted grants
Analytics absent / sampledDataset settings, time window, plan/grant/retention and sampling
Expected Worker deploy / OAuthUse official cf/Wrangler or hosted MCP; this focused package has neither

Report a minimal redacted reproduction with package/client/OS versions and tool name. Never post token values, real DNS TXT secrets, private bodies or full account exports. Account/GUI/task outcomes are not established by fixture tests or stdio discovery.

18. API coverage and comparisons

OfferingCurrent surfaceVerified strengths and limits
Official Code Mode MCPhttps://mcp.cloudflare.com/mcp; current pinned README lists docs/search/executeOAuth or user/account token access, sandboxed code execution across the wider API, provider-maintained documentation search and configurable truncation. Individual endpoint tools are optional. Client approval and token permission boundaries remain relevant.
Official cf CLIcf 1.0.0-beta.12; Cloudflare documents more than 2900 commandsGeneral account API coverage, command search, schemas, JSON, dry-run, named profiles, OAuth refresh, resource name resolution and local developer resources. Delete confirmation already exists.
Wrangler4.147.0 at this reviewWorkers development/deployment and related project workflows. This focused package does not replace the developer toolchain.
Official domain MCP serversProvider-hosted service-specific MCP endpointsSpecialized analytics, builds, browser rendering and other products; current /mcp endpoints use Streamable HTTP. These are distinct from a local stdio DNS task wrapper.
CloudFlareMCPCommunity MIT source 1.0.0; 11 documented tools; stdio/HTTPDNS convenience, BIND export, edit snapshots, guarded raw passthrough and optional Worker deployment/secrets. Delete/passthrough confirmation is already present. No dedicated task CLI is declared in the pinned package.
This owned package29 shared local MCP tools / CLI commands; versioned desktop bundle18 reads and 11 mandatory-confirmation mutations, isolated private profiles, complete selected native schemas, local previews, bounded page reads, reviewed DNS digest and no automatic replay. Narrower coverage than the official general API tools.

Checked October 3, 2026. Official MCP source: cloudflare/mcp commit 69ba3143bb8ffa2b3c1f12bfb7536c9ca4c57a2d. Selected API schema: cloudflare/api-schemas commit 37e7a4ae9c5123a2c58929a100c42cb4584edc57, API info 4.0.0. Community source is pinned above; its extra workflows are useful and are not claimed here.

The actual public cf@1.0.0-beta.12 package installed cleanly. Its complete binary passed version, command search, DNS-create schema and DNS-create dry-run checks with inherited provider credentials removed, telemetry disabled and fetch blocked. Its published DNS-create handler plus run wrapper were separately exercised in an isolated function fixture: a valid create without a confirmation flag reached an injected network-free SDK request once; dry-run reached it zero times. That fixture is not an authenticated Cloudflare operation or a whole-client approval test. Our equivalent shared handler refuses before fetch without explicit confirmation, including direct MCP calls.

Official cf already confirms deletes and has useful dry-run/profile features. Code Mode isolates credential injection from generated code; do not describe it as handing account tokens to the model. Reviewed official retry code can replay requests on transient/429 failures; this wrapper does not replay any request automatically. Confirmation is the caller asserting approved intent, not a cryptographic proof of a human approval or provider authorization.

The owned use case is a focused, repeatable DNS/zone task with consistent approval across CLI and MCP and an exact-request batch review. Choose official cf/Code Mode for broader API work and Wrangler for deployments. SEO, more tool names and metadata size do not establish better tasks or lower token cost. Live provider outcomes, GUI installation and actual matched Codex usage remain separately unverified.

Legacy command migration

Legacy commandCurrent routeMigration detail
list_zones/get_zoneSame namesCurrent native arguments/envelopes; use exact filters
list_dns_records/create/update/deleteSame namesComplete native payload schemas; every mutation confirmed
purge_cacheSame nameNative body and explicit approval
get_ssl_settings/update_ssl_settingsget_zone_setting/update_zone_settingsetting_id=ssl and current value schema
get_zone_settings/update_zone_settingPer-setting read/updateDeprecated bulk settings route excluded
get_zone_analyticsanalytics_queryRead-only current GraphQL dataset query, not deprecated REST dashboard
list_firewall_ruleslist_zone_rulesets / get_zone_rulesetCurrent Rulesets product; no deprecated firewall writer
create_redirect_rule/list_redirectsExplicit selected Ruleset workflowLegacy helper created Page Rules; modern redirect phase/action must be reviewed
list_page_rulesRead-only Page Rules inventoryNo legacy Page Rule writer
list_workersSame nameWorker script metadata only, no deployment

Private legacy source is retained separately and never pushed into clean public history. The old source has 17 MCP tools and no declared task CLI. This release changes input/response/config contracts, so migration is deliberate rather than an unverified drop-in compatibility promise.

19. Versions

ComponentReviewed version / source
Owned package / desktop3.0.1
Legacy source package1.0.0; private source b6fef82d992cefbfb4ea9a9ea49e17275609c34e
Cloudflare REST API schemaAPI info 4.0.0; commit 37e7a4ae9c5123a2c58929a100c42cb4584edc57
Official cf / Wrangler1.0.0-beta.12 / 4.147.0 at review
@thenavidm/slipway0.1.17
MCP TypeScript SDK, through Slipway2.3.0
ajv8.20.0
ajv-formats3.0.1
graphql16.14.2
typescript7.0.2
vitest5.0.3
vite8.3.2
@anthropic-ai/mcpb2.1.2

See CHANGELOG.md for dated changes and GitHub Releases for annotated source tags and versioned desktop assets. Match npm, server, manifest and root lock versions. Future schema refreshes must record upstream commit/checksums, exclusions, changed inputs and comparison evidence; do not assume a provider beta stays the same. No prior public legacy npm/tag release is implied.

20. FAQ

What does this package provide?

A focused shared Cloudflare CLI/local MCP and desktop archive, with 29 tools: 18 reads and 11 explicitly confirmed mutations. Its selected DNS/zone management surface is narrower than the official general API tools.

Does Cloudflare already have official MCPs and a CLI?

Yes. Code Mode MCP, specialized provider MCPs, the general cf CLI and Wrangler already exist. The comparison documents their strengths and our specific recurring workflow rather than claiming they are missing.

Why build this if official tools exist?

For consistent mandatory confirmation in both local surfaces, isolated private profiles and an exact-request DNS batch review. These are tested local workflow differences; no universal superiority or measured token winner is claimed.

Can I use it in Codex?

Yes: register the npx @latest stdio command, forward private environment settings, or use cloudflare-cli with SKILL.md. Discovery works without provider authentication; account operations need the intended token grant.

Does it support Claude Desktop?

A versioned .mcpb vendors production dependencies and exposes private token/file/default/policy settings. Manual stdio is also documented. A protocol handshake is not a verified desktop GUI installation.

Which operating systems and clients are covered?

The house setup covers Node 22+ on macOS, Windows and Linux and local stdio clients including Codex, Claude, Cursor, VS Code, Windsurf, Zed, Gemini CLI and Cline. Client runtime, policy and launchers still matter; remote-only clients use official hosted MCP.

Should I use a Global API Key?

No. This Bearer-only wrapper expects a least-privilege API token. Restrict its Cloudflare permissions/resources; local profile defaults do not narrow upstream grants.

Can it use account-owned tokens?

Yes when the intended endpoints support that token type. Set token_kind=account and an account ID for doctor verification. Token kind changes only the diagnostic route; provider compatibility and permissions remain authoritative.

Does login implement OAuth or save credentials?

No. login prints private token instructions. The package neither opens consent nor reads/renews official cf OAuth sessions or global CLI configuration.

How do I prevent writes?

Set CLOUDFLARE_READ_ONLY=1 and reconnect. Eleven mutations disappear and direct calls still refuse. CLOUDFLARE_ALLOW_DESTRUCTIVE=0 additionally refuses confirmed mutations.

Does --agent or --yes approve a write?

No. Every mutation needs --confirm or confirm:true for the actual requested operation. The client/human still determine that it was approved; this flag is not a signed human consent.

What does the DNS batch digest bind?

The exact method, zone path, profile label and canonical native JSON body, preserving array order. Any change requires a new local preview. It does not bind remote state or a token grant and does not prevent concurrent edits.

Does every DNS batch require a digest?

The review/apply helper does. Direct native batch_dns_records also exists, requires explicit confirmation and follows the native schema/provider limits, but does not require a digest.

Are DNS batch updates atomically visible everywhere?

No. Cloudflare executes the request in a database transaction but distributed propagation is not atomic. Inspect affected records after an unknown outcome and do not automatically repeat submissions.

Will it collect every page automatically?

No. Ordinary commands fetch one response. query_pages supports three named reads with a one-to-five-page budget and explicit continuation/unknown reporting.

Does it retry after rate limits or timeouts?

No request retries automatically. Wait for current upstream reset policy, inspect possible mutation state and deliberately repeat only if appropriate.

Can it deploy Workers or manage all Cloudflare products?

No. list_workers is metadata only. Use official cf, Code Mode or Wrangler for broader/deployment tasks. There is no unrestricted raw request tool here.

What analytics can it read?

One parsed GraphQL query at a time, with variables and provider-controlled dataset permissions, retention, sampling and limits. It refuses mutations and partial-error responses; it is not an automatic analytics export.

Is CLI more token-efficient than MCP?

It depends on the client and the task. In Claude Code the CLI costs nothing until it is used, plus about 4,000 tokens for SKILL.md once, where the server costs about 610 tokens a message with tool search and 144,000 with every tool loaded. In Codex, finding the command that purges a zone's cache took a median of 83,426 input tokens over the CLI and 41,139 over MCP. Section 7 has how each was measured.

How do I update, remove or revoke access?

Restart npx @latest, explicitly update global npm installs and reinstall new desktop archives separately. Remove client entries and revoke the intended token through Cloudflare. Uninstall does not undo provider changes.

Questions

Open a sanitized issue. Read SECURITY.md for private reports.

About the author

Navid Moazzez is a leading AI business strategist, and the host of the AI Creator Summit, watched by 100,000+ creators. He helps creators and founders master AI and build their own AI Operating System (AI OS) to automate their business and life. He creates useful free tools, MCP servers and CLIs that creators and founders can use in their own workflows.

Links

If this is useful, star the repo and come say hi on X.

Dependencies

Runtime: Slipway, which brings the MCP TypeScript SDK, plus Ajv, ajv-formats and GraphQL. Development: TypeScript, Vitest, Vite and MCPB. Exact component versions are above and in package-lock.json. Reviewed Cloudflare API schema metadata is BSD-3-Clause and credited in THIRD_PARTY_NOTICES.md; packaging development tools are excluded from runtime bundles.

License

Preserves AGPL-3.0-or-later. Read LICENSE, the full text and THIRD_PARTY_NOTICES.md. Cloudflare terms and trademarks remain separate.


© 2026 Navid Media. Made with ❤️ by Navid Moazzez.