from line 1
1---
2title: Memory Versions
3url: https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions
4---
5
61# Memory Versions
72
83## List memory versions
94
10**get** `/v1/memory_stores/{memory_store_id}/memory_versions`
5**GET** `/v1/memory_stores/{memory_store_id}/memory_versions`
116
127List memory versions
138
14### Path Parameters
9### Path parameters
1510
1611- `memory_store_id: string`
1712
18### Query Parameters
13### Query parameters
1914
2015- `api_key_id: optional string`
2116
from line 20
2520
2621 Return versions created at or after this time (inclusive).
2722
23 format: date-time
24
2825- `"created_at[lte]": optional string`
2926
3027 Return versions created at or before this time (inclusive).
3128
29 format: date-time
30
3231- `limit: optional number`
3332
3433 Query parameter for limit
3534
35 format: int32
36
3637- `memory_id: optional string`
3738
3839 Query parameter for memory_id
from line 68
6768
6869 - `"full"`
6970
70### Header Parameters
71### Headers
7172
7273- `"anthropic-beta": optional array of AnthropicBeta`
7374
from line 160
159160
160161 A timestamp in RFC 3339 format
161162
163 format: date-time
164
162165 - `memory_id: string`
163166
164167 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.
from line 182
179182
180183 - `type: "memory_version"`
181184
182 - `"memory_version"`
183
184185 - `content: optional string or null`
185186
186187 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.
from line 194
193194
194195 Size of `content` in bytes as of this version. `null` when `redacted_at` is set or `operation` is `deleted`. Populated regardless of `view` otherwise.
195196
197 format: int32
198
196199 - `created_by: optional BetaManagedAgentsActor`
197200
198201 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).
199202
200 - `BetaManagedAgentsSessionActor object { session_id, type }`
203 - `BetaManagedAgentsSessionActor object`
201204
202205 Attribution for a write made by an agent during a session, through the mounted filesystem at `/mnt/memory/`.
203206
from line 208
205208
206209 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.
207210
211 minLength: 1
212
208213 - `type: "session_actor"`
209214
210 - `"session_actor"`
215 - `BetaManagedAgentsAPIActor object`
211216
212 - `BetaManagedAgentsAPIActor object { api_key_id, type }`
213
214217 Attribution for a write made directly via the public API (outside of any session).
215218
216219 - `api_key_id: string`
from line 220
217220
218221 ID of the API key that performed the write. This identifies the key, not the secret.
219222
223 minLength: 1
224
220225 - `type: "api_actor"`
221226
222 - `"api_actor"`
227 - `BetaManagedAgentsUserActor object`
223228
224 - `BetaManagedAgentsUserActor object { type, user_id }`
225
226229 Attribution for a write made by a human user through the Anthropic Console.
227230
228231 - `type: "user_actor"`
229232
230 - `"user_actor"`
231
232233 - `user_id: string`
233234
234235 ID of the user who performed the write (a `user_...` value).
235236
236 - `BetaManagedAgentsServiceAccountActor object { service_account_id, type }`
237 minLength: 1
237238
239 - `BetaManagedAgentsServiceAccountActor object`
240
238241 Attribution for a write made by a workload authenticated as a service account, for example via Workload Identity Federation.
239242
240243 - `service_account_id: string`
from line 244
241244
242245 ID of the service account that performed the write (a `svac_...` value).
243246
247 minLength: 1
248
244249 - `type: "service_account_actor"`
245250
246 - `"service_account_actor"`
247
248251 - `path: optional string or null`
249252
250253 The memory's path at the time of this write. `null` if and only if `redacted_at` is set.
from line 256
253256
254257 A timestamp in RFC 3339 format
255258
259 format: date-time
260
256261 - `redacted_by: optional BetaManagedAgentsActor`
257262
258263 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).
from line 268
263268
264269### Example
265270
266```http
271```bash
267272curl https://api.anthropic.com/v1/memory_stores/$MEMORY_STORE_ID/memory_versions \
268273 -H 'anthropic-version: 2023-06-01' \
269274 -H 'anthropic-beta: agent-memory-2026-07-22' \
from line 275
270275 -H "X-Api-Key: $ANTHROPIC_API_KEY"
271276```
272277
273#### Response
278#### Response (200)
274279
275280```json
276281{
from line 308
303308
304309## Retrieve a memory version
305310
306**get** `/v1/memory_stores/{memory_store_id}/memory_versions/{memory_version_id}`
311**GET** `/v1/memory_stores/{memory_store_id}/memory_versions/{memory_version_id}`
307312
308313Retrieve a memory version
309314
310### Path Parameters
315### Path parameters
311316
312317- `memory_store_id: string`
313318
314319- `memory_version_id: string`
315320
316### Query Parameters
321### Query parameters
317322
318323- `view: optional BetaManagedAgentsMemoryView`
319324
from line 328
323328
324329 - `"full"`
325330
326### Header Parameters
331### Headers
327332
328333- `"anthropic-beta": optional array of AnthropicBeta`
329334
from line 408
403408
404409### Returns
405410
406- `BetaManagedAgentsMemoryVersion object { id, created_at, memory_id, 10 more }`
411- `BetaManagedAgentsMemoryVersion object`
407412
408413 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.
409414
from line 420
415420
416421 A timestamp in RFC 3339 format
417422
423 format: date-time
424
418425 - `memory_id: string`
419426
420427 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.
from line 442
435442
436443 - `type: "memory_version"`
437444
438 - `"memory_version"`
439
440445 - `content: optional string or null`
441446
442447 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.
from line 454
449454
450455 Size of `content` in bytes as of this version. `null` when `redacted_at` is set or `operation` is `deleted`. Populated regardless of `view` otherwise.
451456
457 format: int32
458
452459 - `created_by: optional BetaManagedAgentsActor`
453460
454461 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).
455462
456 - `BetaManagedAgentsSessionActor object { session_id, type }`
463 - `BetaManagedAgentsSessionActor object`
457464
458465 Attribution for a write made by an agent during a session, through the mounted filesystem at `/mnt/memory/`.
459466
from line 468
461468
462469 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.
463470
471 minLength: 1
472
464473 - `type: "session_actor"`
465474
466 - `"session_actor"`
475 - `BetaManagedAgentsAPIActor object`
467476
468 - `BetaManagedAgentsAPIActor object { api_key_id, type }`
469
470477 Attribution for a write made directly via the public API (outside of any session).
471478
472479 - `api_key_id: string`
from line 480
473480
474481 ID of the API key that performed the write. This identifies the key, not the secret.
475482
483 minLength: 1
484
476485 - `type: "api_actor"`
477486
478 - `"api_actor"`
487 - `BetaManagedAgentsUserActor object`
479488
480 - `BetaManagedAgentsUserActor object { type, user_id }`
481
482489 Attribution for a write made by a human user through the Anthropic Console.
483490
484491 - `type: "user_actor"`
485492
486 - `"user_actor"`
487
488493 - `user_id: string`
489494
490495 ID of the user who performed the write (a `user_...` value).
491496
492 - `BetaManagedAgentsServiceAccountActor object { service_account_id, type }`
497 minLength: 1
493498
499 - `BetaManagedAgentsServiceAccountActor object`
500
494501 Attribution for a write made by a workload authenticated as a service account, for example via Workload Identity Federation.
495502
496503 - `service_account_id: string`
from line 504
497504
498505 ID of the service account that performed the write (a `svac_...` value).
499506
507 minLength: 1
508
500509 - `type: "service_account_actor"`
501510
502 - `"service_account_actor"`
503
504511 - `path: optional string or null`
505512
506513 The memory's path at the time of this write. `null` if and only if `redacted_at` is set.
from line 516
509516
510517 A timestamp in RFC 3339 format
511518
519 format: date-time
520
512521 - `redacted_by: optional BetaManagedAgentsActor`
513522
514523 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).
from line 524
515524
516525### Example
517526
518```http
527```bash
519528curl https://api.anthropic.com/v1/memory_stores/$MEMORY_STORE_ID/memory_versions/$MEMORY_VERSION_ID \
520529 -H 'anthropic-version: 2023-06-01' \
521530 -H 'anthropic-beta: agent-memory-2026-07-22' \
from line 531
522531 -H "X-Api-Key: $ANTHROPIC_API_KEY"
523532```
524533
525#### Response
534#### Response (200)
526535
527536```json
528537{
from line 559
550559
551560## Redact a memory version
552561
553**post** `/v1/memory_stores/{memory_store_id}/memory_versions/{memory_version_id}/redact`
562**POST** `/v1/memory_stores/{memory_store_id}/memory_versions/{memory_version_id}/redact`
554563
555564Redact a memory version
556565
557### Path Parameters
566### Path parameters
558567
559568- `memory_store_id: string`
560569
561570- `memory_version_id: string`
562571
563### Header Parameters
572### Headers
564573
565574- `"anthropic-beta": optional array of AnthropicBeta`
566575
from line 649
640649
641650### Returns
642651
643- `BetaManagedAgentsMemoryVersion object { id, created_at, memory_id, 10 more }`
652- `BetaManagedAgentsMemoryVersion object`
644653
645654 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.
646655
from line 661
652661
653662 A timestamp in RFC 3339 format
654663
664 format: date-time
665
655666 - `memory_id: string`
656667
657668 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.
from line 683
672683
673684 - `type: "memory_version"`
674685
675 - `"memory_version"`
676
677686 - `content: optional string or null`
678687
679688 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.
from line 695
686695
687696 Size of `content` in bytes as of this version. `null` when `redacted_at` is set or `operation` is `deleted`. Populated regardless of `view` otherwise.
688697
698 format: int32
699
689700 - `created_by: optional BetaManagedAgentsActor`
690701
691702 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).
692703
693 - `BetaManagedAgentsSessionActor object { session_id, type }`
704 - `BetaManagedAgentsSessionActor object`
694705
695706 Attribution for a write made by an agent during a session, through the mounted filesystem at `/mnt/memory/`.
696707
from line 709
698709
699710 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.
700711
712 minLength: 1
713
701714 - `type: "session_actor"`
702715
703 - `"session_actor"`
716 - `BetaManagedAgentsAPIActor object`
704717
705 - `BetaManagedAgentsAPIActor object { api_key_id, type }`
706
707718 Attribution for a write made directly via the public API (outside of any session).
708719
709720 - `api_key_id: string`
from line 721
710721
711722 ID of the API key that performed the write. This identifies the key, not the secret.
712723
724 minLength: 1
725
713726 - `type: "api_actor"`
714727
715 - `"api_actor"`
728 - `BetaManagedAgentsUserActor object`
716729
717 - `BetaManagedAgentsUserActor object { type, user_id }`
718
719730 Attribution for a write made by a human user through the Anthropic Console.
720731
721732 - `type: "user_actor"`
722733
723 - `"user_actor"`
724
725734 - `user_id: string`
726735
727736 ID of the user who performed the write (a `user_...` value).
728737
729 - `BetaManagedAgentsServiceAccountActor object { service_account_id, type }`
738 minLength: 1
730739
740 - `BetaManagedAgentsServiceAccountActor object`
741
731742 Attribution for a write made by a workload authenticated as a service account, for example via Workload Identity Federation.
732743
733744 - `service_account_id: string`
from line 745
734745
735746 ID of the service account that performed the write (a `svac_...` value).
736747
748 minLength: 1
749
737750 - `type: "service_account_actor"`
738751
739 - `"service_account_actor"`
740
741752 - `path: optional string or null`
742753
743754 The memory's path at the time of this write. `null` if and only if `redacted_at` is set.
from line 757
746757
747758 A timestamp in RFC 3339 format
748759
760 format: date-time
761
749762 - `redacted_by: optional BetaManagedAgentsActor`
750763
751764 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).
from line 765
752765
753766### Example
754767
755```http
768```bash
756769curl https://api.anthropic.com/v1/memory_stores/$MEMORY_STORE_ID/memory_versions/$MEMORY_VERSION_ID/redact \
757770 -X POST \
758771 -H 'anthropic-version: 2023-06-01' \
from line 773
760773 -H "X-Api-Key: $ANTHROPIC_API_KEY"
761774```
762775
763#### Response
776#### Response (200)
764777
765778```json
766779{
from line 799
786799}
787800```
788801
789## Domain Types
802## Domain types
790803
791804### Beta Managed Agents Actor
792805
from line 807
794807
795808 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).
796809
797 - `BetaManagedAgentsSessionActor object { session_id, type }`
810 - `BetaManagedAgentsSessionActor object`
798811
799812 Attribution for a write made by an agent during a session, through the mounted filesystem at `/mnt/memory/`.
800813
from line 815
802815
803816 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.
804817
818 minLength: 1
819
805820 - `type: "session_actor"`
806821
807 - `"session_actor"`
822 - `BetaManagedAgentsAPIActor object`
808823
809 - `BetaManagedAgentsAPIActor object { api_key_id, type }`
810
811824 Attribution for a write made directly via the public API (outside of any session).
812825
813826 - `api_key_id: string`
from line 827
814827
815828 ID of the API key that performed the write. This identifies the key, not the secret.
816829
830 minLength: 1
831
817832 - `type: "api_actor"`
818833
819 - `"api_actor"`
834 - `BetaManagedAgentsUserActor object`
820835
821 - `BetaManagedAgentsUserActor object { type, user_id }`
822
823836 Attribution for a write made by a human user through the Anthropic Console.
824837
825838 - `type: "user_actor"`
826839
827 - `"user_actor"`
828
829840 - `user_id: string`
830841
831842 ID of the user who performed the write (a `user_...` value).
832843
833 - `BetaManagedAgentsServiceAccountActor object { service_account_id, type }`
844 minLength: 1
834845
846 - `BetaManagedAgentsServiceAccountActor object`
847
835848 Attribution for a write made by a workload authenticated as a service account, for example via Workload Identity Federation.
836849
837850 - `service_account_id: string`
from line 851
838851
839852 ID of the service account that performed the write (a `svac_...` value).
840853
854 minLength: 1
855
841856 - `type: "service_account_actor"`
842857
843 - `"service_account_actor"`
844
845858### Beta Managed Agents API Actor
846859
847- `BetaManagedAgentsAPIActor object { api_key_id, type }`
860- `BetaManagedAgentsAPIActor object`
848861
849862 Attribution for a write made directly via the public API (outside of any session).
850863
from line 865
852865
853866 ID of the API key that performed the write. This identifies the key, not the secret.
854867
868 minLength: 1
869
855870 - `type: "api_actor"`
856871
857 - `"api_actor"`
858
859872### Beta Managed Agents Memory Version
860873
861- `BetaManagedAgentsMemoryVersion object { id, created_at, memory_id, 10 more }`
874- `BetaManagedAgentsMemoryVersion object`
862875
863876 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.
864877
from line 883
870883
871884 A timestamp in RFC 3339 format
872885
886 format: date-time
887
873888 - `memory_id: string`
874889
875890 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.
from line 905
890905
891906 - `type: "memory_version"`
892907
893 - `"memory_version"`
894
895908 - `content: optional string or null`
896909
897910 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.
from line 917
904917
905918 Size of `content` in bytes as of this version. `null` when `redacted_at` is set or `operation` is `deleted`. Populated regardless of `view` otherwise.
906919
920 format: int32
921
907922 - `created_by: optional BetaManagedAgentsActor`
908923
909924 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).
910925
911 - `BetaManagedAgentsSessionActor object { session_id, type }`
926 - `BetaManagedAgentsSessionActor object`
912927
913928 Attribution for a write made by an agent during a session, through the mounted filesystem at `/mnt/memory/`.
914929
from line 931
916931
917932 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.
918933
934 minLength: 1
935
919936 - `type: "session_actor"`
920937
921 - `"session_actor"`
938 - `BetaManagedAgentsAPIActor object`
922939
923 - `BetaManagedAgentsAPIActor object { api_key_id, type }`
924
925940 Attribution for a write made directly via the public API (outside of any session).
926941
927942 - `api_key_id: string`
from line 943
928943
929944 ID of the API key that performed the write. This identifies the key, not the secret.
930945
946 minLength: 1
947
931948 - `type: "api_actor"`
932949
933 - `"api_actor"`
950 - `BetaManagedAgentsUserActor object`
934951
935 - `BetaManagedAgentsUserActor object { type, user_id }`
936
937952 Attribution for a write made by a human user through the Anthropic Console.
938953
939954 - `type: "user_actor"`
940955
941 - `"user_actor"`
942
943956 - `user_id: string`
944957
945958 ID of the user who performed the write (a `user_...` value).
946959
947 - `BetaManagedAgentsServiceAccountActor object { service_account_id, type }`
960 minLength: 1
948961
962 - `BetaManagedAgentsServiceAccountActor object`
963
949964 Attribution for a write made by a workload authenticated as a service account, for example via Workload Identity Federation.
950965
951966 - `service_account_id: string`
from line 967
952967
953968 ID of the service account that performed the write (a `svac_...` value).
954969
970 minLength: 1
971
955972 - `type: "service_account_actor"`
956973
957 - `"service_account_actor"`
958
959974 - `path: optional string or null`
960975
961976 The memory's path at the time of this write. `null` if and only if `redacted_at` is set.
from line 979
964979
965980 A timestamp in RFC 3339 format
966981
982 format: date-time
983
967984 - `redacted_by: optional BetaManagedAgentsActor`
968985
969986 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).
from line 999
982999
9831000### Beta Managed Agents Service Account Actor
9841001
985- `BetaManagedAgentsServiceAccountActor object { service_account_id, type }`
1002- `BetaManagedAgentsServiceAccountActor object`
9861003
9871004 Attribution for a write made by a workload authenticated as a service account, for example via Workload Identity Federation.
9881005
from line 1007
9901007
9911008 ID of the service account that performed the write (a `svac_...` value).
9921009
1010 minLength: 1
1011
9931012 - `type: "service_account_actor"`
9941013
995 - `"service_account_actor"`
996
9971014### Beta Managed Agents Session Actor
9981015
999- `BetaManagedAgentsSessionActor object { session_id, type }`
1016- `BetaManagedAgentsSessionActor object`
10001017
10011018 Attribution for a write made by an agent during a session, through the mounted filesystem at `/mnt/memory/`.
10021019
from line 1021
10041021
10051022 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.
10061023
1024 minLength: 1
1025
10071026 - `type: "session_actor"`
10081027
1009 - `"session_actor"`
1010
10111028### Beta Managed Agents User Actor
10121029
1013- `BetaManagedAgentsUserActor object { type, user_id }`
1030- `BetaManagedAgentsUserActor object`
10141031
10151032 Attribution for a write made by a human user through the Anthropic Console.
10161033
10171034 - `type: "user_actor"`
10181035
1019 - `"user_actor"`
1020
10211036 - `user_id: string`
10221037
10231038 ID of the user who performed the write (a `user_...` value).
1039
1040 minLength: 1
10241041
No line in this hunk matches that.