openmemory
Docs
Memories

Remember a fact

POST
/v1/memories

An identical fact (same subject and text) is returned instead of stored twice.

Authorization

headerAuthorizationBearer <token>

Your space key (om_...). Create one with POST /v1/spaces.

Request Body

application/json
  1. body
subject?string

Who or what the fact is about, e.g. 'Sam'.

Lengthlength <= 200
Default""
text*string

The fact itself, in one or two sentences.

Length1 <= length <= 4000
tier?Tier

core = always in context; long = recalled on demand; scratch = short-lived.

Default"long"
Value in"core""long""scratch"
tags?array<>
Itemsitems <= 20
Default[]
source_ref?string

Where the fact came from (message id, URL). No message bodies.

Lengthlength <= 500
Default""
pinned?boolean

Pinned facts are never changed by dreaming.

Defaultfalse
origin?string

'user' when the person stated it; dreaming never rewrites those.

Default"agent"
Value in"user""agent"
expires_at?|
Formatdate-time

Response Body

Already known

application/json
  1. response
memory*
created*boolean
Example Request
curl -X POST 'https://api.openmemory.sh/v1/memories' \  -H 'Content-Type: application/json' \  -d '{  "text": "string"}'
Example Response
{  "memory": {    "id": "string",    "subject": "string",    "text": "string",    "tier": "core",    "tags": [      "string"    ],    "source_ref": "string",    "pinned": true,    "origin": "user",    "expires_at": "string",    "recall_count": 0,    "last_recalled_at": "string",    "created_at": "string",    "updated_at": "string",    "match": "keyword"  },  "created": true}