API Reference

The HTTP API is served by zoidmatter-api. Set ZOIDMATTER_API_KEY to require Authorization: Bearer <key> on every route except /health. The server refuses to start without a key unless ZOIDMATTER_ALLOW_INSECURE=1 is set (local/trusted-network only).

Authentication & Roles

API keys are SHA-256 hashed and resolve to an ApiIdentity with a role and allowed banks:

Core Endpoints

MethodPathDescription
POST/v1/retainRetain content as a memory unit
POST/v1/recallRecall memories by semantic query; supports cross-bank with banks[]
POST/v1/reflectReflect on memories (synthesis)
GET/v1/graphQuery the memory graph
GET/v1/statsMemory statistics
GET/healthLiveness probe (no auth)
GET/v1/memoryList memories with pagination
POST/v1/documentsGeneric document ingestion (chunk + embed + register)
GET/v1/session-logsList session log references
POST/v1/session-logsStore a session log reference
GET/v1/bank/:idGet bank config
POST/v1/bank/importImport a bank template
GET/v1/banksList banks
POST/v1/backup/runRun a backup
GET/v1/backup/listList backups
POST/v1/backup/restoreRestore a backup
POST/v1/backup/checkVerify a backup

MCP

The MCP server exposes 25+ tools over HTTP at /mcp (port 8888). See the MCP Server page. An openapi.json export is planned to drive this reference and the client SDKs.