Cloudflare Domains
Already own domains and manage their DNS in Cloudflare? Connect them to Infrabox directly, without transferring the registrar or changing nameservers — Infrabox authenticates to your Cloudflare account and manages records within the existing zone(s).
| Method | Path | Description |
|---|---|---|
POST | /v1/api/cloudflare-domains/connect | Validate credentials and connect zone(s) |
GET | /v1/api/cloudflare-domains/list | List connected Cloudflare domains |
GET | /v1/api/cloudflare-domains/details | Get details for one connected domain |
POST | /v1/api/cloudflare-domains/disconnect | Disconnect domain(s) |
GET | /v1/api/cloudflare-domains/zones | List zones visible to a set of credentials |
Connect
curl -X POST https://api.infrabox.software/v1/api/cloudflare-domains/connect \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "X-Workspace-Id: YOUR_WORKSPACE_UID" \
-H "Content-Type: application/json" \
-d '{
"auth_type": "api_token",
"api_token": "your-cloudflare-api-token",
"domains": ["yourdomain.com", "another-domain.com"]
}'auth_typeis"api_token"(recommended — scope it to Zone:Read + Zone:DNS:Edit for just the zones you’re connecting) or"global_api_key"(paired withemail).- Omit
domainsand passconnect_all: trueto connect every zone the credentials can see (up to 500 per call). - The response reports
connected_count/reconnected_count/failed_count/skipped_count, plus a per-zoneresultsarray — a single call can partially succeed.
This endpoint is rate-limited to 10 calls per 5 minutes per team — it validates real Cloudflare credentials and resolves zones on every call, which is expensive to hammer.
Errors
| Status | Meaning |
|---|---|
400 | Invalid body, or credentials rejected by Cloudflare |
401 | Missing/invalid Infrabox API key |
404 | Domain/workspace not found |
429 | Rate limit exceeded on /connect |
500 | Internal error |
Last updated on