# Porkbun Cloudflare API

**Canonical:** https://apis.io/apis/porkbun-com/porkbun-com-cloudflare-api/  
**Provider:** Porkbun — https://apis.io/providers/porkbun-com/  
**Base URL:** https://api.porkbun.com/api/json/v3  
**Documentation:** https://porkbun.com/api/json/v3/documentation

Porkbun Cloudflare API is one of 19 APIs that [Porkbun](https://apis.io/providers/porkbun-com/) publishes on the [APIs.io](https://apis.io/) network, described by a machine-readable OpenAPI specification. Tagged areas include Cloudflare. The published artifact set on APIs.io includes an OpenAPI specification.

Move a customer's domains into **their own Cloudflare account**: we create the zone, copy across the DNS records we hold, and repoint the registry nameservers at Cloudflare. Two stages, and the first one needs a human: 1. **Connect the Cloudflare account (browser, one time).** Cloudflare's consent screen cannot be completed over the API. Send the account owner to `https://porkbun.com/account/connectCloudflare`, then poll `GET /cloudflare/getConnection` until `connected` is `true`. 2. **Move domains (API).** `GET /cloudflare/inventory` to see what's eligible, `POST /cloudflare/connect` to queue, then poll `/cloudflare/getQueue`. `POST /cloudflare/rollback/{domain}` undoes a move; `POST /cloudflare/retry/{domain}` re-queues a failure. Queueing is asynchronous and per-domain: a call returns *queued*, never *connected*, and `skipped` (DNSSEC live, custom nameservers, already connected) is a normal outcome carrying a reason, not a failure.

## Operations (17)

| Method | Path | Summary |
|---|---|---|
| GET | `/cloudflare/getConnection` | Check the Cloudflare account connection (poll target) |
| GET | `/cloudflare/inventory` | List every domain with its Cloudflare eligibility |
| POST | `/cloudflare/connect` | Queue domains to move to the customer's Cloudflare account |
| GET | `/cloudflare/getQueue` | List every Cloudflare move for the account |
| GET | `/cloudflare/get/{domain}` | Get the Cloudflare move status for one domain |
| POST | `/cloudflare/retry/{domain}` | Retry a failed or skipped domain |
| POST | `/cloudflare/rollback/{domain}` | Undo a completed move (restore Porkbun nameservers) |
| POST | `/cloudflare/disconnect` | Remove the stored Cloudflare connection |
| POST | `/cloudflare/setProxy/{domain}` | Turn the Cloudflare proxy (orange cloud) on or off |
| GET | `/cloudflare/getRecords/{domain}` | List the domain's live DNS records at Cloudflare |
| GET | `/cloudflare/preview/{domain}` | Preview exactly which records a move would copy |
| GET | `/cloudflare/getZone/{domain}` | Get live zone state from Cloudflare (and detect nameserver drift) |
| GET | `/cloudflare/getZoneSettings/{domain}` | Read the zone settings that matter after a move |
| POST | `/cloudflare/setZoneSettings/{domain}` | Change zone settings (allowlisted) |
| POST | `/cloudflare/createRecord/{domain}` | Create a DNS record in the domain's Cloudflare zone |
| POST | `/cloudflare/editRecord/{domain}/{recordId}` | Update a DNS record in the domain's Cloudflare zone |
| POST | `/cloudflare/deleteRecord/{domain}/{recordId}` | Delete a DNS record from the domain's Cloudflare zone |

## Machine-readable artifacts (1)

- **OpenAPI** — https://artifacts.apis.io/porkbun-com/openapi/porkbun-com-cloudflare-api-openapi.yml

## Other Porkbun APIs (12)

- [Porkbun Account API](https://apis.io/apis/porkbun-com/porkbun-com-account-api/)
- [Porkbun Aftermarket API](https://apis.io/apis/porkbun-com/porkbun-com-aftermarket-api/)
- [Porkbun Agent Naming (ANS) API](https://apis.io/apis/porkbun-com/porkbun-com-agent-naming-ans-api/)
- [Porkbun API Key Management API](https://apis.io/apis/porkbun-com/porkbun-com-api-key-management-api/)
- [Porkbun Closeouts API](https://apis.io/apis/porkbun-com/porkbun-com-closeouts-api/)
- [Porkbun DNS API](https://apis.io/apis/porkbun-com/porkbun-com-dns-api/)
- [Porkbun Domain API](https://apis.io/apis/porkbun-com/porkbun-com-domain-api/)
- [Porkbun Email API](https://apis.io/apis/porkbun-com/porkbun-com-email-api/)
- [Porkbun Hosting API](https://apis.io/apis/porkbun-com/porkbun-com-hosting-api/)
- [Porkbun Link in Bio API](https://apis.io/apis/porkbun-com/porkbun-com-link-in-bio-api/)
- [Porkbun Marketplace API](https://apis.io/apis/porkbun-com/porkbun-com-marketplace-api/)
- [Porkbun Mock API](https://apis.io/apis/porkbun-com/porkbun-com-mock-api/)

## Tags

Cloudflare

## Use this from code or an agent

- **REST, no key:** `GET https://apis.io/api/v1/providers/porkbun-com` returns the provider's full profile as JSON.
- **MCP:** `https://apis.io/mcp` (Streamable HTTP) — search the catalog, read any provider, compare providers, check agent readiness.
- **Free API key** for catalog-wide search, ratings and comparisons: sign in with GitHub, Google or LinkedIn at https://apis.io/developer/account/ (plans: https://apis.io/developer/plans/).

---

Profiled by [API Evangelist](https://apievangelist.com) and published on [APIs.io](https://apis.io/apis/porkbun-com/porkbun-com-cloudflare-api/). The API's provider profile, Kin Score and agent-readiness rating are at https://apis.io/providers/porkbun-com/.
