Key Types
| User Key | System Key | |
|---|---|---|
| Prefix | kfl_user_* | kfl_sys_* |
| Access | Full admin | Scoped to project:environment |
| Use for | Developers, admins | CI/CD, deployment scripts |
User Email Tracking
When a key is created via the CLI, the Cloudflare account email of the creator is automatically recorded (viawrangler whoami). This is shown in the EMAIL column of kfl keys list. Keys created without a detectable email show -.
User Keys (kfl_user_*)
- Full admin access to everything
- Can manage all projects, environments, secrets, and other API keys
- No scoping required — access to all resources
- Use for: developers, admins, backup keys
System Keys (kfl_sys_*)
- Scoped access to specific project:environment pairs
- Can only read or write secrets within their scope
- Cannot create projects, environments, or other keys
- Use for: CI/CD pipelines, deployment scripts, runtime services
Permission Levels
| Read Secrets | Write Secrets | Manage Projects | Manage Keys | |
|---|---|---|---|---|
| User key | ✅ | ✅ | ✅ | ✅ |
System key — read | ✅ (scoped) | ❌ | ❌ | ❌ |
System key — readwrite | ✅ (scoped) | ✅ (scoped) | ❌ | ❌ |
Create API Keys
User Key
System Key
System keys require--scope and --permission flags:
The
* wildcard must be quoted to prevent shell expansion:Scope Format
Scopes follow the formatproject:environment:
| Scope | Meaning |
|---|---|
my-api:production | Access to production environment only |
my-api:staging | Access to staging environment only |
my-api:* | Access to ALL environments in my-api |
List Keys
Update System Keys
Update scopes and permissions for an existing system key:kfl keys put replaces all existing scopes with the new set. Copy current scopes from kfl keys list and modify as needed.Revoke Keys
Next Steps
Using Secrets
Inject secrets into CI/CD pipelines and runtime processes.
Security & Backup
Back up your master key and define your recovery strategy.
