POST /v1/forget is Haki’s minimal erasure endpoint. Every call is
journaled in forget_receipts and the response carries the receipt id
plus exact counters of what actually happened.
Two scopes, exactly one per call
The request must supply exactly one of the two (validated by Pydantic at the HTTP level, and again by the Ledger for direct, non-HTTP callers such as the MCP tools) — otherwiseinvalid_forget_scope.
Two modes
- disable — reversible
- delete — real erasure
- One fact: transitions to
disabled(can becomeactiveagain later). - One subject: every
activeorcandidatefact of the subject moves todisabled. History stays intact.
The receipt
Every call creates aforget_receipts row and returns:
facts_disabled stays 0 on a delete, for instance. Forgetting is
also audited (policy.audit_forget, structured haki.policy JSON
line) on every call, regardless of mode.
Typed errors
fact_not_found (404 — including a fact from another project: same
error as an unknown id, no cross-project leak) and
invalid_forget_scope (422 — neither or both of fact_id/subject_id,
or an unknown mode).
API reference — Forget
POST /v1/forget: exact request and response schema.
