Skip to main content
Feature flags are an instance-global toggle surface: an ADMIN defines a flag with a default enabled state and percentage rollout, then individual workspaces may attach an override row that flips the flag for that workspace only. All endpoints require authentication and workspace context. Reads are open to any workspace role; mutations (flag definition CRUD and per-workspace override CRUD) require OWNER or ADMIN.

List Feature Flags

Returns every flag definition, ordered by key ascending. When the request carries workspace context, each flag includes the current workspace’s override state (override_enabled), or null/omitted when no override row exists for that flag. Auth: Any authenticated workspace member (read) Response: 200 OK

Response Fields


Create Feature Flag

Inserts a new instance-global flag definition. Auth: OWNER or ADMIN role Request Body:
Response: 201 Created — the created flag object (same shape as a List item, without override_enabled). WebSocket event: feature_flag.created

Update Feature Flag

Partial update — only provided fields are changed. Auth: OWNER or ADMIN role Request Body: All fields optional. Response: 200 OK — the updated flag object, including override_enabled for the current workspace (same shape as a List item). WebSocket event: feature_flag.updated

Delete Feature Flag

Removes the flag definition. The ON DELETE CASCADE on the override table means all per-workspace override rows are removed too. Auth: OWNER or ADMIN role Response: 204 No Content WebSocket event: feature_flag.deleted

Set Workspace Override

Creates or replaces the current workspace’s override row for the named flag. Idempotent — a repeated PUT with the same body updates the same row in place (keyed on UNIQUE(flag_id, workspace_id)). Auth: OWNER or ADMIN role Request Body:
Response: 200 OK
WebSocket event: feature_flag.override_set

Clear Workspace Override

Removes the current workspace’s override row, reverting the flag’s effective value to the instance-global default. Idempotent — returns 204 whether or not an override row existed (after this call, the override does not exist). Auth: OWNER or ADMIN role Response: 204 No Content WebSocket event: feature_flag.override_cleared (only when a row was actually removed)