---
title: "Update Memory"
method: PATCH
path: "/memories/{memory_id}"
tags: ["Memories"]
---

# Update Memory

`PATCH /memories/{memory_id}`

## Request

- Base URL: `https://api.getmetacognition.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.getmetacognition.com/memories/{memory_id}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/metacognition/apis/tex-api/docs/memories/:memory_id/patch.ts> (a function with typed inputs; its response is checked against the schema)

Update a memory's content and/or metadata.

If content is changed, the HNSW vector is re-embedded automatically.
Metadata is merged (not replaced) — only specified keys are updated.

Optional `scope` ("<kind>:<value>") stamps the write; must be within the
caller's visible scopes (403 otherwise). Defaults to user:<user_id>.

## Path parameters

- `memory_id` string, required

## Request body

- MemoryUpdateRequest: Request to update a memory's content or metadata.
  - `content` string, nullable: Memory text (at most 65536 characters and 8191 tokens)
  - `metadata` object, nullable: Properties to merge
  - `scope` string, nullable: Optional explicit write scope "<kind>:<value>" (kinds: user/team/org/project). Must be within the caller's visible scopes; defaults to user:<user_id>.

## Response `200`

Successful Response

- MemoryResponse: A single memory/document object.
  - `id` string, required: Memory ID (UUID)
  - `user_id` string, nullable: Owner user ID
  - `type` string: Memory type: document, episode, preference
  - `label` string: Graph label
  - `content` string, nullable: Text content or summary
  - `status` string: Lifecycle status
  - `metadata` object, nullable: Additional properties
  - `created_at` string, nullable: Creation timestamp (ISO)
  - `updated_at` string, nullable: Last update timestamp (ISO)
  - `contexts` string[], nullable: Context sentences the entity appeared in (GET by id only; additive)
  - `inferences` string[], nullable: Inference text generated for this node (GET by id only; additive)

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/metacognition/apis/tex-api.md) - [All operations](https://skmtc.dev/metacognition/apis/tex-api/llms.txt) - [OpenAPI document](https://skmtc.dev/metacognition/apis/tex-api/revisions/3bef47e50f2e?raw)
