Retrieve a memory version
api/beta/memory_stores/memory_versions/retrieve
Nearest release: v2.1.245, published an hour after this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
api/beta/memory_stores/memory_versions/retrieve Changed · +31 / -32 lines
# Retrieve a memory version ## Path parameters ## Query parameters ## Headers ## Returns ## Example ### Response (200) ## Retrieve a memory version ### Path Parameters ### Query Parameters ### Header Parameters ### Returns ### Example #### Response
---- -title: Retrieve a memory version -url: https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/retrieve ---- +# Retrieve a memory version -## Retrieve a memory version +**GET** `/v1/memory_stores/{memory_store_id}/memory_versions/{memory_version_id}` -**get** `/v1/memory_stores/{memory_store_id}/memory_versions/{memory_version_id}` - Retrieve a memory version -### Path Parameters +## Path parameters - `memory_store_id: string` - `memory_version_id: string` -### Query Parameters +## Query parameters - `view: optional BetaManagedAgentsMemoryView`
- `"full"` -### Header Parameters +## Headers - `"anthropic-beta": optional array of AnthropicBeta`
- `"mid-conversation-tool-changes-2026-07-01"` -### Returns +## Returns -- `BetaManagedAgentsMemoryVersion object { id, created_at, memory_id, 10 more }` +- `BetaManagedAgentsMemoryVersion object` A `memory_version` object: one immutable, attributed row in a memory's append-only history. Every non-no-op mutation to a memory produces a new version. Versions belong to the store (not the individual memory) and persist after the memory is deleted. Retrieving a redacted version returns 200 with `content`, `path`, `content_size_bytes`, and `content_sha256` set to `null`; branch on `redacted_at`, not HTTP status.
A timestamp in RFC 3339 format + format: date-time + - `memory_id: string` ID of the memory this version snapshots (a `mem_...` value). Remains valid after the memory is deleted; pass it as `memory_id` to [List memory versions](/docs/en/api/beta/memory_stores/memory_versions/list) to retrieve the full lineage including the `deleted` row.
- `type: "memory_version"` - - `"memory_version"` - - `content: optional string or null` The memory's UTF-8 text content as of this version. `null` when `view=basic`, when `operation` is `deleted`, or when `redacted_at` is set.
Size of `content` in bytes as of this version. `null` when `redacted_at` is set or `operation` is `deleted`. Populated regardless of `view` otherwise. + format: int32 + - `created_by: optional BetaManagedAgentsActor` Identifies who performed a write or redact operation. Captured at write time on the `memory_version` row. The API key that created a session is not recorded on agent writes; attribution answers who made the write, not who is ultimately responsible. Look up session provenance separately via the [Sessions API](/docs/en/api/sessions-retrieve). - - `BetaManagedAgentsSessionActor object { session_id, type }` + - `BetaManagedAgentsSessionActor object` Attribution for a write made by an agent during a session, through the mounted filesystem at `/mnt/memory/`.
ID of the session that performed the write (a `sesn_...` value). Look up the session via [Retrieve a session](/docs/en/api/sessions-retrieve) for further provenance. + minLength: 1 + - `type: "session_actor"` - - `"session_actor"` + - `BetaManagedAgentsAPIActor object` - - `BetaManagedAgentsAPIActor object { api_key_id, type }` - Attribution for a write made directly via the public API (outside of any session). - `api_key_id: string`
ID of the API key that performed the write. This identifies the key, not the secret. + minLength: 1 + - `type: "api_actor"` - - `"api_actor"` + - `BetaManagedAgentsUserActor object` - - `BetaManagedAgentsUserActor object { type, user_id }` - Attribution for a write made by a human user through the Anthropic Console. - `type: "user_actor"` - - `"user_actor"` - - `user_id: string` ID of the user who performed the write (a `user_...` value). - - `BetaManagedAgentsServiceAccountActor object { service_account_id, type }` + minLength: 1 + - `BetaManagedAgentsServiceAccountActor object` + Attribution for a write made by a workload authenticated as a service account, for example via Workload Identity Federation. - `service_account_id: string`
ID of the service account that performed the write (a `svac_...` value). + minLength: 1 + - `type: "service_account_actor"` - - `"service_account_actor"` - - `path: optional string or null` The memory's path at the time of this write. `null` if and only if `redacted_at` is set.
A timestamp in RFC 3339 format + format: date-time + - `redacted_by: optional BetaManagedAgentsActor` Identifies who performed a write or redact operation. Captured at write time on the `memory_version` row. The API key that created a session is not recorded on agent writes; attribution answers who made the write, not who is ultimately responsible. Look up session provenance separately via the [Sessions API](/docs/en/api/sessions-retrieve). -### Example +## Example -```http +```bash curl https://api.anthropic.com/v1/memory_stores/$MEMORY_STORE_ID/memory_versions/$MEMORY_VERSION_ID \ -H 'anthropic-version: 2023-06-01' \ -H 'anthropic-beta: agent-memory-2026-07-22' \
-H "X-Api-Key: $ANTHROPIC_API_KEY" ``` -#### Response +### Response (200) ```json {