Corrects a document by saying what is wrong with it.
Runs the knowledge base's editor agent over the article and the supplied instruction, and applies what it returns as a `CORRECTED` revision naming both the caller and the agent. The editor may decline — when the instruction needs a fact it was not given, or is about a claim the article does not make — in which case nothing is written and the reason is returned instead. A correction to a published document returns it to `DRAFT`: the caller wrote the instruction, the agent wrote the prose, and nobody has read the prose yet. `returnedToDraft` says when that happened, and the change reaches the index once the document is published again.
Authorization
Bearer JWT Authorization header using the Bearer scheme. Enter 'Bearer' [space] and then your token.
In: header
Path Parameters
The knowledge base id.
uuidThe document id.
uuidThe tenant identifier
What is wrong with the article, in the reviewer's own words.
What is wrong, in the reviewer's own words. This is the specification — the editor applies it rather than inferring it — so plain prose is the right shape, not a structured reason code.
1 <= length <= 4000Response Body
curl -X POST "https://api.fruxon.com/v1/tenants/string/knowledgeBases/497f6eca-6276-4993-bfeb-53cbbbba6f08/documents/497f6eca-6276-4993-bfeb-53cbbbba6f08:correct" \ -H "Content-Type: application/json" \ -d '{ "instruction": "string" }'{
"outcome": "APPLIED",
"reason": "string",
"document": {
"id": "00000000-0000-0000-0000-000000000000",
"knowledgeBaseId": "00000000-0000-0000-0000-000000000000",
"title": "string",
"bodyMarkdown": "string",
"status": "DRAFT",
"locale": "string",
"tags": [
"string"
],
"metadata": {},
"sourceConversationIds": [
"string"
],
"lastReviewedAt": 0,
"lastReviewedBy": "string",
"createdAt": 0,
"modifiedAt": 0
},
"executionRecordId": "00000000-0000-0000-0000-000000000000",
"returnedToDraft": false
}{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"property1": null,
"property2": null
}{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"property1": null,
"property2": null
}