data field. There is no separate upload endpoint — the whole submission goes up in one POST /partners/kyb request.
Accepted Formats
The declared
content_type must match the actual bytes — a PNG must be sent as image/png, not image/jpeg, or the file is rejected with MEDIA_TYPE_MISMATCH. Password-protected PDFs are rejected with FILE_ENCRYPTED; decrypt before encoding. A file type outside this list is rejected with 415.
Limits
Base64 encoding increases payload size by roughly one third, so budget against the 40 MB ceiling when attaching several large scans. Downscale image scans rather than splitting a submission — a partial submission still consumes the one-record slot.
A body over 40 MB is rejected with
400, not 413. The signature middleware reads the body before the handler runs, and the cap is enforced ahead of that read, so an oversized body is never fully buffered.Encoding a File
data field, with no data URI prefix:
Where Each Document Goes
Company documents (types1–9) go in the top-level documents[] array. Personal identity documents (types 10 passport and 11 citizen ID) go in persons[].documents[], attached to the person they identify. A citizen ID front and back are two files in one document, not two documents.
HTTP Status Codes
Rate limiting (
429) is not implemented for these endpoints.
Reading a 422 Response
Validation runs over the whole submission, so a single422 reports every problem at once — you only need one round to see everything.
The per-field violations ride inside detail as a JSON-encoded string, not as a nested object. Parse detail to read them:
detail reads:
target is a JSON pointer into the request body, and counting starts at 0: /persons/0/id_type is the id_type of the first person, and /documents/2/files/0 is the first file of the third company document. target is empty when the violation concerns the body as a whole.
Validation Detail Codes
See Submission Rules for what triggers the cross-field codes.