GET · Memory history

Per-memory audit trail merging metadata.history with audit_log rows.

GET /api/memories/:id/history

Returns every edit to a single memory, merged from two sources:

  1. metadata.history entries written when content is changed via PATCH /api/memories/:id. Carry prev_content_len.
  2. audit_log rows for any memory.save | memory.update | memory.delete action against this id. Carry actor + timestamp.
curl https://www.mnueron.com/api/memories/01HQB9R3MV…/history \
  -H "Authorization: Bearer $MNUERON_API_TOKEN"

Response

{
  "memory_id": "01HQB9R3MV…",
  "history": [
    {
      "at": 1737070000000,
      "kind": "create",
      "by_user": "01HQ…",
      "by_token": "01HQ…"
    },
    {
      "at": 1737071000000,
      "kind": "update",
      "by_user": "01HQ…",
      "by_token": "01HQ…"
    },
    {
      "at": 1737071000000,
      "kind": "content_edit",
      "by_user": "01HQ…",
      "by_token": "01HQ…",
      "prev_content_len": 42
    }
  ]
}

Kinds

kindSourceMeaning
createaudit_log (memory.save)The memory was inserted
updateaudit_log (memory.update)Any field was updated
deleteaudit_log (memory.delete)The memory was hard-deleted (the memory itself is then gone, but the history endpoint still returns its trail)
content_editmetadata.historyThe content field changed; prev_content_len is included
consolidationaudit_logThe memory was created or absorbed by a consolidation merge

Entries are sorted ascending by at.

Last updated 2026-05-24edit