Lists historical versions of a memory store in reverse creation order. The current memory does not need to exist.
Prerequisites
Endpoint and authentication configured. For details, see Overview and authentication.
Endpoint
GET /memory_stores/{memory_store_id}/memory_versions
Path parameters
| Field | Required | Type | Description |
|---|---|---|---|
memory_store_id | Yes | string | Memory store ID |
Query parameters
| Field | Required | Type | Description |
|---|---|---|---|
memory_id | No | string | Only returns versions of this memory; omit to return versions of the whole store |
operation | No | created / modified / deleted | Filters by the operation that produced the version |
created_at.gte | No | string | Lower bound of the version creation time (inclusive), ISO 8601 UTC |
created_at.lte | No | string | Upper bound of the version creation time (inclusive), ISO 8601 UTC |
view | No | basic / full | basic excludes bodies (default); full returns unredacted bodies |
limit | No | integer | Page size. basic: 1-100, default 20; full: 1-20 |
page | No | string | Pagination cursor. Keep all query conditions and limit unchanged when paging |
Request example
Response
Response fields
| Field | Type | Description |
|---|---|---|
data | array<object> | Array of versions; bodies are included when view=full and not redacted |
id | string | Version ID, in the format memver_xxx |
type | string | Always memory_version |
memory_store_id | string | ID of the memory store it belongs to |
memory_id | string | ID of the corresponding memory |
operation | created / modified / deleted | The operation that produced the version |
path | string | Path in the version snapshot |
content | string | Body of the version; absent when redacted |
content_sha256 | string | SHA256 hash of the version body |
content_size_bytes | integer | UTF-8 byte length of the version body |
redacted_at | string | null | Time when the body was redacted; omitted or null when not redacted |
created_at | string | Version creation time, ISO 8601 UTC |
next_page | string | null | Cursor for the next page; absent when there is no more data |
Error codes
| HTTP status | Error code | Description |
|---|---|---|
| 400 | invalid_request_error | Invalid parameters, path, limit, or pagination cursor |
| 401 | InvalidApiKey | API key missing, invalid, or expired |
| 403 | permission_error | Insufficient identity or resource access permissions |
| 404 | not_found_error | Resource does not exist or does not belong to the current workspace |