Environments and keys
A project has three environments: development, preview and production. Each has its own revision, its own flag state, and its own public SDK key.
Environment keys (ek_…)
Each environment’s key is in Project settings. Pass it as projectKey together with the matching environment. Sync and telemetry requests with a different environment are rejected.
Project keys (pk_…)
Older project-wide keys remain accepted for compatibility. They are not restricted to one environment.
What a key can do
The key ships inside your app, so it is designed to be public. With it the SDK can:
- read the compiled snapshot for its environment (
POST /v1/sync), - send heartbeats, exposure and adoption events (
POST /v1/events).
It cannot create, edit or delete flags, change rollouts, or access anything else in the project. Those routes live under /projects behind dashboard authentication, which never ships in an app.
Revisions
Every configuration change that affects what a phone would evaluate bumps the environment’s revision in the same transaction. The SDK sends the revision it holds; the API answers “unchanged” or the full snapshot. A rename does not bump.