---
title: "POST /api/v1/{context_id}/forget"
method: POST
path: "/api/v1/{context_id}/forget"
---

# POST /api/v1/{context_id}/forget

`POST /api/v1/{context_id}/forget`

Semantic forget: finds matching memories by similarity and soft-deletes them

## Path parameters

- `context_id` string, required

## Request body

- ForgetRequestJson
  - `dryRun` boolean — When `true`, the handler computes and returns the would-be deletion count (`deleted`) without writing anything — the preview side of a preview-then-confirm flow. When omitted or `false`, matching memories are soft-deleted immediately.
  - `purge` boolean — Phase 10.7 — right-to-be-forgotten. When `true`, the handler also removes the supersession history (rows with `valid_until` set) that match the same scope/entity criteria. When omitted or `false`, prior rows are retained for audit even after the current row is soft-deleted.
  - `query` string, required

## Response `200`

- ForgetResponseJson
  - `deleted` integer, required

## Other responses

- `400` — Invalid request
- `401` — Unauthorized
- `422` — Invalid context id

---

[API](https://skmtc.net/surrealdb/apis/spectron.md) · [All operations](https://skmtc.net/surrealdb/apis/spectron/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/surrealdb/spectron/versions/52b41ab517b6/schema)
