PUT /v1/memory_stores/{memory_store_id}/memories/{memory_id}
Updates the content of the specified memory entry. Each update automatically increments the version number and produces a version record.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
memory_store_id | string | Yes | Memory Store ID with the memstore_ prefix |
memory_id | string | Yes | Memory entry ID with the mem_ prefix |
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer $QODER_PAT |
Content-Type | Yes | application/json |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
content | string | Yes | New memory content |
version | integer | Yes | Current version number (OCC). Must match the server-side version. |
Example request
Example response
HTTP 200 OK Returns the updated MemoryEntry object.Response fields
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier |
type | string | Always "memory" |
store_id | string | Owning Memory Store ID |
path | string | Relative path (unchanged) |
content | string | Updated content |
size | int64 | New content size in bytes |
content_sha256 | string | SHA-256 hash of the new content |
version | int64 | Incremented version number |
metadata | object | Custom metadata |
created_at | string | Original creation time (unchanged) |
updated_at | string | Update time (ISO 8601) |
Errors
| HTTP | Type | Trigger |
|---|---|---|
| 401 | TOKEN_INVALID | Missing or invalid authentication token |
| 404 | not_found_error | Memory Store or memory entry does not exist |
| 409 | conflict_error | version mismatch (concurrent modification) |
Notes
- Each update increments
versionautomatically (e.g., 1 → 2). created_atis unchanged;updated_atis set to the current time.sizeandcontent_sha256are recomputed from the new content.- Each update produces a version record with
action: "updated". pathcannot be changed during update.