Menu
SDK steps (session token)
Upload document images
/v1/sessions/{id}/documents/imagesUploads the front (required) and back, multipart/form-data. The back is required where requires_back is true (ID cards, residence permits, US/Canadian documents); a passport or driving licence has none.
Authorization: Bearer JWT (session token, SDK)
| ERROR | WHEN |
|---|---|
| 413 image.too_large | A file is over 20 MB. A request over 20 MB in total is stopped earlier by our gateway: 413 with an HTML body |
| 415 image.unsupported_format | Not JPEG, PNG, WebP or HEIC/HEIF (the format is read from the bytes, not the name) |
| 422 image.corrupt · image.too_many_pixels | Cannot be decoded, or over 50 megapixels |
| 422 back_image_required | Back missing for a document that needs it |
| 422 image.unprocessable | The image could not be processed safely |
| 409 | The session is not in document_pending: Submit document details was not called first, or images were already uploaded |
| 409 consent.required | The end user's consent is not recorded: Record consent first |
If one file is refused nothing is stored and the step does not change. Files are re-encoded on our side; their metadata (EXIF, GPS) is not kept.
The result arrives by webhook (document.verified · document.rejected · document.review_required); the SDK polls Get result. With modules: ["document"] a passing document approves the session directly and only session.approved is sent. US and Canadian documents are checked from their barcode, which is not signed: they always go to review.
curl -X POST https://api.idotta.com/v1/sessions/{id}/documents/images \
-H "Authorization: Bearer <access_token>" \
-F "front=@front.jpg" \
-F "back=@back.jpg"// multipart/form-data
front: <image> // required (passport: the photo page)
back: <image> // where requires_back is true
// Response 202
{ "status": "document_processing" }