Skip to content
POST /knowledge/{id}/correction

Requires `use` on a shared wiki, or owning the personal wiki. With `fact`, on each page the first named claim is replaced by it and the other named claims are removed; with no `fact`, the named claims are retracted, moved word for word to their page's History as `Retracted YYYY-MM-DD: <claim>`. Nothing else changes, every page is written at once or none is, and the pages record the caller as the one who changed them. Audit `knowledge_base.wiki_corrected`. 400 for a `fact` that is not one plain line, carries a `[src:…]`/`[until:…]` marker, or reads as an instruction to an AI (`wiki_fact_injection`); 409 `wiki_claim_stale` (a page changed since the dry run), `wiki_correction_loss` (what it removes would erase most of a section), `wiki_unavailable`, `not_a_wiki`; 422 `wiki_redaction_failed`.

Path Parameters

idstring
required·

Resource id

Request Body

claim_idsstring[]

From GET /knowledge/claim, all on this wiki.

factstring

The corrected statement. Omit it to retract the claims.

Response Body

correction_idstring
knowledge_base_idstring
pagesobject[]
doc_idstring
external_keystring
versioninteger
version_beforeinteger
removedinteger
replacedinteger
retractedinteger
curl -X POST 'https://api.elaichi.ai/knowledge/<id>/correction' \
  -H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"claim_ids":[],"fact":"your_fact"}'
const body = {
  "claim_ids": [],
  "fact": "your_fact"
};

const response = await fetch('https://api.elaichi.ai/knowledge/<id>/correction', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer ' + process.env.ELAICHI_API_TOKEN,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(body),
});

const data = await response.json();
console.log(data);
import os
import requests

url = "https://api.elaichi.ai/knowledge/<id>/correction"
headers = {
    "Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
    "Content-Type": "application/json",
}
payload = {
    "claim_ids": [],
    "fact": "your_fact"
}

response = requests.post(url, headers=headers, json=payload)
print(response.json())