Repository navigation
REST API
English · Español
All of the interface's functionality is available through a JSON REST API under /api. With the application running, the interactive documentation (OpenAPI) is at https://your-server/docs, with all parameters and schemas. This page is the map.
-
Agents and scripts: header
Authorization: Bearer mst_…with an API token. A token is scoped to one brain and a role (maximum curator); it cannot use the instance administration routes. Its scope can limit it further (recall,documents,propose): a route outside it answers403. An expired token answers401with the date. - The web interface: a signed session cookie after signing in.
-
MCP:
POST /api/brains/{slug}/mcpis the brain's MCP server (Streamable HTTP, stateless). It accepts only API tokens, never the session cookie, and refuses browser origins other than the instance's.
Common errors: 401 (not authenticated or invalid token), 403 (insufficient role), 404 (does not exist or you have no access), 409 (conflict, e.g. duplicate), 422 (invalid data, or a proposal blocked for carrying a secret), 429 (too many attempts), 503 (from /health: the database or the graph is down).
All hang off /api/brains/{slug}/…. The role is the minimum their dependencies require; a few routes check more, see the notes below.
| Area | Routes | Role |
|---|---|---|
| Recall |
POST /recall · GET /whoami · POST /news · POST /mcp · POST/DELETE /recall/{rid}/ratings · POST /answer
|
reader |
GET /recall/quality |
curator | |
PUT /recall/settings |
administrator | |
| Text index | GET /index/status |
reader |
POST /index/sync |
curator | |
| Overview |
GET /overview · GET /overview/activity
|
reader |
| Episodes |
GET /episodes/sources · GET /episodes · GET /episodes/{uuid}
|
reader |
| Facts |
GET /facts/relations · GET /facts · GET /timeline · GET /entities/{uuid} · GET /entities · GET /entities/{uuid}/state
|
reader |
PATCH/DELETE /facts/{uuid} · POST /facts/{uuid}/invalidate · POST /facts/{uuid}/reactivate · PUT /entities/{uuid}/type · PUT/DELETE /facts/{uuid}/probe
|
curator | |
| Graph and query |
GET /graph · POST /query
|
reader |
| Proposals |
POST /proposals/corrections · GET/POST /proposals · GET /proposals/counts · GET /proposals/{pid}
|
contributor |
POST /proposals/{pid}/reactivate · GET /correction-groups · POST /correction-groups/decide · POST /proposals/{pid}/approve · POST /proposals/{pid}/mask-and-approve · POST /proposals/{pid}/ingest · POST /proposals/{pid}/reject · POST /proposals/bulk · GET /proposals/{pid}/related · POST /proposals/{pid}/undo
|
curator | |
| Documents |
GET /docs/sources · GET /docs/ocr · GET /docs · GET /docs/search · GET /docs/{doc_id} · GET /docs/{doc_id}/text · GET /docs/{doc_id}/file · GET /docs/{doc_id}/context · GET /docs/{doc_id}/entities · GET /docs/mentions
|
reader |
DELETE /docs/{doc_id} · POST /docs/{doc_id}/reindex · POST /docs/{doc_id}/transcript · POST /docs/uploads · PUT /docs/uploads/{uid}/parts/{n} · DELETE /docs/uploads/{uid} · POST /docs/uploads/{uid}/complete · POST /docs/{doc_id}/promote
|
contributor | |
POST /docs/duplicates · GET /docs/roots · POST /docs/sources · PATCH/DELETE /docs/sources/{sid} · POST /docs/sources/{sid}/scan · GET /docs/wiki/adapters · POST /docs/wiki/collections · GET /docs/sources/{sid}/wiki/collections · POST /docs/sources/wiki · POST /docs/sources/git
|
administrator | |
| Vocabulary |
GET /vocabulary · GET /vocab/aliases · GET /vocab/types · GET /vocab/types/{name}/preview · POST /vocab/duplicates/preview · GET /ontology
|
reader |
POST /vocab/ops/{oid}/revert · GET /summaries · POST /summaries/entity/{uuid} · POST /summaries/{sid}/approve · POST /summaries/approve · POST /summaries/reject
|
curator | |
POST /vocab/aliases · DELETE /vocab/aliases/{aid} · POST /vocab/types · PUT/DELETE /vocab/types/{name} · POST /vocab/types/{name}/move · POST /vocab/relations · PUT/DELETE /vocab/relations/{name} · PUT /vocab/map · PUT /vocab/instructions · POST /vocab/duplicates/merge · POST/DELETE /vocab/duplicates/ignore · GET /retype · POST /retype/scan · POST /retype/apply · POST /retype/reject · POST /retype/{sid}/apply-as · POST /retype/{sid}/revert · GET /retype/{sid}/neighbours · POST /retype/{sid}/fold · GET/POST /vocab/entity-aliases · POST /summaries/scan · PUT /ontology · POST /ontology/preset/{name}
|
administrator | |
| To review | GET /attention |
curator |
| Movement | GET /changes |
curator |
| Facts to review |
GET /review/stale · POST /review/stale/{uuid}/confirm
|
curator |
| Contradictions |
GET /conflicts · POST /conflicts/dismiss · DELETE /conflicts/dismiss/{did} · POST /conflicts/resolve
|
curator |
| Reference queries |
GET/POST /refqueries · PATCH/DELETE /refqueries/{qid} · GET /refqueries/export · POST /refqueries/import · GET/POST /refqueries/runs · GET /refqueries/runs/{rid}
|
curator |
| Memory health |
GET /health · POST /health/run · GET /similarity
|
curator |
POST /similarity/measure |
administrator | |
| Replay sample |
GET/PUT /replay/settings · GET/DELETE /replay/samples · GET/POST /replay/runs · GET /replay/runs/{rid} · POST /replay/samples/{sid}/promote
|
administrator |
| Curator |
PUT /curator/distil/{pid} · GET /curator/settings · POST /curator/preview · GET /curator/runs · POST /curator/run · POST /curator/runs/{rid}/confirm · POST /curator/runs/{rid}/discard
|
curator |
PUT /curator/settings |
administrator | |
| Topic reviews |
GET /topics · GET /topics/queue · GET /topics/{rid} · POST /topics/entity/{uuid} · POST /topics/{rid}/actions/{i}/approve · POST /topics/{rid}/actions/{i}/reject · POST /topics/{rid}/actions/decide
|
curator |
| Archived facts |
GET /archive · DELETE /archive/{uuid}
|
curator |
| Right to be forgotten |
POST /forget/report · POST /forget/run
|
owner |
| Verifiable facts |
GET /verifiers · GET /probes · POST /probes/run
|
curator |
PUT /verifiers/{vid} |
administrator | |
| Review by category |
GET /review/categories · POST /review/categories/{cat}/decide
|
curator |
PUT /review/categories/{cat}/auto |
administrator | |
| Federation | GET /grants |
reader |
POST /grants · PATCH/DELETE /grants/{gid}
|
administrator | |
| Jobs |
GET /jobs · GET /jobs/summary · GET /jobs/{jid}
|
reader |
POST /jobs/{jid}/cancel · POST /jobs/{jid}/retry
|
curator | |
| Members |
GET/PUT /members · DELETE /members/{user_id}
|
administrator |
| Tokens |
GET/POST /tokens · POST /tokens/{token_id}/rotate · DELETE /tokens/{token_id} · GET /tokens/{token_id}/activity · POST /tokens/{token_id}/test-recall
|
reader |
| The brain itself |
PATCH /api/brains/{slug} · GET /secrets/scan
|
administrator |
POST /delete |
owner | |
| AI consumption |
GET /ai-usage · PUT /ai-budget
|
administrator |
| Incoming webhooks |
GET/POST /webhooks · PUT/DELETE /webhooks/{hid} · POST /webhooks/{hid}/rotate · GET /webhooks/{hid}/events · POST /webhooks/preview
|
administrator |
POST /hooks/{key} |
the webhook's secret | |
| Retention |
GET/PUT /retention · POST /retention/run
|
owner |
| Export |
GET/POST /exports · GET /exports/{jid}/download
|
administrator |
Under /api/….
| Area | Routes | Access |
|---|---|---|
| Access |
GET /auth/options · POST /auth/setup · GET/POST /auth/login · POST /auth/mfa · GET /auth/token/{raw} · POST /auth/accept · POST /auth/forgot · GET /auth/login/{slug} · GET /auth/callback/{slug} · GET /auth/callback · POST /auth/logout · POST /auth/passkey/options · POST /auth/passkey/login · POST /auth/passkey/mfa/options · POST /auth/passkey/mfa
|
public |
| My account |
POST /me/password · GET /me · GET /me/identities · DELETE /me/identities/{iid} · GET /me/identities/link/{slug} · GET/PATCH /me/profile · POST /me/tour · POST/DELETE /me/avatar · GET /users/{uid}/avatar · GET /me/tokens · GET /me/activity · POST /me/sessions/revoke-others · GET /me/2fa · POST /me/2fa/begin · POST /me/2fa/enable · POST /me/2fa/disable · POST /me/2fa/recovery · GET /me/passkeys · POST /me/passkeys/begin · POST /me/passkeys/finish · POST /me/passkeys/{pid}/delete · PATCH /me/passkeys/{pid} · GET/PUT /me/digest · GET /me/digest/preview · GET /onboarding · POST /onboarding/dismiss
|
signed in |
| Search all brains | POST /search |
signed in |
| Notifications |
GET /notifications · GET /notifications/summary · POST /notifications/read
|
signed in |
GET /notifications/catalog · GET/POST /notifications/channels · PUT/DELETE /notifications/channels/{cid} · POST /notifications/channels/{cid}/test · GET /notifications/deliveries · POST /notifications/deliveries/{did}/retry
|
instance administrator | |
| Brains | GET /brains |
signed in |
POST /brains |
instance administrator | |
| AI consumption |
GET /ai-usage · PUT/DELETE /ai-usage/prices
|
instance administrator |
| Import a brain |
POST /brain-imports/uploads · PUT /brain-imports/uploads/{uid}/parts/{n} · DELETE /brain-imports/uploads/{uid} · POST /brain-imports/uploads/{uid}/complete · GET/POST /brain-imports
|
instance administrator |
| Setup wizard |
GET /setup · POST /setup/steps/{step} · POST /setup/reopen · POST /setup/close · GET /setup/ollama · POST /setup/ollama/pull · GET /setup/jobs/{jid}
|
instance administrator |
| Administration | GET /ai-status |
signed in |
GET /users · GET /audit · GET/POST /doc-roots · DELETE /doc-roots/{rid} · POST /llm-engines/models · GET/POST /llm-engines · PATCH/DELETE /llm-engines/{eid} · POST /llm-engines/{eid}/default · POST /llm-engines/{eid}/test · GET/POST /decision-engines · PATCH/DELETE /decision-engines/{eid} · POST /decision-engines/{eid}/default · POST /decision-engines/{eid}/test · GET/POST /embedding-engines · PATCH/DELETE /embedding-engines/{eid} · POST /embedding-engines/{eid}/default · POST /embedding-engines/{eid}/test · GET /settings · POST /settings/smtp/test · GET /settings/sealed · PUT /settings/secret/{key} · PUT/DELETE /settings/{key} · GET/POST /oidc-providers · PUT/DELETE /oidc-providers/{slug} · POST /oidc-providers/{slug}/test · GET/POST /admin/users · GET/PATCH/DELETE /admin/users/{uid} · POST /admin/users/{uid}/link · POST /admin/users/{uid}/logout · POST /admin/users/{uid}/unlock · POST /admin/users/{uid}/mfa/reset · PUT /admin/users/{uid}/memberships · GET /admin/metrics · POST/DELETE /admin/metrics/token · GET/PUT /admin/graph · POST /admin/graph/test · GET /admin/graph/inventory · POST /admin/graph/adopt · PATCH /admin/graph/brains/{slug}
|
instance administrator | |
| Embedding model change |
GET /embedding-engines/reindex · GET /embedding-engines/{eid}/reindex/estimate · POST /embedding-engines/{eid}/reindex · POST /embedding-engines/reindex/{jid}/cancel · POST /embedding-engines/reindex/{jid}/retry · POST /embedding-engines/reindex/discard · POST /embedding-engines/reindex/switch
|
instance administrator |
| Public |
GET /config · GET /health
|
public |
-
Routes that check more than their role:
POST /tokens/{id}/rotateis only for the token's owner, and/tokensandPOST /api/searchonly work from a session, never with an API token (403); a token's role never exceeds yours. A contributor only sees their own proposals. Connecting a wiki and changing its collections or key need the instance administrator.PATCH /api/brains/{slug}can only change the graph for the instance administrator. -
POST /recallreturns arecall_id;POST /recall/{recall_id}/ratingsrates what came back:kind(fact,chunkordoc),id,rating(useful,irrelevantorincorrect) and an optionalnote; rating a factincorrectagain while its correction is pending returns that correction (existing: true) instead of opening another.DELETE /recall/{recall_id}/ratings?kind=…&id=…takes back your own rating of an item while the recall can be rated (removed, and theproposal_idit had proposed, which stays in the queue).GET /recall/quality?days=30sums the ratings, andPUT /recall/settings(keep_query_text) decides whether the text of the queries is kept. -
PUT /entities/{uuid}/typetakes{"type": …}, a type of the brain's ontology; it is undone from the vocabulary history.GET /entities?q=finds entities by name. -
POST /queryruns read-only Cypher. -
Uploads:
POST /docs/uploads, then each part withPUT /docs/uploads/{uid}/parts/{n}andPOST …/complete. The wiki sources are under/docs/sourcesand/docs/wiki. -
The collections of a wiki source (instance administrator):
GET /docs/sources/{id}/wiki/collectionsreturns those available, theselectedones and the indexeddocumentsper collection.PATCH /docs/sources/{id}withcollection_idschanges them: adding starts a scan and returns itsjob; removing answers409with the number of documents untilconfirm_removedrepeats it, and then takes only those out of the index. Only pages whose collection is known are removed; the pages in the wiki are never touched. See Knowledge. -
GET /attentionsays what waits for a decision:proposals,corrections,failed(approved proposals whose ingestion failed),duplicates,conflicts,stale,refqueries, andretypefor administrators;nullwhen a counter could not be computed. It is cached for a minute and dropped by any successful write on the brain;?fresh=truerecalculates. -
GET /changes?days=7(1–31):facts_new,facts_gone,docs_new,proposals_newandproposals_decidedover the period;nullwhen the graph could not be counted. -
GET /review/stalelists the current facts past their relation's shelf life, oldest first;…/confirmconfirms one. -
/tokens:scopes(recall,documents,propose) anddaysuntil it expires (empty for never).POST /tokens/{id}/rotatetakesgrace_hours(0–168, default 24). -
PATCH /api/brains/{slug}changes the name, description, slug and secrets policy.POST /api/brains/{slug}/deletedeletes the brain. -
AI consumption:
GET /ai-usage?days=30andPUT /ai-budget(limit,unit:tokensorcost,pause) for a brain; for the instance,GET /api/ai-usage?days=30(per brain and engine, with requests per minute now) andPUT/DELETE /api/ai-usage/prices(price per million tokens of a model). See AI consumption. -
Incoming webhooks:
POST /hooks/{key}has no session: the webhook's secret is the credential, as an HMAC signature or a token header, and it answers202with what happened to each event.POST /webhooks/{id}/rotategives a new secret, shown once;POST /webhooks/previewtakestemplate,config,bodyandevent. See Incoming webhooks. -
/retention:rejected_daysandjobs_days, in days (empty for the instance's, 0 for forever);POST /retention/runpurges now. -
POST /exportstakesvectorsand an optionalpassword;GET /exports/{id}/downloadworks once (410once downloaded or expired). See Export a brain. -
POST /api/search{query, facts, chunks}: the recall in every brain the person can read, grouped by brain withstateok,timeoutorerror. -
Import a brain:
POST /api/brain-imports/uploads, its parts and…/complete(which returns the manifest's summary), thenPOST /api/brain-imports(upload_id,slug,name,mode, optionalpassword,dumpfor fast restore). See Import a brain. -
Sign-in:
GET /api/auth/login/{provider}and/api/auth/callback/{provider}are the OIDC sign-in. -
GET /api/ai-status(?check=truetests every engine and returnsmodelandms). -
Embedding model change:
GET /api/embedding-engines/reindexis the state of the shadow fill (orphan: trueonly for a failed or abandoned one), andPOST /api/embedding-engines/reindex/switchneeds{"backup_confirmed": true}. -
POST /mcp: the MCP server, with the toolsrecall,facts_about,timeline,get_documentandwhats_new(reader) andrememberandcorrect(contributor). -
POST /answerruns the recall likePOST /recalland streams NDJSON, one object per line:{"type": "sources", "recall_id", "sources": [{"ref": "F1", "kind": "fact" | "episode" | "document", "id", "text", …}]}, then{"type": "delta", "text"}as the answer is written, and{"type": "done", "citations": ["F1", "D1"], "unknown": [], "called": true}(or{"type": "error", "detail"}).unknownlists labels the model cited that were not in the evidence. With no evidence it answers that there is no information andcalledisfalse. It needs therecallscope, brings document passages only withdocuments, answers429past Answers per person and hour or while the brain's AI budget is used up with pause, and503without an LLM engine. -
POST /recalltakesfederated(defaulttrue): it also searches what other brains lend to this one, marks lent items withoriginand adds afederatedlist with the state of each source./grantsmanages what this brain lends (scope:graph,docsorboth; optional expiry indays); the receiving brain can decline withDELETE. -
GET /entities/{uuid}is the Entity page in one call: the entity, its facts grouped by direction and relation (currentandprevious, oldest first, with aconflictflag for single-valued relations andgenericfor catch-all ones such asRELATES_TO, which go last), its neighbours and the episodes that mention it; the documents that mention it come fromGET /docs/mentions?entity=.as_of(a date) gives what was current that day;originreads an entity lent by another brain.GET /entities?q=finds entities by name or merged name.entity.summary_repeatsistruewhen at least half of the summary's lines are the entity's own facts (the page then hides it), andentity.aliasesnever holds the entity's own name. -
GET /proposalsis paginated: it takesstatus,kind(memoryorcorrection),q(title),author(user id),sort(id,name,author,conf,at),order(asc/desc),limit(default 50, maximum 500) andoffset, and returns{total, limit, offset, authors, items}instead of a bare list. A contributor only sees their own. -
GET /proposals/countscounts per state (only of onekindwhen given), pluskinds(each kind across every state) andcorrections_pending. -
POST /proposalsreturns the proposal plussecrets_notice: which types of secret were masked or flagged, in the caller's language, never the value (empty when nothing was found). -
POST /proposals/correctionsproposes invalidating a fact:{fact_uuid, reason, replacement?, invalid_at?, action?}; withaction: "reactivate"it proposes making a fact invalidated by mistake current again. A curator applies it at once;POST /proposals/{id}/reactivateundoes an applied one (it reactivates the fact, or invalidates it again after a reactivation). See Proposals. -
GET /graph?group_by=(label,source,document,author,token) adds the provenance: each node and fact carriessources,source_countandprovenance(the keys for every grouping), and the response addsgroupswith each origin's name and counts. Withoutgroup_bynothing is computed: in a large brain it can cost more than the subgraph itself. -
GET /docs/{id}/entitiesreturns, besides the mentionedentities, therelationsbetween them (current only, unlessexpired=true),totalandexpired_count. -
POST /docs/duplicatesstarts the Find duplicate documents job and returns its id; documents whose text repeats another's are markedduplicateand taken out of the index. -
GET /secrets/scanruns the secret detector read-only over the brain's proposals and documents and returns counts per rule, never values. The policy (secret_mode:mask,block,warn;secret_allow: exceptions) is changed withPATCH /api/brains/{slug}. -
/conflicts: possible contradictions in single-valued relations;/resolveinvalidates the facts ininvalidate, keepingkeepwhen given (without it, only the listed facts are invalidated); at least one fact of the group must stay current, or it returns 400. Undoable from the vocabulary history. Each group carriestargetsandlikely_multi(the relation probably holds several values, so there is no suggestion), and withall=trueeach relation inby_relationcarriesmax_targetsandlikely_multi./dismissmarks a group as not a contradiction ({source_uuid, source, relation, target_type, facts}); it stays hidden while no other fact joins it, and theGETlists it underdismissed. -
/refqueries: reference queries and their runs;POST /refqueries/runswithsweep(a list of similarity thresholds) simulates without changing the setting.
GET /health answers 200 with {"ok", "db", "graph", "graphs"} when PostgreSQL and FalkorDB respond, and 503 with the same body when either is down; it is the endpoint for an external monitor (Monitoring the instance).
- Dates in ISO 8601 with time zone.
- Paginated lists:
limitandoffset, and they returntotal. -
Language: error messages (
detail), the MCP texts and the headings of the recall context follow theAccept-Languageheader (en,es), then the language the session's or token's owner chose, then the instance default. Stored memory is never translated. If your client compares error texts, sendAccept-Languageor compare the status code. - The API may change between 0.x versions: pin the MimirSynth version you use.
See Connect agents (recall, proposals and MCP) and Document memory (document search).
MimirSynth · Repository · Issues · Contributing / Contribuir · Roadmap · Apache-2.0
Start
Use
- Overview
- Journal
- Facts
- Entity page
- Knowledge
- Ask
- Reference queries
- Graph
- Cypher query
- Proposals
- Content quality
- Memory health
- Curator
- Verifiable facts
- Vocabulary
- Contradictions
- Jobs
- My account
Administer
- Administration overview
- Brains and members
- Federation
- Secrets
- Export a brain
- Import a brain
- Incoming webhooks
- Notifications
- Metrics
- Administer users
- Security and two-factor
- OIDC identity
- SMTP email
- AI providers
- AI consumption
- Folders and limits
- Recall and ingestion
- Audit log
- Settings reference
- Roles and permissions
Agents
- Connect agents
- Agent plugin configuration
- Claude Code integration
- Codex integration
- OpenCode integration
- Hermes Agent integration
- OpenClaw integration
- REST API
- Writing good memory
- Document memory
Reference
Español
Empezar: Tus primeros 15 minutos · Conceptos · Guía rápida · Instalación · Actualización y copias de seguridad · HTTPS y proxy inverso
Usar: Resumen · Diario · Hechos · Página de entidad · Conocimiento · Preguntar · Consultas de referencia · Grafo · Consulta Cypher · Propuestas · Calidad del contenido · Salud de la memoria · Curador · Hechos verificables · Vocabulario · Contradicciones · Trabajos · Mi cuenta
Administrar: Visión general de la administración · Administrar brains y miembros · Federación · Secretos · Exportar un brain · Importar un brain · Webhooks de entrada · Notificaciones · Métricas · Administrar usuarios · Seguridad y doble factor · Identidad OIDC · Correo SMTP · Proveedores de IA · Consumo de IA · Carpetas y límites · Recuerdo e ingesta · Auditoría · Referencia de ajustes · Roles y permisos
Agentes: Conectar agentes · Configuración de los plugins de agente · Integración con Claude Code · Integración con Codex · Integración con OpenCode · Integración con Hermes Agent · Integración con OpenClaw · API REST · Escribir buena memoria · Memoria documental
Referencia: Variables de entorno · Glosario · Preguntas frecuentes · Solución de problemas