{_id: "system"} in system_settings. The settings API exposes scoped PUT endpoints (one per block), masks secrets on read, and invalidates the Redis settings cache on every write.
Code: routes/settings.py, services/cache_service.py, services/display_timezone.py, models/system_settings.py.
Endpoints
All under/api/v1/settings. Reads/writes of secrets require super_admin; the display read is open to any role.
| Method | Path | Role | Block updated |
|---|---|---|---|
GET | “ | super_admin | Full settings (secrets masked) |
GET | /display | any | display_timezone only |
PUT | /api-keys | super_admin | api_keys.* |
PUT | /minio | super_admin | minio.* |
PUT | /agent-assist | super_admin | agent_assist.* |
PUT | /knowledge | super_admin | knowledge.* |
PUT | /voxdialler | super_admin | voxdialler.amd.* |
PUT | /timezone | super_admin | display_timezone |
PUT | /fleet | super_admin | voxcore_fleet |
_get_or_create_settings).
Settings blocks
| Block | Key fields (defaults) |
|---|---|
api_keys | soniox, deepgram, openai, google, google_vertex, elevenlabs, sarvam |
minio | endpoint (localhost:9000), access_key, secret_key, bucket (recordings), secure (false) |
agent_assist | enabled, stt_provider, llm_provider/model (gpt-4.1-mini), system_prompt, suggestion_cooldown_seconds, max_context_messages, listen_to, publish_transcript |
voxdialler.amd | answering-machine detection windows, action_on_machine (teardown), action_on_unknown (continue) |
knowledge | qdrant_url, qdrant_api_key, qdrant_collection (vox_knowledge_chunks), embedding_model (gemini-embedding-001), embedding_dimensions (768), chunk_size_chars (1200), chunk_overlap_chars (180), max_upload_mb (20), tenant_id |
voxcore_fleet | list of VoxCore base URLs (see fleet routing) |
display_timezone | IANA zone string, default UTC |
Secret masking
GET /settings masks every secret-bearing field via _mask: short values become bullets, longer ones become first4••••••last4 (e.g. PeLo••••••cret). Masking covers all api_keys, minio.secret_key, and knowledge.qdrant_api_key.
Cache invalidation
Bot configs and system settings are cached in Redis (services/cache_service.py):
| Key | TTL | Helpers |
|---|---|---|
bot:{bot_id} | 3600s | get/set/invalidate_bot_cache |
system:settings | 3600s | get/set/invalidate_settings_cache |
PUT calls invalidate_settings_cache(redis) after the Mongo write, so the next read repopulates from the database.
After editing settings or bot config directly in MongoDB (bypassing the API), you must clear the corresponding Redis key manually — direct DB writes do not trigger
invalidate_*_cache.Display timezone
services/display_timezone.py validates the configured zone with zoneinfo and falls back to UTC if invalid (normalise_display_timezone). It also provides start_of_display_day_utc (local midnight → UTC, used for day-bucketed metrics like Agent Desk) and parse_utc_datetime_filter for query date filters.
Related docs
Fleet routing
The
voxcore_fleet list configured here.KB pipeline
Consumes the
knowledge block (Qdrant, embeddings, chunking).Agent Assist
Uses the
agent_assist block.Agent Desk
Uses display-timezone day boundaries for metrics.