openmemory.sh
+ Docs menu

Reference

API reference

Every OpenMemory REST endpoint with its method, path, and operationId. The full interactive reference and OpenAPI 3.0 document live at api.openmemory.sh.

Base URL: https://api.openmemory.sh. Authenticate with Authorization: Bearer om_... or X-API-Key: om_... on every endpoint except space creation.

The operationId values are stable. Tool generators that import the OpenAPI document (for example Guild) use them as tool names.

Space

MethodPathoperationIdSummary
POST/v1/spacesspace_createCreate a memory space and get its key. No auth. Rate limited per IP.
GET/v1/spacespace_getSettings, usage, limits, and delete_after.
PATCH/v1/spacespace_updateChange timezone or dream_mode.
DELETE/v1/spacespace_deleteDelete the space and everything in it.
GET/v1/exportspace_exportExport everything as JSON.

Context and batch

MethodPathoperationIdSummary
GET/v1/contextcontext_getEverything an agent needs at the start of a run, in one call.
POST/v1/batchbatch_applyApply up to 50 writes atomically.

Memories

MethodPathoperationIdSummary
POST/v1/memoriesmemory_rememberRemember a fact. Identical facts are returned, not duplicated.
GET/v1/memoriesmemory_recallRecall by words (q), subject, tier, or tag.
GET/v1/memories/{id}memory_getGet one fact.
PATCH/v1/memories/{id}memory_updateChange a fact.
DELETE/v1/memories/{id}memory_deleteDelete one fact.
POST/v1/forgetmemory_forgetHard-delete matching facts, records, and journal text. Supports dry_run.

Journal

MethodPathoperationIdSummary
PUT/v1/journal/{date}journal_putWrite the entry for a date (YYYY-MM-DD). merge: true appends.
GET/v1/journaljournal_listList entries newest first (from, to, kind, limit).

Records

MethodPathoperationIdSummary
POST/v1/collections/{collection}/recordsrecord_putCreate a record, or update the one with the same key.
GET/v1/collections/{collection}/recordsrecord_queryQuery by status, key, due_before. Page with cursor.
GET/v1/collections/{collection}/records/{id}record_getGet one record.
PATCH/v1/collections/{collection}/records/{id}record_updateUpdate with shallow merge and optional expected_version.
DELETE/v1/collections/{collection}/records/{id}record_deleteDelete a record.

Actions

MethodPathoperationIdSummary
POST/v1/actionsaction_proposePropose an action that needs approval. Returns a short id (A1).
GET/v1/actionsaction_listList actions, newest first. Default: open ones.
GET/v1/actions/{id}action_getGet one action.
POST/v1/actions/{id}/transitionaction_transitionCompare-and-set status change (from, to, optional receipt).

KV and events

MethodPathoperationIdSummary
GET/v1/kv/{ns}kv_listList keys in a namespace.
GET/v1/kv/{ns}/{key}kv_getGet one value.
PUT/v1/kv/{ns}/{key}kv_setSet a value. Optional compare-and-set with expected_version.
DELETE/v1/kv/{ns}/{key}kv_deleteDelete a value.
POST/v1/eventsevent_appendAppend to the capped event log.
GET/v1/eventsevent_listList events newest first (kind, since, before_id).

Dreaming

MethodPathoperationIdSummary
POST/v1/dreamdream_startStart a dream now (optional mode).
GET/v1/dream/runsdream_runsList recent runs and their reports.
POST/v1/dream/runs/{id}/undodream_undoUndo every change a run made (within 7 days).
GET/v1/dream/jobs/nextdream_job_nextClient mode: get the waiting job (start_if_due=true to start one).
POST/v1/dream/jobs/{id}/resultdream_job_submitClient mode: submit your model's JSON result.

Service endpoints

These are not part of the OpenAPI document:

MethodPathPurpose
GET/Service name, version, and links.
GET/health{"ok": true}
GET/openapi.jsonThe OpenAPI 3.0.3 document.
GET/docsInteractive API reference.
POST/mcpThe MCP endpoint (Streamable HTTP). On https://mcp.openmemory.sh it is served at the root. See MCP tools.

Conventions

  • Request and response bodies are JSON. Times are ISO 8601 with an offset (2026-11-05T09:00:00Z). Dates are YYYY-MM-DD.
  • Creates return 201. Idempotent repeats (same fact, same record key, same action key) return 200 with "created": false.
  • Errors are {"error": {"code", "message", "details"?}}. Status codes are listed in Concepts.
  • Ids are prefixed: sp_ (space), mem_ (memory), rec_ (record), dr_ (dream run). Actions use short ids per space (A1).