API reference
Check a file
Diagnoses a file without changing it: a verdict, whether Office opens it, what is wrong, and every change a repair would make.
POST
https://api.ihatecorruptfiles.xyz/v1/checkRequest
Authenticate with Authorization: Bearer <key>. The body is multipart/form-data with a Content-Length.
- filefile · required
- The .xlsx, .docx or .pptx, as multipart/form-data. Up to 50 MB.
Response
200 with a JSON result, whatever the verdict — a broken file is a successful check. Errors are problem details.
- request_idstring
- Quote this if you contact us about a request.
- format"xlsx" | "docx" | "pptx"
- The file's format.
- bytesinteger
- Size of the uploaded file.
- verdictstring
- One of the six verdicts below.
- opens_in_officeboolean | null
- Whether Office opens the file as uploaded; null when that is not known.
- repairableboolean
- True when /v1/repair would return a changed, valid file.
- repair_levelstring | null
- The last repair stage that would change something, e.g. XML, SCHEMA, SEMANTICS.
- findingsFinding[]
- What is wrong with the file as uploaded.
- actionsRepairAction[]
- Every change a repair makes, or would make.
- reasonstring | null
- Why an unsupported file was refused.
- engine_versionstring
- Version of the repair engine that answered.
Verdicts
- ok
- Valid, and Office opens it. Nothing to do.
- tolerated
- Breaks the standard in a way Office accepts. Left alone.
- unconfirmed
- Breaks the standard; this case has not been checked against Office.
- needs_repair
- Opens, but something inside is wrong — a total, a type, a link. Repairable.
- broken
- Office refuses it or shows its repair prompt.
- unsupported
- Encrypted, a renamed pre-2007 file, or empty. See reason.
Finding
- codestring
- Stable identifier, e.g. an Open XML SDK error id.
- severity"blocks" | "tolerated" | "unconfirmed"
- blocks: Office refuses or repairs it. tolerated: Office opens it anyway. unconfirmed: not yet checked against Office.
- partstring | null
- Package part, e.g. /xl/styles.xml.
- locationstring | null
- XPath, or line and column.
- messagestring
- What is wrong, in words.
RepairAction
- stagestring
- The stage making the change: container, xml, identity, package, semantics, schema and so on.
- codestring
- What was wrong, e.g. Sem_NumberStoredAsText.
- fixstring
- What the repair does, e.g. convert-text-to-number.
- descriptionstring
- The change, in words, with the cells or parts affected.
- partstring | null
- The part changed.
- locationstring | null
- Where in the part.
- advisoryboolean
- Reported only: the file is not changed for it.