Cloudflare Setup
Fp Switchboard supports two types of Cloudflare integration:
- Cloudflare (Personal/Business) - Manage your own account’s DNS, Workers, KV, R2
- Cloudflare MSP (Tenant API) - For partners managing customer accounts
Personal/Business Account Setup
Section titled “Personal/Business Account Setup”Create a Cloudflare API token for managing YOUR OWN account - DNS, Workers, KV, R2, and more.
-
Understand Permission Levels
Cloudflare has three permission levels:
Level What It Controls User Level Global settings, billing, API tokens Zone Level Per-website/domain: DNS, SSL, caching, firewall Account Level Shared resources: Workers, KV, R2, D1, Pages -
Go to API Tokens
Click your profile icon > My Profile > API Tokens.
-
Create Custom Token
Click “Create Token” then “Create Custom Token” (not a template). Name it “Fp Switchboard - My Account”.
-
Add Zone Permissions
For DNS and zone management:
Zone : Zone : ReadZone : Zone Settings : ReadZone : DNS : EditZone : SSL and Certificates : Read -
Add Account Permissions
For Workers, KV, R2, D1:
Account : Workers Scripts : EditAccount : Workers KV Storage : EditAccount : Workers R2 Storage : EditAccount : D1 : EditAccount : Cloudflare Pages : Edit -
Set Resource Scope
- Zone Resources: Include → All zones (or specific zones)
- Account Resources: Include → Your account
-
Create and Copy Token
Create the token and copy it immediately - it will only be shown once.
MSP Tenant API Setup
Section titled “MSP Tenant API Setup”For Cloudflare MSP/Channel Partners: Manage customer accounts, zones, and subscriptions via the Tenant API.
Terminology
Section titled “Terminology”| Term | Meaning |
|---|---|
| Tenant | Your MSP company (the parent container) |
| Account | Individual customer accounts you manage |
| User | People with login credentials |
| Zone | Websites/domains within an account |
Important: Token Location
Section titled “Important: Token Location”-
Go to User API Tokens
Click your profile icon (top right) → My Profile → API Tokens.
-
Create Custom Token
Click “Create Token” then “Create Custom Token”. Name it “Fp Switchboard - MSP Tenant”.
-
Add Tenant Permissions
Account : Tenant : EditAccount : Account Settings : ReadAccount : Member Roles : Edit (optional) -
Set Account Scope
- Account Resources: Include → Specific account → [Your Tenant Account]
-
Create and Copy Token
Create the token and copy it immediately.
Environment Variables
Section titled “Environment Variables”Cloudflare uses per-user API keys. Users enter their token when connecting in the dashboard - no platform-level environment variables needed.
Important Notes
Section titled “Important Notes”- Use separate tokens for different purposes (principle of least privilege)
- MSP Tenant tokens should be kept separate from regular Cloudflare tokens
- Customer accounts created via Tenant API are billed to your partner account
- Documentation: https://developers.cloudflare.com/tenant/