openmemory
Docs
Memories

Forget: remove matching facts, records, journal text, actions, KV values, and events

POST
/v1/forget

Looks only in the scopes you list, and the default is memories alone: not_searched names the rest. Facts match when they contain ALL the words in query, as whole words. Everything else matches the exact phrase, ignoring case and accents. Facts, records, KV values, and events are deleted. Journal entries are redacted by default. Actions are always redacted, and any that could still run are superseded. Use dry_run to preview. If truncated is true, run it again. Leaves content-free tombstones.

Authorization

headerAuthorizationBearer <token>

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

Request Body

application/json
  1. body
ids?array<string>

Memory ids to delete.

Itemsitems <= 200
query?string

Memories match when they contain ALL of these words. Everything else matches when it contains this exact phrase.

Length2 <= length <= 200
scopes?array<>

Where to look. The default is memories only, so to forget something everywhere, list all six. The result's not_searched names what was skipped.

Default
[  "memories"]
journal_mode?string
Default"redact"
Value in"redact""delete"
dry_run?boolean
Defaultfalse

Response Body

What was (or would be) forgotten

application/json
  1. response
dry_run*boolean
memories*array<string>
records*array<string>
journal*array<string>
actions*array<string>

Actions redacted. They stay in the ledger with '[forgotten]' in place of the phrase.

kv*array<string>

KV entries deleted, as ns/key.

events*array<integer>

Events deleted.

executing_actions*array<string>

Matching actions already executing. They were redacted, but whatever is running them already has the original.

not_searched*array<>

Scopes this call did not look in, so the phrase may still be there.

truncated*boolean

More matched than one call handles. Run it again until this is false.

Example Request
curl -X POST 'https://api.openmemory.sh/v1/forget' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "dry_run": true,  "memories": [    "string"  ],  "records": [    "string"  ],  "journal": [    "string"  ],  "actions": [    "string"  ],  "kv": [    "string"  ],  "events": [    0  ],  "executing_actions": [    "string"  ],  "not_searched": [    "memories"  ],  "truncated": true}