Platform Config
Platform configuration is stored in an encrypted key-value store in the database. These endpoints allow superadmins to manage API keys, feature flags, and service settings through the admin UI. Database values take precedence over environment variables.All API requests require a valid JWT token in the
Authorization: Bearer <token> header. The API Gateway decodes the JWT and forwards auth context (user-id, organization-id, user-email, x-platform-role, x-org-role) as headers to downstream services.Get All Config
Retrieve all platform configuration values, grouped by category.Response (200)
Returns configuration entries organized by category. Sensitive values (API keys) are returned in encrypted form.object
Configuration entries keyed by category.
Set Config Value
Create or update a platform configuration value. Values are encrypted at rest using AES-256-GCM.Request Body
string
required
Configuration key (e.g.,
OPENROUTER_API_KEY).string
required
Configuration value. Will be encrypted before storage.
string
required
Category:
ai, voice, knowledge, or feature_flags.Response (200)
Config Health Check
Check the health of platform configuration, including which required keys are set and which are missing.Response (200)
string
healthy, degraded, or unconfigured.string[]
List of configured keys.
string[]
List of required but missing keys.
Setup Status
Check the first-time platform setup status, including whether essential services are configured.Response (200)
boolean
Whether initial setup is complete.
object
Setup step completion status.
Configuration Precedence
Platform config follows this precedence order:- Database (
platform_configtable) — highest priority - Environment variables (
.envfiles) — fallback
getConfigValue(key) which checks the database first and falls back to process.env. This means you can override any environment variable through the admin UI without restarting services.
Encryption
All config values are encrypted at rest using AES-256-GCM with theJWT_SECRET as the encryption key. The @brainstormer/shared crypto module handles encryption and decryption transparently.
