Update Memory
Replace one or more supported descriptive fields on a scoped memory and receive the updated Memory.
Endpoint and request fields
| Field | Type | Contract |
|---|---|---|
memory_id / memoryId | integer | Required positive memory ID in the path or first SDK argument. |
tags | string[] | Optional replacement tags; use an empty array to clear. |
importance | number | Optional value from 0 to 1. |
metadata | object | Optional replacement application metadata. |
source | string | Optional replacement source label. |
event_type / eventType | string | Optional replacement event label. |
Provide at least one editable field.
Update descriptive fields
import osfrom memorysync import MemorySyncClientclient = MemorySyncClient(api_key=os.environ["MEMORYSYNC_API_KEY"],base_url="https://api.memorysync.io",project_id=os.environ["MEMORYSYNC_PROJECT_ID"],end_user_id="usr_7f3a9c2e",)memory = client.update(101,tags=["preference", "ui"],metadata={"confirmed": True},)
Result paths
Updated Memory
The response is the updated Memory record, not only the submitted fields.
- Identity
- Python `memory.id`; Node.js `memory.id`; REST `id`
The original memory ID.
- Updated fields
- `tags`, `importance`, `metadata`, `source`, `event_type` / `eventType`
Supported descriptive fields.
- Unchanged content
- `text`
Text is not editable through this operation.
- Timestamp
- `updated_at` / `updatedAt`
Update time when available.
{"id":101,"text":"The user uses dark mode.","tags":["preference","ui"],"source":"chat","event_type":null,"importance":null,"metadata":{"confirmed":true},"is_summary":false,"created_at":"2026-05-04T12:30:11Z","updated_at":"2026-05-04T12:40:00Z"}
Errors and next action
Provide a positive ID and at least one editable field. Correct 404 scope or ID issues and other 4xx validation errors. For an interrupted request, fetch the memory before deciding whether another update is needed.
Safety notes
Understand update semantics
| Field | Update behavior |
|---|---|
tags | Replaces the tag list; pass an empty array to clear it. |
importance | Sets a value from 0 to 1. |
metadata | Replaces customer-controlled metadata values accepted by the operation. |
source | Replaces the application source label. |
event_type / eventType | Replaces the application event label. |
text | Not editable through Update. |
Use a read-modify-write workflow
- 01
Fetch
GETGet the current record when your decision depends on existing values.
- 02
Validate
CHECKValidate replacement fields in your application.
- 03
Update
PATCHSend at least one editable field.
- 04
Use
200Read the returned updated Memory rather than assuming the submitted shape.
- 05
Reconcile
SAFEAfter an interrupted response, fetch before deciding to repeat.