- API Reference·续14
- Patch Cloud Integration
- Delete Cloud Integration
- Run Discovery for All Integrations
- Run Discovery
- Get Cloud Integration Setup Config
- Magic Cloud NetworkingResources
- Monetization
- MonetizationRules
- Network Interconnects
- Network InterconnectsCNIs
- Network InterconnectsInterconnects
- Network InterconnectsSettings
- Network InterconnectsSlots
- MTLS Certificates
- MTLS CertificatesAssociations
- Pages
- PagesProjects
- PagesProjectsDeployments
- PagesProjectsDeploymentsHistory
- PagesProjectsDeploymentsHistoryLogs
- PagesProjectsDeploymentsTails
- PagesProjectsDomains
- PagesAssets
- Registrar
- Prerequisites
- Terminology: domain extension
- Supported extensions
- Typical workflow
- Default behavior for mutating operations
- Non-blocking mode
- Polling
API Reference·续14
Patch Cloud Integration
PATCH/accounts/{account_id}/magic/cloud/providers/{provider_id}
Delete Cloud Integration
DELETE/accounts/{account_id}/magic/cloud/providers/{provider_id}
Run Discovery for All Integrations
POST/accounts/{account_id}/magic/cloud/providers/discover
Run Discovery
POST/accounts/{account_id}/magic/cloud/providers/{provider_id}/discover
Get Cloud Integration Setup Config
GET/accounts/{account_id}/magic/cloud/providers/{provider_id}/initial_setup
Magic Cloud NetworkingResources
List Resources
GET/accounts/{account_id}/magic/cloud/resources
Read Resource
GET/accounts/{account_id}/magic/cloud/resources/{resource_id}
Export Resources
GET/accounts/{account_id}/magic/cloud/resources/export
Preview Rego Query
POST/accounts/{account_id}/magic/cloud/resources/policy-preview
Monetization
MonetizationRules
List payment rules
GET/zones/{zone_id}/monetization/rules
Deploy payment ruleset
PUT/zones/{zone_id}/monetization/rules
Delete all payment rules
DELETE/zones/{zone_id}/monetization/rules
Get a payment rule
GET/zones/{zone_id}/monetization/rules/{rule_id}
Update a payment rule
PATCH/zones/{zone_id}/monetization/rules/{rule_id}
Delete a payment rule
DELETE/zones/{zone_id}/monetization/rules/{rule_id}
Network Interconnects
Network InterconnectsCNIs
List existing CNI objects
GET/accounts/{account_id}/cni/cnis
Get information about a CNI object
GET/accounts/{account_id}/cni/cnis/{cni}
Create a new CNI object
POST/accounts/{account_id}/cni/cnis
Modify stored information about a CNI object
PUT/accounts/{account_id}/cni/cnis/{cni}
Delete a specified CNI object
DELETE/accounts/{account_id}/cni/cnis/{cni}
Network InterconnectsInterconnects
List existing interconnects
GET/accounts/{account_id}/cni/interconnects
Get information about an interconnect object
GET/accounts/{account_id}/cni/interconnects/{icon}
Create a new interconnect
POST/accounts/{account_id}/cni/interconnects
Delete an interconnect object
DELETE/accounts/{account_id}/cni/interconnects/{icon}
Generate the Letter of Authorization (LOA) for a given interconnect
GET/accounts/{account_id}/cni/interconnects/{icon}/loa
Get the current status of an interconnect object
GET/accounts/{account_id}/cni/interconnects/{icon}/status
Network InterconnectsSettings
Get the current settings for the active account
GET/accounts/{account_id}/cni/settings
Update the current settings for the active account
PUT/accounts/{account_id}/cni/settings
Network InterconnectsSlots
Retrieve a list of all slots matching the specified parameters
GET/accounts/{account_id}/cni/slots
Get information about the specified slot
GET/accounts/{account_id}/cni/slots/{slot}
MTLS Certificates
List mTLS certificates
GET/accounts/{account_id}/mtls_certificates
Get mTLS certificate
GET/accounts/{account_id}/mtls_certificates/{mtls_certificate_id}
Upload mTLS certificate
POST/accounts/{account_id}/mtls_certificates
Delete mTLS certificate
DELETE/accounts/{account_id}/mtls_certificates/{mtls_certificate_id}
MTLS CertificatesAssociations
List mTLS certificate associations
GET/accounts/{account_id}/mtls_certificates/{mtls_certificate_id}/associations
Pages
PagesProjects
List Cloudflare Pages projects
GET/accounts/{account_id}/pages/projects
Get a Cloudflare Pages project
GET/accounts/{account_id}/pages/projects/{project_name}
Get upload token
GET/accounts/{account_id}/pages/projects/{project_name}/upload-token
Create a Cloudflare Pages project
POST/accounts/{account_id}/pages/projects
Update a Cloudflare Pages project
PATCH/accounts/{account_id}/pages/projects/{project_name}
Delete a Cloudflare Pages project
DELETE/accounts/{account_id}/pages/projects/{project_name}
Purge the Pages build cache
POST/accounts/{account_id}/pages/projects/{project_name}/purge_build_cache
PagesProjectsDeployments
List Pages deployments
GET/accounts/{account_id}/pages/projects/{project_name}/deployments
Get a Pages deployment
GET/accounts/{account_id}/pages/projects/{project_name}/deployments/{deployment_id}
Create a Pages deployment
POST/accounts/{account_id}/pages/projects/{project_name}/deployments
Delete a Pages deployment
DELETE/accounts/{account_id}/pages/projects/{project_name}/deployments/{deployment_id}
Retry a Pages deployment
POST/accounts/{account_id}/pages/projects/{project_name}/deployments/{deployment_id}/retry
Roll back a Pages deployment
POST/accounts/{account_id}/pages/projects/{project_name}/deployments/{deployment_id}/rollback
PagesProjectsDeploymentsHistory
PagesProjectsDeploymentsHistoryLogs
Get Pages deployment logs
GET/accounts/{account_id}/pages/projects/{project_name}/deployments/{deployment_id}/history/logs
PagesProjectsDeploymentsTails
Create deployment tail
POST/accounts/{account_id}/pages/projects/{project_name}/deployments/{deployment_id}/tails
Delete deployment tail
DELETE/accounts/{account_id}/pages/projects/{project_name}/deployments/{deployment_id}/tails/{tail_id}
PagesProjectsDomains
List Pages custom domains
GET/accounts/{account_id}/pages/projects/{project_name}/domains
Get a Pages custom domain
GET/accounts/{account_id}/pages/projects/{project_name}/domains/{domain_name}
Add a Pages custom domain
POST/accounts/{account_id}/pages/projects/{project_name}/domains
Retry custom domain validation
PATCH/accounts/{account_id}/pages/projects/{project_name}/domains/{domain_name}
Delete a Pages custom domain
DELETE/accounts/{account_id}/pages/projects/{project_name}/domains/{domain_name}
PagesAssets
Upsert asset hashes
POST/pages/assets/upsert-hashes
Check missing assets
POST/pages/assets/check-missing
Upload asset
POST/pages/assets/upload
Registrar
Registrar API for searching, checking, registering, and managing domains through Cloudflare Registrar.
Prerequisites
Before using this API, ensure:
- Cloudflare account — the caller must have a valid Cloudflare account.
- Billing profile — the account must have a billing profile with a valid, current default payment method (credit card or other accepted method). This cannot be set up via API — the account owner must configure billing at
https://dash.cloudflare.com/{account_id}/billing/payment-infobefore callingPOST /registrations. - API authentication — use an API token or API key with the appropriate Registrar permissions for the operations you are calling.
Terminology: domain extension
Throughout this API, “extension” refers to the domain extension part of a fully qualified domain name — the portion after the registrable label. For example, in example.co.uk, the extension is co.uk (not just uk). This covers both top-level domains like com and multi-level extensions like co.uk. This is distinct from other uses of the word “extension” (e.g., EPP extensions).
Supported extensions
This API supports programmatic registration for all extensions supported by the dashboard experience, with the following exceptions:
giving, mom, inc, lol, sh, link, cc, new
Cloudflare Registrar supports 400+ extensions in the dashboard. Extensions listed above can be registered at https://dash.cloudflare.com/{account_id}/domains/registrations.
Typical workflow
- Search — call
GET /domain-search?q={keyword}to discover available domains. - Check — call
POST /domain-checkwith candidate domains to verify real-time availability and pricing. - Review the response — if
registrable: false, inspectreasonto understand whether the domain is unavailable, the extension is not supported by this API, the extension is not supported by Cloudflare Registrar at all, or the extension’s registry has frozen new registrations. - Handle premium domains — if
tier: premium, premium registration is not currently supported by this API. Surface the premium pricing to the user, but do not proceed toPOST /registrationsfor that domain. - Observe the registration schema — call
GET /extensions/:extension_nameto discover the required values for registering this extension. - Register — call
POST /registrationswith the chosen domain name for supported non-premium registrations. - Confirm completion — if the response is
201 Created, registration completed within the default timeout and no polling is needed. - Poll when needed — if the response is
202 Accepted, polllinks.selffrom the workflow response. - Stop for user action — if
state: action_required, stop polling and surfacecontext.actionto the user. The workflow will not resolve on its own. - Continue when blocked — if
state: blocked, continue polling and inform the user that a third party, such as the extension registry or losing registrar, is delaying progress. - Review failures before retrying — if
state: failed, reviewerror.codeanderror.message, then decide whether user action or a new Check call is needed.
All successful domain registrations are non-refundable. Once the registration workflow completes with state: succeeded, the charge cannot be reversed. Confirm pricing and domain choice with the user before calling POST /registrations.
Default behavior for mutating operations
By default, mutating operations such as create and update hold the connection for a bounded, server-defined amount of time while the operation completes. In most cases, the response contains a completed workflow status and no polling is required.
- Completed within the synchronous wait window: Returns
201(create) or200(update) with aworkflow_statuswherestate: succeededandcompleted: true. - Still processing after the synchronous wait window: Returns
202 Acceptedwith aworkflow_statuswherecompleted: false. Use thelinks.selfURL to poll for completion.
Non-blocking mode
To receive an immediate 202 Accepted response without waiting, send the Prefer: respond-async request header (RFC 7240). The server will acknowledge it with a Preference-Applied: respond-async response header.
Polling
When the response is 202, poll the workflow status endpoint indicated by links.self in the response body until the workflow reaches a terminal state or requires user action.
Search for available domains
GET/accounts/{account_id}/registrar/domain-search
Check domain availability
POST/accounts/{account_id}/registrar/domain-check
