---
title: "Edit Memory"
method: PATCH
path: "/api/memory/{memory_id}"
tags: ["memory", "memory"]
---

# Edit Memory

`PATCH /api/memory/{memory_id}`

## Request

- Base URL: `https://api.dialogbrain.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.dialogbrain.com/api/memory/{memory_id}`
- Auth: none declared

Edit value. Promotes the row to source='user_edit', confidence=1.0
so it becomes load-bearing and protected from distiller supersession.

Permission: ADMIN (owner+admin).

## Path parameters

- `memory_id` integer, required

## Request body

- MemoryEditIn
  - `value` object, required: New JSONB value

## Response `200`

Successful Response

- MemoryRowOut
  - `id` integer, required
  - `agent_id` integer, required
  - `scope` string, required
  - `scope_ref_id` string, nullable, required
  - `memory_type` string, required
  - `key` string, required
  - `value` object, required
  - `source` string, required
  - `confidence` number, required
  - `source_message_ids` integer[], nullable
  - `created_at` string, nullable
  - `updated_at` string, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/dialogbrain/apis/dialogbrain-v2-api-gateway.md) · [All operations](https://skmtc.dev/dialogbrain/apis/dialogbrain-v2-api-gateway/llms.txt) · [OpenAPI document](https://skmtc.dev/dialogbrain/apis/dialogbrain-v2-api-gateway/revisions/77bef09a9209?raw)
