---
title: "Update a memory (creates new version)"
method: PATCH
path: "/v4/memories"
tags: ["Memories"]
---

# Update a memory (creates new version)

`PATCH /v4/memories`

Update a memory by creating a new version. The original memory is preserved with isLatest=false.

## Request body

- object
  - `id` string — ID of the memory entry to operate on
  - `content` string — Exact content match of the memory entry to operate on. Use this when you don't have the ID.
  - `containerTag` string, required — Container tag / space identifier. Required to scope the operation.
  - `newContent` string, required — The new content that will replace the existing memory
  - `metadata` object — Optional metadata. If not provided, inherits from the previous version.

## Response `200`

Memory updated successfully

- object — Response after updating a memory
  - `id` string, required — ID of the newly created memory version
  - `memory` string, required — The content of the new memory version
  - `version` number, required — Version number of this memory entry
  - `parentMemoryId` string, nullable, required — ID of the memory this version updates
  - `rootMemoryId` string, nullable, required — ID of the first memory in this version chain
  - `createdAt` string, datetime, required — When this memory version was created

## Other responses

- `400` — Invalid request - missing required fields
- `401` — Unauthorized
- `404` — Memory not found
- `500` — Server error

---

[API](https://skmtc.dev/supermemoryai/apis/supermemory-api.md) · [All operations](https://skmtc.dev/supermemoryai/apis/supermemory-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/supermemoryai/supermemory-api/revisions/5265b03b27de/schema)
