Menu

SDK steps (session token)

Upload document images

POST/v1/sessions/{id}/documents/images

Uploads 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)

ERRORWHEN
413 image.too_largeA 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_formatNot JPEG, PNG, WebP or HEIC/HEIF (the format is read from the bytes, not the name)
422 image.corrupt · image.too_many_pixelsCannot be decoded, or over 50 megapixels
422 back_image_requiredBack missing for a document that needs it
422 image.unprocessableThe image could not be processed safely
409The session is not in document_pending: Submit document details was not called first, or images were already uploaded
409 consent.requiredThe 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.

Request
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"
JSON
// multipart/form-data
front: <image>   // required (passport: the photo page)
back:  <image>   // where requires_back is true

// Response 202
{ "status": "document_processing" }