Endpoints
| Method | Path | Description |
|---|---|---|
GET | /memories | Get current user memories |
PUT | /memories | Set user memories |
GET | /memories/history | Get memory version history |
POST | /memories/restore | Restore a previous memory version |
Get memories
GET /memories
Returns the current memory content for the authenticated user.
Example request:
| Field | Type | Nullable | Description |
|---|---|---|---|
content | string | No | Markdown-formatted memory content |
updated_at | string | Yes | ISO 8601 timestamp of the last update |
Set memories
PUT /memories
Replaces the current memory content entirely. Memory writes are versioned automatically.
Request body:
| Field | Required | Type | Description |
|---|---|---|---|
content | Yes | string | Full memory content (max 10,000 characters, markdown supported) |
Get version history
GET /memories/history
Returns all previous versions of the user’s memory document.
Example request:
| Field | Type | Nullable | Description |
|---|---|---|---|
version | integer | No | Version number (1-indexed) |
content | string | No | Memory content at this version |
updated_at | string | No | ISO 8601 timestamp |
restored_from_version | integer | Yes | Version this was restored from, if applicable |
Restore a version
POST /memories/restore
Rolls back the user’s memory to a previous version. The restore creates a new version entry rather than overwriting history.
Request body:
| Field | Required | Type | Description |
|---|---|---|---|
version | Yes | integer | Version number to restore (must be ≥ 1) |

