# PATCH /memory/:memory_id

**Resource:** [Agent Memory](./memory.md)  
**MCP tool:** `update_memory`  
**Scopes:** `memory:write`  
**Write operation:** yes

Update a memory in place — change content, metadata, tags, links, confidence, expiry, or visibility. Re-embeds automatically if content changes. For upsert semantics, prefer write_memory with the same key.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `memory_id` | path | string | yes |  |
| `content` | body | string | no |  |
| `metadata` | body | object | no |  |
| `linked_entities` | body | array | no |  |
| `tags` | body | array | no |  |
| `confidence` | body | number | no |  |
| `expires_at` | body | string | no |  |
| `visibility` | body | string | no |  |

## Request example

```bash
curl -X PATCH   "https://api.trustpager.com/functions/v1/api/v1/memory/:memory_id"   -H "Authorization: Bearer YOUR_API_KEY"   -H "Content-Type: application/json"   -d '{"content":"...","metadata":"...","linked_entities":"..."}'
```

---
Base URL: `https://api.trustpager.com/functions/v1/api/v1` — Auth: `Authorization: Bearer YOUR_API_KEY`