MemorySync
API Reference

Memory History

Read what changed on one memory, when, and who changed it. Each entry carries the old and the new value per field.

Endpoint and query parameters

GET/memory/{memory_id}/history
200 OK
ParameterTypeContract
limitintegerOptional; 1–500, default 100.
offsetintegerOptional; default 0.

Read a memory's history

import os
from memorysync import MemorySyncClient
client = MemorySyncClient(
api_key=os.environ["MEMORYSYNC_API_KEY"],
base_url="https://api.memorysync.io",
project_id=os.environ["MEMORYSYNC_PROJECT_ID"],
end_user_id="usr_7f3a9c2e",
)
history = client.history(101, limit=20)
for entry in history.revisions:
print(entry.revision, entry.event, entry.changed_fields)

Response shape

200-response.json
{"memory_id":101,"total":3,"revisions":[{"revision":0,"event":"created","changed_fields":[],"diff":{},"actor":null,"created_at":"2026-05-04T12:30:11Z"},{"revision":1,"event":"updated","changed_fields":["content_type","metadata_json","tags"],"diff":{"tags":{"old":[],"new":["billing","reconciliation"]}},"actor":null,"created_at":"2026-05-04T12:30:29Z"},{"revision":2,"event":"updated","changed_fields":["importance"],"diff":{"importance":{"old":0.92,"new":0.9}},"actor":"end_user:tenant-1786179001274:usr_7f3a9c2e","created_at":"2026-05-04T12:41:02Z"}],"tracked_fields":["archived_at","cluster_id","content_type","deleted_at","event_type","expires_at","extracted_key","extracted_type","hard_delete_queued_at","importance","is_summary","metadata_json","parent_id","purged_at","retention_status","soft_deleted_at","source","summary_of","tags","tier"]}

Reading the entries

FieldMeaning
revisionPosition in this memory's history. 0 is the creation entry, synthesised from created_at rather than stored.
eventcreated, updated, superseded, soft_deleted, restored, archived or purged.
changed_fieldsWhich fields this entry touched.
diffPer-field old and new values.
actorWho made the change. null for background workers, which have no request behind them.
tracked_fieldsThe fields changes are recorded for. Without this you cannot tell "nothing changed" from "not recorded".

Two things that surprise people

What is deliberately not tracked

Recall counters, last_accessed_at, decay and quality scores, embeddings, processing state and the encrypted text are all excluded. usage_count alone changes on every single query; recording it would put thousands of entries behind a week-old memory and bury the two a reader is looking for.

Errors and next action

A 404 means the memory does not exist or is not visible in this scope — the two are deliberately indistinguishable so the id space cannot be mapped. A 400 means a non-positive id.

Safety notes