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

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

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

Erase everything tagged under a scope subtree (GDPR forget). Requires the `memory:forget` grant over the subtree.

## Path parameters

- `context_id` string, required

## Request body

- ScopeForgetRequestJson — Body for `POST /{context}/scopes/forget` — the scope subtree to erase.
  - `path` string, nullable — Scope path whose subtree should be forgotten, e.g. `user/stu/`.

## Response `200`

- ForgetScopeResponseJson — Response for `POST /{context}/scopes/forget`.
  - `forgotten` integer, required — Number of fact rows erased across the scoped tables.

## Other responses

- `400` — Missing or invalid scope path
- `401` — Unauthorized
- `403` — Forbidden — `memory:forget` grant required
- `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)
