Update the content or metadata of a Memory entry.
Updates a Memory's content or metadata. Every update automatically produces a version snapshot with
HTTP 200 OK
Returns the updated Memory object, including
Memories in an archived Memory Store cannot be updated. The endpoint returns
operation=updated.
Include content_sha256 for optimistic concurrency control. If it does not match the current server-side content hash, a concurrent write has occurred and the endpoint returns 409. Omit the field to skip the check.
Path
POST /api/v1/forward/memory_stores/{memory_store_id}/memories/{memory_id}
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer <PAT or admin SAT> |
Content-Type | Yes | application/json |
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
memory_store_id | string | Yes | Memory Store ID (memstore_...). |
memory_id | string | Yes | Memory ID (mem_...). |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
content | string | Yes | New plain-text UTF-8 content. The raw content is limited to 100 KiB. See Content constraints. |
content_sha256 | string | No | Expected SHA-256 of the current content for optimistic concurrency control. A mismatch returns 409. |
metadata | object | No | New metadata. It replaces the current metadata instead of being merged. Omit it to preserve the current metadata. See Memory metadata constraints. |
path cannot be updated. To change it, delete the original Memory and create a new one.
Example request
Example response
HTTP 200 OK
Response
Returns the updated Memory object, including content.
Notes
Memories in an archived Memory Store cannot be updated. The endpoint returns 409.
Errors
| HTTP | Type | Trigger |
|---|---|---|
| 400 | invalid_request_error | content is missing or invalid, exceeds 100 KiB, contains non-printable control characters, or metadata violates its constraints. |
| 401 | authentication_error | The authentication token is missing or invalid. |
| 403 | permission_error | The caller cannot access the resource. |
| 404 | not_found_error | The Memory Store or Memory does not exist, or is not visible across users. |
| 409 | conflict_error | content_sha256 does not match the current content because of a concurrent write, or the Store is archived. |
| 500/502/503 | api_error | Forward or a dependent service failed. |