Skip to content

Cloudflare Setup

Fp Switchboard supports two types of Cloudflare integration:

  1. Cloudflare (Personal/Business) - Manage your own account’s DNS, Workers, KV, R2
  2. Cloudflare MSP (Tenant API) - For partners managing customer accounts

Create a Cloudflare API token for managing YOUR OWN account - DNS, Workers, KV, R2, and more.

  1. Understand Permission Levels

    Cloudflare has three permission levels:

    LevelWhat It Controls
    User LevelGlobal settings, billing, API tokens
    Zone LevelPer-website/domain: DNS, SSL, caching, firewall
    Account LevelShared resources: Workers, KV, R2, D1, Pages
  2. Go to API Tokens

    Click your profile icon > My Profile > API Tokens.

  3. Create Custom Token

    Click “Create Token” then “Create Custom Token” (not a template). Name it “Fp Switchboard - My Account”.

  4. Add Zone Permissions

    For DNS and zone management:

    Zone : Zone : Read
    Zone : Zone Settings : Read
    Zone : DNS : Edit
    Zone : SSL and Certificates : Read
  5. Add Account Permissions

    For Workers, KV, R2, D1:

    Account : Workers Scripts : Edit
    Account : Workers KV Storage : Edit
    Account : Workers R2 Storage : Edit
    Account : D1 : Edit
    Account : Cloudflare Pages : Edit
  6. Set Resource Scope

    • Zone Resources: Include → All zones (or specific zones)
    • Account Resources: Include → Your account
  7. Create and Copy Token

    Create the token and copy it immediately - it will only be shown once.

Cloudflare uses per-user API keys. Users enter their token when connecting in the dashboard - no platform-level environment variables needed.

  • 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/