Admin API

Feature Flags

const TOKEN = "hv_..."; // your API key
const headers = { Authorization: `Bearer ${TOKEN}` };

List feature flags

GET /admin/feature-flags

Returns all feature flags and their current status. Flags are backed by the happyview_instance_settings table — a flag is enabled when its key is set to "true".

interface FeatureFlag {
  key: string;
  name: string;
  description: string;
  enabled: boolean;
}

const response = await fetch("http://127.0.0.1:3000/admin/feature-flags", {
  headers,
});
const data: FeatureFlag[] = await response.json();

Response: 200 OK

[
  {
    "key": "feature.spaces_enabled",
    "name": "Permissioned Spaces",
    "description": "Collaborative data spaces with granular permissions, membership, and invites.",
    "enabled": false
  }
]
FieldTypeDescription
keystringSettings key for the flag
namestringHuman-readable name
descriptionstringWhat the flag controls
enabledbooleanWhether the flag is currently enabled

To toggle a flag, use PUT /admin/settings/{key} with the value "true" or "false". See Instance Settings for details.

On this page