Skip to content

HTTP Server API Reference

The MicroResolve server exposes a REST API on port 3001. All endpoints accept and return JSON.

Namespace selection: pass the X-Namespace-ID header on every request. Omitting it routes to the default namespace.

Auth: when API key auth is enabled, pass the key in the X-Api-Key header. See Auth.

Core

MethodEndpointDescription
GET/api/healthHealth check
GET/api/versionServer version
GET/api/llm/statusLLM configuration status

Classification

Resolve a query

POST /api/route_multi
X-Namespace-ID: support
Content-Type: application/json
{ "query": "cancel my order" }

Response:

{
"intents": [
{ "id": "cancel_order", "score": 0.91 }
],
"query": "cancel my order",
"latency_us": 31
}

Intents

MethodEndpointDescription
GET/api/intentsList all intents
POST/api/intentsCreate intent
PATCH/api/intents/{id}Update intent metadata
DELETE/api/intents/{id}Delete intent
POST/api/intents/{id}/phrasesAdd phrase to intent
DELETE/api/intents/{id}/phrasesRemove phrase from intent

Create intent

POST /api/intents
X-Namespace-ID: support
{
"id": "cancel_order",
"description": "User wants to cancel an existing order",
"phrases": ["cancel my order", "I want to cancel"]
}

Add phrase

POST /api/intents/cancel_order/phrases
X-Namespace-ID: support
{ "phrase": "abort my order", "lang": "en" }

Namespaces

MethodEndpointDescription
GET/api/namespacesList all namespaces
POST/api/namespacesCreate namespace
PATCH/api/namespacesUpdate namespace settings
DELETE/api/namespacesDelete namespace
GET/api/namespaces/{id}/historyGit commit log for this namespace
POST/api/namespaces/{id}/rollbackRoll back to a commit
GET/api/namespaces/{id}/diffSemantic diff (intents added / removed / changed)

Rollback

POST /api/namespaces/support/rollback
{ "sha": "abc1234..." }

Review / Auto-learn

MethodEndpointDescription
GET/api/review/queueGet the low-confidence review queue
GET/api/review/statsQueue depth and approval rate
POST/api/review/fixReassign a queued item to the correct intent
POST/api/review/rejectDiscard a queued item
POST/api/review/analyzeLLM-assisted batch analysis of the queue
POST/api/review/intent_phrasesSuggest phrases for an intent via LLM
POST/api/learn/nowTrigger a synchronous auto-learn pass
POST/api/learn/wordsExtract and index vocabulary terms
POST/api/reportReport a misclassification from the client

Sync (connected mode)

MethodEndpointDescription
GET/api/syncPull latest namespace state
POST/api/ingestPush local events to server
POST/api/correctSubmit a correction

Logs

MethodEndpointDescription
GET/api/logsRecent classification log entries
GET/api/logs/statsAggregate stats (match rate, latency)

Import / Export

MethodEndpointDescription
GET/api/exportExport current namespace as JSON
POST/api/importImport namespace from JSON
POST/api/import/parseParse an import payload without applying
POST/api/import/applyApply a parsed import
GET/api/import/paramsImport configuration
GET/api/import/mcp/searchSearch MCP tool registry
GET/api/import/mcp/fetchFetch MCP tool spec
POST/api/import/mcp/parseParse MCP spec into intents
POST/api/import/mcp/applyApply parsed MCP intents

Settings

MethodEndpointDescription
GET/api/settingsGet server settings
PATCH/api/settingsUpdate server settings
GET/api/languagesList supported languages
DELETE/api/data/allDelete all data (irreversible)

Git / Remote sync

MethodEndpointDescription
GET/api/settings/gitGet git remote config
PUT/api/settings/gitSet or clear git remote
POST/api/git/pushManual push to remote

See Git Data Layer for details.

Auth

MethodEndpointDescription
GET/api/auth/keysList API keys
POST/api/auth/keysCreate API key
DELETE/api/auth/keys/{name}Delete API key

See Auth for details.

Events (SSE)

GET /api/events

Server-sent event stream. Emits events on intent changes, learn completions, and review queue updates. Connect from the browser or any SSE client.

Layers (advanced)

MethodEndpointDescription
GET/api/layers/infoLayer summary for current namespace
GET/api/layers/l1/edgesList L1 (morphology) graph edges
POST/api/layers/l1/edgesAdd an L1 edge
DELETE/api/layers/l1/edgesDelete an L1 edge
POST/api/layers/l1/distillTrigger LLM distillation of L1 edges
POST/api/layers/l2/probeProbe L2 scoring layer with a query