---
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
- `503` — Server too busy: the per-pod in-flight request cap was exceeded. Retry per the `Retry-After` header.

## Changes

- **2026-08-24** `9f1598713067` — 1 info
  - added the non-success response with the status `503`
- **2026-06-16** `52b41ab517b6` — 1 info
  - added the new optional request property `dryRun`
- **2026-06-08** `741d58b9ef89` — 1 warning
  - removed the request property `dryRun`

[Change history](https://skmtc.dev/surrealdb/apis/spectron/changes/api/v1/:context_id/forget/post.md)

---

[API](https://skmtc.dev/surrealdb/apis/spectron.md) · [All operations](https://skmtc.dev/surrealdb/apis/spectron/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/surrealdb/spectron/revisions/9f1598713067/schema)
