---
title: "Forget Fact"
method: POST
path: "/v1/facts/{fact_id}/forget"
tags: ["v1"]
---

# Forget Fact

`POST /v1/facts/{fact_id}/forget`

## Request

- Base URL: `https://api.korely.ai`
- URL: `https://api.korely.ai/v1/facts/{fact_id}/forget`
- Auth: HTTP bearer

Close a fact: it stops being current, and stays in history.

The half of the contract that was missing. Facts could be read and written
over `/v1` and only closed from the dashboard, so an agent could assert
what it had learned and never retract it. Everything it got wrong stayed
true forever unless a model happened to notice the contradiction.

With this, an agent that knows a fact is finished says so, and nothing has
to infer it. This call asks no model. Writing a fact is another matter:
`POST /v1/facts` asks the model for the vocabulary and the contradiction
check whenever a model key is configured, and that judge may close an
earlier fact on its own. Only an install with no model key writes facts
with no model.

`at` is the date it stopped being true, not the date you noticed. Reading
`as_of` a date before it still returns the fact, which is the whole point of
keeping history instead of deleting rows.

Idempotent: forgetting a fact that is already closed changes nothing and
says so.

## Path parameters

- `fact_id` string, required

## Request body

- ForgetBody: Closing a fact. Everything optional: the common case is a bare POST.
  - `at` string, nullable: ISO date/datetime it STOPPED being true. Defaults to now. This is the date of the change, not the date you noticed it: set it to when the world changed and `as_of` before that still returns the fact. Equal to the fact's `valid_from` it retracts the fact (true at no moment, kept in the history); earlier is a 422. With no `at`, a fact dated ahead ends at its own start, never before it.

## Response `200`

Successful Response

- ForgetResponse
  - `id` string, required
  - `status` string, required
  - `invalid_at` string, nullable
  - `audit_id` string, nullable

## Other responses

- `401`: `invalid_key`: the `Authorization: Bearer` key is missing, unknown, revoked or expired.
- `403`: `forbidden`: the key lacks the scope this operation needs; `message` names it.
- `404`: `not_found`: nothing with that id is reachable with this key.
- `413`: `payload_too_large`: the body is larger than 2,097,152 bytes, the most this route takes. Refused before it is read; nothing was done.
- `422`: `invalid_request`: the body, a query parameter or a path parameter is malformed (`detail` is the list of fields that failed, `message` names the first), or the endpoint refuses a value (an empty content, an unreadable timestamp; `detail` is a sentence or `{code, message}`).
- `429`: `rate_limit_exceeded`: past the request ceiling, the per-minute one set on this install (`RATE_LIMIT_PER_MINUTE`) or, on the hosted service, the plan's minute, hour or day; `message` names the window and `Retry-After` the seconds until it resets.
- `500`: `internal_error`: the server failed on this request; `message` holds no detail of it.
- `503`: A dependency did not answer: the database while the key was checked (`unavailable`, see `Retry-After`), or the one `code` names. Nothing was written; retry.

---

[API](https://skmtc.dev/korely/apis/korely-agents-api.md) · [All operations](https://skmtc.dev/korely/apis/korely-agents-api/llms.txt) · [OpenAPI document](https://skmtc.dev/korely/apis/korely-agents-api/revisions/8a40bf09eca1?raw)
