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

  1. You submit the document front (and back for two-sided IDs), optionally with country and docType hints.
  2. Sovera returns a checkId and a status of pending or processing.
  3. When the check finishes, status becomes a terminal value. Read it by attaching a sessionId and polling the session report, or via a webhook.

Submit a document

Images are base64-encoded. Only front is required.

POST
/v1/verify/document
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_id or passport.

  • 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.

Was this page helpful?