Feature Flags API
Upsert per-environment typed flags and promote them across environments.
Base path: /v1/workspaces/{workspace_id}/flags
Flags are Control Plane config — runtime SDKs are not required to manage or promote them.
See also: Customer Portal — Feature flags
List / get / upsert / delete
| Method | Path | Permission | Notes |
|---|---|---|---|
GET | /v1/workspaces/{workspace_id}/flags | read | Query: environment_id |
GET | …/flags/{key} | read | Query: environment_id |
PUT | …/flags/{key} | write | Body: value, value_type, optional description |
DELETE | …/flags/{key} | delete | Query: environment_id |
value_type: boolean | string | number | json. Keys are lowercase with hyphens (for example new-checkout).
curl -s -X PUT -H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"value":true,"value_type":"boolean"}' \
"$CP_URL/v1/workspaces/$WORKSPACE_ID/flags/new-checkout?environment_id=$ENV_ID"Compare and promote
GET /v1/workspaces/{workspace_id}/flags/compare?source_environment_id=&target_environment_id=
POST /v1/workspaces/{workspace_id}/flags/promotePromote body: source_environment_id, target_environment_id, optional keys[], mode (e.g. skip_existing), optional dry_run.
Permission: compare read, promote write
Related
- Environments API
- Secrets API — separate channel; values never appear in secret diffs