API reference
Repair a file
Returns the repaired file, or the bytes you sent when nothing needed fixing. A changed file is only returned once the Open XML SDK accepts it.
POST
https://api.ihatecorruptfiles.xyz/v1/repairRequest
The same as /v1/check: a bearer key and the file as multipart/form-data.
- filefile · required
- The .xlsx, .docx, .pptx, .xls, .doc or .ppt, as multipart/form-data. Up to 50 MB. Old formats come back as .xlsx, .docx or .pptx.
Response
200 with the file as the body and the content type of its format. When the file can't be repaired the answer is a problem instead — most often 422 openxml_validation_failed or 422 encrypted_package — so check the status before saving the body.
- X-Repair-Changed"true" | "false"
- false means the bytes are exactly the ones you sent.
- X-Repair-Levelstring
- The last stage that changed something, or NONE.
- X-Repair-Actionsbase64 JSON
- {"total", "by_stage", "codes"}: how many changes, per stage, and the fix codes.
- Content-Dispositionstring
- attachment; filename="<name>-repaired.<ext>"