POST /auth/login).
Authentication
Admin endpoints require a Supabase JWT in theAuthorization header:
200 OK:
204 No Content.
Environments
Create an environment
201 Created:
- A new
environmentsrow is inserted with a SHA-256 hash of the SDK key (plaintext is never persisted). - A
sdkKeyPrefixis extracted for dashboard display. - All existing active flags are auto-initialized for this environment with
isEnabled: false. - An
ENVIRONMENT_CREATEDaudit log entry is written in the same transaction.
List environments
200 OK:
Get an environment
Update an environment
Rename an environment (PATCH with{ "name": "new-name" }):
Revoke an environment
Revokes an environment, making its SDK key inactive. Revoked environments cannot be evaluated by SDKs.200 OK — returns the revoked environment object with status: "revoked".
Rotate an SDK key
Rotates the SDK key for an environment. This revokes the old environment (status set torevoked) and creates a new active environment with the same product and name, migrating all flag configurations, targeting rules, and rollout configurations to the new environment. The new plaintext SDK key is returned only once.
201 Created:
Feature flags
Create a flag
Response
201 Created:
Boolean flags are fully supported by the evaluation engine. String and multivariate types can be created, but the current evaluation engine only resolves boolean results —
isEnabled() always returns true or false.List flags
Get a flag
Update a flag
Archive a flag
409 Conflict if so.
Flag environment configuration
Get configuration
200 OK:
Create or replace configuration
Behind the scenes: Updates
feature_flag_environments, writes a FLAG_ENVIRONMENT_UPDATED audit entry, and invalidates the Redis cache for this flag + environment.
Targeting rules
Create a rule
Each condition uses a discriminated union — exactly one value field, determined by
valueType:
List rules
priority ASC.
Replace a rule
Delete a rule
Rollouts
Get rollout configuration
Create or update rollout
Returns
201 Created on insert, 200 OK on update.
Delete rollout
Audit logs
Response
200 OK:

