Skip to main content
Before storing a document, the Upload a document for an application endpoint validates the filename and file bytes. For upload steps, see Upload documents.

Read limits from the schema

Each file field can set its own types and size. Retrieve the application schema (GET /v1/onboarding/partner/applications/{applicationId}/schema) and read x-fileUpload on the target field:
If x-fileUpload is absent, the API uses the defaults in the following tables.

Filename

The API keeps the last path component of fileName when it contains / or \, then trims spaces at each end before validating the remaining name. For example, folder/passport.pdf is stored as passport.pdf. Commas, quotes, and other punctuation outside the allowlist fail the character check if they remain in the filename.

File type

The API reads magic bytes in fileContent. It doesn’t trust the Content-Type header. Known signatures are PDF, JPEG, PNG, ZIP (Office Open XML), and OLE2 (legacy Office). A file with no matching signature returns unrecognized_type. Office files (DOC, XLS, DOCX, XLSX) pass only when the field schema lists those types. The default list doesn’t include them.

File size

A file over the limit returns too_large.

Error codes

The following checks normally return HTTP 400 with numeric code 181102. The body includes errors with field and code.