Skip to main content

Feature flags

A small key/value flag store with an optional per-tenant override layer. Platform admins manage flags; any signed-in user can read the resolved set for their own organization.

Resolution rule: a per-tenant row (one whose organization_id matches the caller's org) wins over the global default (organization_id: null) for the same flag_key.

::: tip Auth

  • GET /v1/admin/feature-flags — platform Viewer or higher.
  • PUT /v1/admin/feature-flags — platform Admin or higher.
  • GET /v1/feature-flags — any authenticated user (cookie or Bearer). :::

GET /v1/admin/feature-flags

List global flags and, optionally, one tenant's override rows.

Request

GET /v1/admin/feature-flags?organization_id=<uuid>

Query paramTypeNotes
organization_idUUIDOptional. When set, the response also includes this tenant's override rows alongside the globals.

Response

200 OK

[
{ "flag_key": "passkeys", "organization_id": null, "enabled": true, "value": null },
{ "flag_key": "beta_dashboard", "organization_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479", "enabled": true, "value": { "variant": "v2" } }
]
FieldTypeMeaning
flag_keystringThe flag identifier.
organization_idUUID|nullnull = global default; a UUID = per-tenant override.
enabledboolWhether the flag is on.
valueobject|nullOptional structured payload for non-boolean flags.

PUT /v1/admin/feature-flags

Upsert a global or per-tenant flag.

Request

PUT /v1/admin/feature-flags

{
"flag_key": "beta_dashboard",
"organization_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"enabled": true,
"value": { "variant": "v2" }
}
FieldTypeRequiredNotes
flag_keystringyesThe flag to set.
organization_idUUIDnoOmit for the global default; set for a per-tenant override.
enabledboolyesOn/off.
valueobjectnoOptional structured payload.

Response

200 OK

Returns the upserted flag in the same shape as one GET list element.


GET /v1/feature-flags

The resolved flag set for the authenticated caller's organization. Any signed-in user. Per-tenant overrides are already applied — the caller never sees another tenant's rows.

Request

GET /v1/feature-flags

Response

200 OK

A map of flag_key → resolved value:

{
"passkeys": { "enabled": true, "value": null },
"beta_dashboard": { "enabled": true, "value": { "variant": "v2" } }
}
FieldTypeMeaning
<flag_key>.enabledboolResolved on/off for this org.
<flag_key>.valueobject|nullResolved payload, if any.

Error responses

StatusCodeWhen
401authentication_requiredNo valid auth credential.
403forbiddenCaller lacks the required platform role (admin endpoints only).
403csrf_failedCookie-authed PUT without a valid X-IdentSphere-CSRF header.
400invalid_inputMalformed body.