Upload a document image (ID front, ID back, or selfie) to a session via
the API. This enables document submission from native mobile apps or
custom UIs without using the hosted capture flow.
If a document of the same type already exists, it is replaced (idempotent).
If the session was in `pending` status, it transitions to `capturing`.
**Required scope:** `documents:write`
Request
This endpoint expects a multipart form containing a file.
filefileRequired
The document image file (JPEG, PNG, WebP, or PDF). Max 10MB.
document_typeenumRequired
The type of document being uploaded.
poa_document_typestringOptional
Proof-of-address document subtype (e.g. utility_bill, bank_statement). Required when document_type is proof_of_address.
poa_document_datedateOptional
Date on the proof-of-address document (YYYY-MM-DD).
Response
Document uploaded successfully.
idstring
Public ID of the uploaded document.
session_idstring
Public ID of the session.
document_typeenum
The type of document uploaded.
mime_typestring
MIME type of the uploaded file.
file_size_bytesinteger
Size of the uploaded file in bytes.
created_atdatetime
When the document was uploaded.