Platform
Environments
Each project has independent environments with separate flag configurations and API keys.
Overview
Environments let you manage flag configurations independently across development, staging, and production (or any custom environments). Each environment has:
- Its own API key
- Independent flag enabled/disabled state
- Independent targeting rules
Default environments
Every new project comes with three environments:
| Environment | API Key Prefix | Typical Use |
|---|---|---|
| Development | sf_dev_ | Local development and testing |
| Staging | sf_stg_ | Pre-production validation |
| Production | sf_prod_ | Live user traffic |
Independent configuration
Flag configuration is fully independent per environment. This means:
- A flag can be enabled in development but disabled in production
- Targeting rules can differ — you might have a 100% rollout in staging but 10% in production
- The default value is shared (it's on the flag itself), but the environment controls whether the flag is active
API key scope
Each environment's API key only returns flag data for that environment. A sf_dev_ key cannot access production flag states. This prevents accidentally reading the wrong environment's configuration.
Workflow
A typical release workflow:
- Enable and test the flag in development
- Promote to staging — enable the flag and run integration tests
- Roll out to production — enable with a percentage rollout, then ramp up