Admin API

Instance Settings

Instance settings override environment variables at runtime — things like app name, ToS URL, privacy policy URL, and logo. Settings stored here take precedence over their env var equivalents. All endpoints require the settings:manage permission.

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

List settings

GET /admin/settings
const response = await fetch("http://127.0.0.1:3000/admin/settings", {
  headers,
});
const data = await response.json();

Returns all key/value pairs stored in the instance_settings table.

Upsert a setting

PUT /admin/settings/{key}
const response = await fetch("http://127.0.0.1:3000/admin/settings/app_name", {
  method: "PUT",
  headers: {
    ...headers,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ value: "My HappyView" }),
});

Delete a setting

DELETE /admin/settings/{key}

Removes the override; the corresponding environment variable (if any) takes effect again.

PUT /admin/settings/logo
DELETE /admin/settings/logo

PUT accepts a binary image body and stores it as the instance logo (served via the public dashboard). DELETE removes the stored logo.