Rejected files

Some files can't be turned into a document at all.

A rejection is a problem with the file itself — not with the extraction — and Invofox tells you which file failed and why.

A file is rejected when Invofox can’t read it: a password-protected PDF, a corrupted file, or an unsupported format inside a ZIP (e.g. a .pptx or .exe). The file produces no document; instead a file.rejected webhook fires with the reason in its error field. (A direct upload of an unsupported type is refused up front with a 400, before anything is created.)

Listen for file.rejected to catch these in your pipeline. Your clientData is included, so you can correlate the rejection with your own records.

A rejected file fires only file.rejected — never document.processed, and it never appears via polling. If you don’t handle this event you’ll wait indefinitely for a document that will never arrive.

Error codes

When a File reaches rejected status, its error field contains one of the following codes:

Error codeDescription
ERR_DOWNLOADING_FILEError downloading file from source
ERR_UNSUPPORTED_FILE_FORMATFile format not supported
ERR_UNSUPPORTED_UNCOMPRESSED_FILE_FORMATUncompressed file format not supported (extracted from an archive)
ERR_ZIP_ENCRYPTEDZIP file is password-protected or encrypted
ERR_INSUFFICIENT_CREDITSNot enough credits in the account to process this file
ERR_IMAGE_TOO_SMALLImage dimensions are below the minimum supported (min 50×50px)
Additional error codes may be added in future versions. The code is always returned as a string in the error field for programmatic handling.

The error field tells you what happened. Two common cases:

file.rejected · password-protected PDF
1{
2 "type": "file.rejected",
3 "id": "6a34b45c8947a908cf3c0640",
4 "timestamp": "2026-06-19T03:15:41.826Z",
5 "data": {
6 "id": "6a34b45c8947a908cf3c0640",
7 "importId": "6a34b45c8947a908cf3c063d",
8 "status": "rejected",
9 "filename": "invoice.pdf",
10 "error": "ERR_PASSWORD_PROTECTED", // ← the PDF is locked with a password
11 "clientData": { "internalId": "inv-1234" }
12 }
13}
file.rejected · unsupported format inside a ZIP
1{
2 "type": "file.rejected",
3 "id": "6a3521072f63bbec693e72df",
4 "timestamp": "2026-06-19T10:59:19.241Z",
5 "data": {
6 "id": "6a3521072f63bbec693e72df",
7 "importId": "6a3521061a05f30cb212cb78",
8 "status": "rejected",
9 "filename": "notes.pptx",
10 "error": "ERR_UNSUPPORTED_UNCOMPRESSED_FILE_FORMAT", // ← a .pptx extracted from the ZIP isn't a supported type
11 "clientData": { "internalId": "inv-1234" }
12 }
13}