Document
Document verification checks that an identity document is genuine and readable. Because a document check does more work than a single face comparison, it is asynchronous: you submit the images and receive a checkId with a status you poll or resolve via webhook. It requires the verify:document scope.
How document checks work
- You submit the document
front(andbackfor two-sided IDs), optionally withcountryanddocTypehints. - Sovera returns a
checkIdand astatusofpendingorprocessing. - When the check finishes,
statusbecomes a terminal value. Read it by attaching asessionIdand polling the session report, or via a webhook.
Submit a document
Images are base64-encoded. Only front is required.
FRONT=$(base64 -i id-front.jpg | tr -d '\n')
BACK=$(base64 -i id-back.jpg | tr -d '\n')
curl -X POST https://verify.lioncapventures.com/v1/verify/document \
-H "Authorization: Bearer svk_live_xxxxxxxx" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d "{
\"front\": \"$FRONT\",
\"back\": \"$BACK\",
\"country\": \"ZW\",
\"docType\": \"national_id\"
}"
- Name
front- Type
- string (required)
- Description
Base64-encoded front of the document.
- Name
back- Type
- string
- Description
Base64-encoded back, for two-sided documents.
- Name
country- Type
- string
- Description
ISO 3166-1 alpha-2 country code hint, for example
ZW.
- Name
docType- Type
- string
- Description
Document type hint, for example
national_idorpassport.
- Name
sessionId- Type
- string
- Description
Optional session to record the result against.
Response
Response
{
"checkId": "doc_71ac93",
"status": "processing",
"detail": "queued_for_review"
}
- Name
checkId- Type
- string
- Description
Identifier for this document check.
- Name
status- Type
- string
- Description
The check state, for example
pending,processing, or a terminal result.
- Name
detail- Type
- string
- Description
A short human-readable label for the current state.
Document checks are asynchronous. Do not block a user on the result. Continue the flow and resolve the outcome from the session report or a webhook.