## Patch Memory **patch** `/v1/memories/{memory_id}/` Update memory text — supersedes old + creates new. Metadata-only patches (no `text`) are rejected with 400; the row's metadata is derived from extraction and isn't editable from the API yet. ### Path Parameters - `memory_id: string` ### Body Parameters - `metadata: optional unknown` - `text: optional string` ### Returns - `MemoryItem object { id, memory, agent_id, 7 more }` One result item — used in flat search `results` and listings. - `id: string` - `memory: string` - `agent_id: optional string` - `categories: optional array of string` - `conv_id: optional string` - `created_at: optional string` - `metadata: optional unknown` - `score: optional number` - `updated_at: optional string` - `user_id: optional string` ### Example ```http curl https://api.example.com/v1/memories/$MEMORY_ID/ \ -X PATCH \ -H 'Content-Type: application/json' \ -H "x-api-key: $XTRACE_MEMORY_MANAGER_API_KEY" \ -H "X-Org-Id: $XTRACE_MEMORY_MANAGER_ORG_ID" \ -d '{}' ``` #### Response ```json { "id": "id", "memory": "memory", "agent_id": "agent_id", "categories": [ "string" ], "conv_id": "conv_id", "created_at": "created_at", "metadata": {}, "score": 0, "updated_at": "updated_at", "user_id": "user_id" } ```