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

# 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.
  - `forgetAfter` string, datetime, nullable — ISO 8601 datetime string. The memory will be auto-forgotten after this time. Pass null to clear an existing expiry. Omit to inherit from the previous version.
  - `forgetReason` string, nullable — Optional reason for the scheduled forgetting. Cleared automatically when forgetAfter is set to null.
  - `temporalContext` object — Structured temporal metadata. Merged into the metadata JSON column. If omitted, existing temporalContext is preserved.
    - `documentDate` string, datetime, nullable — Date the document was authored
    - `eventDate` string[], nullable — Dates of events referenced in the memory

## 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
  - `forgetAfter` string, datetime, nullable, required — When this memory will be auto-forgotten, or null if no expiry
  - `forgetReason` string, nullable, required — Reason for the scheduled forgetting, or null

## Other responses

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

## Changes

- **2026-04-07** `b5edd97adf4a` — 2 info
  - api tag `Content Management` added
  - api tag `Memories` removed
- **2026-03-26** `e519a815da91` — 5 info
  - added the new optional request property `allOf[subschema #2]/forgetAfter`
  - added the new optional request property `allOf[subschema #2]/forgetReason`
  - added the new optional request property `allOf[subschema #2]/temporalContext`
  - added the required property `forgetAfter` to the response with the `200` status
  - …1 more
- **2026-03-15** `b40318167017` — 1 breaking
  - request body became required
- **2026-03-12** `7386f0fb8043` — 1 warning
  - changed the pattern of the request property `allOf[subschema #1]/containerTag` from `^[a-zA-Z0-9_-]+$` to `^[a-zA-Z0-9_:-]+$`
- **2026-03-09** `8d6903994bad` — 1 breaking, 1 warning
  - added the pattern `^[a-zA-Z0-9_-]+$` to the request property `allOf[subschema #1]/containerTag`
  - the `allOf[subschema #1]/containerTag` request property's maxLength was set to `100`

[Change history](https://skmtc.dev/supermemoryai/apis/supermemory-api/changes/v4/memories/patch.md)

---

[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/f979eba02e97/schema)
