CortexDB Docs
API Reference

POST /v1/forget

Selective deletion — remove derived layers or redact events, with an audit record.

POST
/v1/forget
AuthorizationBearer <token>

PASETO v4 public token (or deployment gate key). Auth-disabled dev instances accept any caller.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X POST "https://example.com/v1/forget" \  -H "Content-Type: application/json" \  -d '{    "scope": "string",    "layers": [      "string"    ],    "selector": {},    "cascade": "derived_only"  }'
Empty
POST
/v1/forget/preview
AuthorizationBearer <token>

PASETO v4 public token (or deployment gate key). Auth-disabled dev instances accept any caller.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/v1/forget/preview" \  -H "Content-Type: application/json" \  -d '{    "scope": "string"  }'
{  "preview_id": "string",  "scope": "string",  "estimated_deleted": {    "events": 0,    "episodes": 0,    "facts": 0,    "beliefs": 0,    "understanding": 0  }}

Accepted fields

idempotency_key is not a forget field; reason and from_preview_id are

The accepted body is exactly scope, layers, selector, cascade, confirm_all, audit_note, reason, from_preview_id. idempotency_key is rejected422 "unknown field idempotency_key". Two fields the v1 docs omitted are real: reason (the SDKs use this name) and from_preview_id (consume a forget/erasure preview).

Cascade and confirmation

  • cascadederived_only (default) — removes derived layers, leaves events intact — or redact_events, which removes event content so the events no longer appear in recall. A bogus value → 422 "expected derived_only or redact_events".
  • An empty selector requires confirm_all: true, else 422 EMPTY_SELECTOR_WITHOUT_CONFIRMATION (uppercase, enforced).

invalid_selector is not enforced

The v1 docs claimed combining memory_ids + about_subject422 invalid_selector. Live it returns 200 (matching 0). Don't rely on that guard. Other error codes are uppercase (POLICY_DENIED, FORGET_BACKEND_FAILED).

Response

The response is { deleted{…}, matched, audit_id, warnings[] } (+ requested when memory_ids is given). The matched / requested / warnings fields are undocumented but useful — warnings explains, for example, that raw events were not deleted under cascade=derived_only and points to redact_events or /v1/erasures for true event deletion.

Forget vs erasures

/v1/forget is for operational deletion (derived layers, event redaction). For GDPR reference-counted WAL deletion with a preview → execute → status lifecycle, use /v1/erasures. The SDKs rename forget's fields — see the Python and TypeScript SDK pages.

On this page