Patch Memory
Partial update of a memory by UUID (Issue #439).
Accepts any subset of summary/content/type/importance/ tags/details. Omitted fields preserve their current value; tags follows replace-all semantics. expected_version (#2043) makes the patch conditional on the memory's current version.
Status codes: 200: Updated successfully. Body is the full ReferenceResponse. 404: Memory does not exist OR the caller lacks access (existence is intentionally not leaked). 409: expected_version is not the memory's current version (details.reason = version_conflict, details. current_version); nothing was written (#2043). 410: Memory was soft-deleted; the tombstone exists but the resource is gone. Distinguishing 410 from 404 lets clients stop retrying. 422: Request body validation failed (empty patch, importance out of range, summary < 10 chars, etc.). 429: The patched memory's post-patch size exceeds MAX_CONTENT_SIZE (1MB) — same envelope as remember / update_memory.
Permission: same envelope as forget — PermissionService. can_access_memory (workspace member for shared, creator for private).
Embedding regeneration: triggered only when summary or content changes. Runs on the same async-task pipeline as the remember path (process_pending_embedding); this PATCH does not block on embedding completion. Neural edges anchored on this memory are invalidated when re-embed fires.
Example: PATCH /api/v1/memory/550e8400-e29b-41d4-a716-446655440000 Authorization: Bearer <session_token> Content-Type: application/json
{"importance": 0.9, "tags": ["python", "auth"]}
Request
- Base URL: https://memory.kagura-ai.com (the document declares no server; this is the origin it was published from)
- URL: https://memory.kagura-ai.com/api/v1/memory/{memory_id}
- Auth: none declared
Path parameters
Headers
Request body
Response
Successful Response
Changes
No recorded changes to this operation across all 2 revisions of this API.