Skip to main content
POST
Read documents

Authorizations

Authorization
string
header
required

API key created in the console. Scopes: kyc:extract, kyc:verify, kyc:eid; bank:read, bank:write (Growth plan, enabled per workspace by Sahl).

Body

multipart/form-data

1 to 5 files per call. JPEG, PNG, WebP, TIFF or PDF, up to 30 MB each.

files
file[]
required

1 to 5 files. JPEG, PNG, WebP, TIFF or PDF, up to 30 MB each. The content must match the declared type.

doc_type
string | null

Hint for the reader about which document this is, for example payslip or national_id. Applies to every file in the call, so send one document type per call.

Example:

"payslip"

step_key
string | null

Stable name of your upload step, for example photo_id or proof_of_address. It decides which document types the step accepts. Optional.

Example:

"proof_of_address"

reference
string | null

Your own id for the client: 1 to 64 characters of A-Z a-z 0-9 _ . : -. With one, the files, the fields and the verdict are filed on a case in your workspace. Without one, nothing is filed.

Example:

"client-0001"

environment
enum<string>
default:sandbox

sandbox (default) or production. Cases are separate per environment.

Available options:
sandbox,
production
Example:

"sandbox"

subject
string | null

Client name for the case, up to 255 characters.

Example:

"Test Client"

kind
string | null

Client kind: individual, corporation, partnership, charitable_org, trust, estate. Picks the individual or entity policy thresholds. Omitted, the individual policy applies.

Example:

"individual"

Response

OK

fields
object
required

Fields merged across the files of the call. The first non-empty value wins, in file order, so send the strongest identity document first.

documents
ExtractedDocument · object[]
required
field_count
integer
required

Number of keys in fields.

checks
Check · object[]
required

The per-document checks of every file, in one list.

reader_unavailable
boolean
required

True when at least one file was never read (a problem on the Sahl side). It does not mean the document was blank.

policy
PolicyBlock · object
required

Which workspace policy the call ran under, and which request switches it refused.

case_id
string<uuid>

Only with a reference.

document_ids
string<uuid>[]

Only with a reference. Same order as documents.