Skip to Content
📘 Infrabox developer docs — API reference for mailbox & domain infrastructure.
API ReferenceCloudflare Domains

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).

MethodPathDescription
POST/v1/api/cloudflare-domains/connectValidate credentials and connect zone(s)
GET/v1/api/cloudflare-domains/listList connected Cloudflare domains
GET/v1/api/cloudflare-domains/detailsGet details for one connected domain
POST/v1/api/cloudflare-domains/disconnectDisconnect domain(s)
GET/v1/api/cloudflare-domains/zonesList 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_type is "api_token" (recommended — scope it to Zone:Read + Zone:DNS:Edit for just the zones you’re connecting) or "global_api_key" (paired with email).
  • Omit domains and pass connect_all: true to 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-zone results array — 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

StatusMeaning
400Invalid body, or credentials rejected by Cloudflare
401Missing/invalid Infrabox API key
404Domain/workspace not found
429Rate limit exceeded on /connect
500Internal error
Last updated on