Documents and media
The Tenant API exposes endpoints to fetch information about supported document types and to access uploaded media files (document photos, selfies). Files are uploaded automatically during verification on the KnowaKYC side.
Supported document types
Returns the list of document types supported by the platform, with the country list and accepted formats. Required scope: documents:read.
ApiKeyAuthAuthorization<token>HMAC-SHA256 Credential=<key_id>, Signature=<hex_signature>. SignedHeaders=x-timestamp is optional. Requires X-Timestamp header.
X-Timestamp*stringUnix timestamp (seconds, max 5 min drift)
Supported documents list
application/json- response
data?unknownsuccess?booleancurl -X GET 'https://example.com/tenant/v1/kyc/documents/supported' \ -H 'X-Timestamp: string'{ "data": null, "success": true}Fetching a media file
Returns a signed download URL for a media file by its identifier. Required scope: media:read.
ApiKeyAuthAuthorization<token>HMAC-SHA256 Credential=<key_id>, Signature=<hex_signature>. SignedHeaders=x-timestamp is optional. Requires X-Timestamp header.
media_id*stringMedia UUID
X-Timestamp*stringUnix timestamp (seconds, max 5 min drift)
Presigned URL
application/json- response
data?unknownsuccess?booleancurl -X GET 'https://example.com/tenant/v1/kyc/media/string' \ -H 'X-Timestamp: string'{ "data": null, "success": true}Note. Media identifiers are included in the applicant record and in the applicant document list. The signed URL has a limited lifetime.
How to download files after a webhook
When you receive a webhook (for example, session.completed or verification.approved), the payload contains:
applicant_id— applicant identifiermedia— an object with storage keys (informational; not API identifiers)
Recommended order:
-
Fetch applicant data —
GET /v1/kyc/applicants/{applicant_id}. The response contains ready-to-use signed URLs:document_photo_url,document_front_url,document_back_url— document photosportrait_photo_url— portrait from the documentselfie_photo_url— selfieavatar_photo_url— avatarphoto_url_expires_at— URL expiration
-
Or fetch the document list —
GET /v1/kyc/applicants/{applicant_id}/documents. If you only have your own identifier, useGET /v1/kyc/applicants/external/{external_id}/documents. The response contains theidof each document (UUID), which you can pass toGET /v1/kyc/media/{media_id}. -
Download the file through the signed URL (HTTP GET, no auth). The URL is valid for a limited time.
Important. The
mediafield in the webhook holds internal storage keys, not API identifiers. To download files, use the signed URLs from theGET /v1/kyc/applicants/{applicant_id}response.
Applicant documents
Returns the documents uploaded by a specific applicant during verification. Required scope: documents:read.
ApiKeyAuthAuthorization<token>HMAC-SHA256 Credential=<key_id>, Signature=<hex_signature>. SignedHeaders=x-timestamp is optional. Requires X-Timestamp header.
applicant_id*stringApplicant UUID
X-Timestamp*stringUnix timestamp (seconds, max 5 min drift)
Documents list
application/json- response
data?array<>pagination?success?booleancurl -X GET 'https://example.com/tenant/v1/kyc/applicants/string/documents' \ -H 'X-Timestamp: string'{ "pagination": { "has_more": true, "limit": 0, "next_cursor": "string", "offset": 0, "total": 0 }, "success": true, "data": [ { "attempt_number": 0, "collection": { "doc_liveness": { "is_real": true, "portrait_replace": 0, "printed_copy": 0, "result_code": "string", "score": 0, "screen_replay": 0, "status": "string", "status_error": "string", "thresholds": { "portrait_replace": 0, "printed_copy": 0, "screen_replay": 0 } }, "doc_liveness_sides": { "property1": { "is_real": true, "portrait_replace": 0, "printed_copy": 0, "result_code": "string", "score": 0, "screen_replay": 0, "status": "string", "status_error": "string", "thresholds": { "portrait_replace": 0, "printed_copy": 0, "screen_replay": 0 } }, "property2": { "is_real": true, "portrait_replace": 0, "printed_copy": 0, "result_code": "string", "score": 0, "screen_replay": 0, "status": "string", "status_error": "string", "thresholds": { "portrait_replace": 0, "printed_copy": 0, "screen_replay": 0 } } }, "document_metadata": { "back_file_id": "string", "front_file_id": "string", "portrait_file_id": "string", "primary_file_id": "string" }, "document_order": 0, "logical_document_id": "string", "ocr": { "additional": { "property1": "string", "property2": "string" }, "address": "string", "barcode": { "property1": "string", "property2": "string" }, "booklet_number": "string", "date_of_birth": "string", "document_class": "string", "document_name": "string", "document_number": "string", "document_series": "string", "document_type": "string", "expiry_date": "string", "field_issues": { "property1": "string", "property2": "string" }, "first_name": "string", "full_name": "string", "full_name_latin": "string", "gender": "string", "issue_date": "string", "issuing_authority": "string", "issuing_authority_name": "string", "issuing_country": "string", "issuing_place": "string", "issuing_state_code": "string", "last_name": "string", "localized": { "property1": { "property1": "string", "property2": "string" }, "property2": { "property1": "string", "property2": "string" } }, "middle_name": "string", "mrz_code": "string", "mrz_data": { "property1": "string", "property2": "string" }, "mrz_type": "string", "nationality": "string", "nationality_name": "string", "native_full_name": "string", "personal_number": "string", "place_of_birth": "string", "portrait": "string", "portrait_position": { "x1": 0, "x2": 0, "y1": 0, "y2": 0 }, "position": { "x1": 0, "x2": 0, "y1": 0, "y2": 0 }, "profession": "string", "reconciliation": { "canonical_name": { "confidence": 0, "full_name": "string", "given_names": "string", "language": "string", "script": "string", "source": "mrz", "surname": "string" }, "confidence": 0, "conflicts": [ { "code": "name_mismatch", "field": "string", "left_source": "mrz", "right_source": "mrz", "severity": "string" } ], "decision": "accept", "evidence_sufficient": true, "fixable_by_recapture": true, "model": "string", "mrz": { "decision_source": "string", "independent_available": true, "independent_valid": true, "parsed": { "checks": { "property1": { "expected": "string", "observed": "string", "valid": true }, "property2": { "expected": "string", "observed": "string", "valid": true } }, "date_of_birth": "string", "document_number": "string", "expiry_date": "string", "given_names": "string", "layout": "TD1", "nationality": "string", "raw_lines": [ "string" ], "sex": "string", "surname": "string", "valid": true, "validation_complete": true }, "provider_state": "valid", "provider_validation": "string", "shadow_decision_applied": true, "shadow_state": "valid" }, "names": [ { "confidence": 0, "full_name": "string", "given_names": "string", "language": "string", "script": "string", "source": "mrz", "surname": "string" } ], "recommended_action": "continue" }, "tax_number": "string" }, "review_decision": { "automatic_status": "string", "decided_at": "string", "decision": "string", "source": "string" }, "revision": 0, "status": "string" }, "created_at": "string", "extracted_data": { "date_of_birth": "string", "date_of_issue": "string", "document_number": "string", "document_type": "string", "expiry_date": "string", "extended_data": { "property1": "string", "property2": "string" }, "first_name": "string", "full_name": "string", "full_name_latin": "string", "full_name_native": "string", "full_name_original": "string", "gender": "string", "issuing_country": "string", "last_name": "string", "middle_name": "string", "mrz": "string", "nationality": "string", "ocr": { "additional": { "property1": "string", "property2": "string" }, "address": "string", "barcode": { "property1": "string", "property2": "string" }, "booklet_number": "string", "date_of_birth": "string", "document_class": "string", "document_name": "string", "document_number": "string", "document_series": "string", "document_type": "string", "expiry_date": "string", "field_issues": { "property1": "string", "property2": "string" }, "first_name": "string", "full_name": "string", "full_name_latin": "string", "gender": "string", "issue_date": "string", "issuing_authority": "string", "issuing_authority_name": "string", "issuing_country": "string", "issuing_place": "string", "issuing_state_code": "string", "last_name": "string", "localized": { "property1": { "property1": "string", "property2": "string" }, "property2": { "property1": "string", "property2": "string" } }, "middle_name": "string", "mrz_code": "string", "mrz_data": { "property1": "string", "property2": "string" }, "mrz_type": "string", "nationality": "string", "nationality_name": "string", "native_full_name": "string", "personal_number": "string", "place_of_birth": "string", "portrait": "string", "portrait_position": { "x1": 0, "x2": 0, "y1": 0, "y2": 0 }, "position": { "x1": 0, "x2": 0, "y1": 0, "y2": 0 }, "profession": "string", "reconciliation": { "canonical_name": { "confidence": 0, "full_name": "string", "given_names": "string", "language": "string", "script": "string", "source": "mrz", "surname": "string" }, "confidence": 0, "conflicts": [ { "code": "name_mismatch", "field": "string", "left_source": "mrz", "right_source": "mrz", "severity": "string" } ], "decision": "accept", "evidence_sufficient": true, "fixable_by_recapture": true, "model": "string", "mrz": { "decision_source": "string", "independent_available": true, "independent_valid": true, "parsed": { "checks": { "property1": { "expected": "string", "observed": "string", "valid": true }, "property2": { "expected": "string", "observed": "string", "valid": true } }, "date_of_birth": "string", "document_number": "string", "expiry_date": "string", "given_names": "string", "layout": "TD1", "nationality": "string", "raw_lines": [ "string" ], "sex": "string", "surname": "string", "valid": true, "validation_complete": true }, "provider_state": "valid", "provider_validation": "string", "shadow_decision_applied": true, "shadow_state": "valid" }, "names": [ { "confidence": 0, "full_name": "string", "given_names": "string", "language": "string", "script": "string", "source": "mrz", "surname": "string" } ], "recommended_action": "continue" }, "tax_number": "string" }, "place_of_birth": "string" }, "id": "string", "is_current": true, "issuing_country": "string", "pages": [ { "download_url": "string", "download_url_expires_at": "string", "image_id": "string", "side": "string" } ], "reason_codes": [ "string" ], "session_id": "string", "side": "string", "status": "string", "step_id": "string", "type": "string", "verification": { "checks": [ { "is_authentic": true, "liveness_score": 0, "portrait_replace_score": 0, "printed_copy_score": 0, "rejection_reasons": [ "string" ], "screen_replay_score": 0, "similarity_score": 0, "status": "string", "type": "string" } ], "status": "string" } } ]}Applicant documents by external ID
Returns the same document list by the external_id you supplied when creating the verification link. Required scope: documents:read.
ApiKeyAuthAuthorization<token>HMAC-SHA256 Credential=<key_id>, Signature=<hex_signature>. SignedHeaders=x-timestamp is optional. Requires X-Timestamp header.
external_id*stringExternal user ID
X-Timestamp*stringUnix timestamp (seconds, max 5 min drift)
Documents list
application/json- response
data?array<>pagination?success?booleancurl -X GET 'https://example.com/tenant/v1/kyc/applicants/external/string/documents' \ -H 'X-Timestamp: string'{ "pagination": { "has_more": true, "limit": 0, "next_cursor": "string", "offset": 0, "total": 0 }, "success": true, "data": [ { "attempt_number": 0, "collection": { "doc_liveness": { "is_real": true, "portrait_replace": 0, "printed_copy": 0, "result_code": "string", "score": 0, "screen_replay": 0, "status": "string", "status_error": "string", "thresholds": { "portrait_replace": 0, "printed_copy": 0, "screen_replay": 0 } }, "doc_liveness_sides": { "property1": { "is_real": true, "portrait_replace": 0, "printed_copy": 0, "result_code": "string", "score": 0, "screen_replay": 0, "status": "string", "status_error": "string", "thresholds": { "portrait_replace": 0, "printed_copy": 0, "screen_replay": 0 } }, "property2": { "is_real": true, "portrait_replace": 0, "printed_copy": 0, "result_code": "string", "score": 0, "screen_replay": 0, "status": "string", "status_error": "string", "thresholds": { "portrait_replace": 0, "printed_copy": 0, "screen_replay": 0 } } }, "document_metadata": { "back_file_id": "string", "front_file_id": "string", "portrait_file_id": "string", "primary_file_id": "string" }, "document_order": 0, "logical_document_id": "string", "ocr": { "additional": { "property1": "string", "property2": "string" }, "address": "string", "barcode": { "property1": "string", "property2": "string" }, "booklet_number": "string", "date_of_birth": "string", "document_class": "string", "document_name": "string", "document_number": "string", "document_series": "string", "document_type": "string", "expiry_date": "string", "field_issues": { "property1": "string", "property2": "string" }, "first_name": "string", "full_name": "string", "full_name_latin": "string", "gender": "string", "issue_date": "string", "issuing_authority": "string", "issuing_authority_name": "string", "issuing_country": "string", "issuing_place": "string", "issuing_state_code": "string", "last_name": "string", "localized": { "property1": { "property1": "string", "property2": "string" }, "property2": { "property1": "string", "property2": "string" } }, "middle_name": "string", "mrz_code": "string", "mrz_data": { "property1": "string", "property2": "string" }, "mrz_type": "string", "nationality": "string", "nationality_name": "string", "native_full_name": "string", "personal_number": "string", "place_of_birth": "string", "portrait": "string", "portrait_position": { "x1": 0, "x2": 0, "y1": 0, "y2": 0 }, "position": { "x1": 0, "x2": 0, "y1": 0, "y2": 0 }, "profession": "string", "reconciliation": { "canonical_name": { "confidence": 0, "full_name": "string", "given_names": "string", "language": "string", "script": "string", "source": "mrz", "surname": "string" }, "confidence": 0, "conflicts": [ { "code": "name_mismatch", "field": "string", "left_source": "mrz", "right_source": "mrz", "severity": "string" } ], "decision": "accept", "evidence_sufficient": true, "fixable_by_recapture": true, "model": "string", "mrz": { "decision_source": "string", "independent_available": true, "independent_valid": true, "parsed": { "checks": { "property1": { "expected": "string", "observed": "string", "valid": true }, "property2": { "expected": "string", "observed": "string", "valid": true } }, "date_of_birth": "string", "document_number": "string", "expiry_date": "string", "given_names": "string", "layout": "TD1", "nationality": "string", "raw_lines": [ "string" ], "sex": "string", "surname": "string", "valid": true, "validation_complete": true }, "provider_state": "valid", "provider_validation": "string", "shadow_decision_applied": true, "shadow_state": "valid" }, "names": [ { "confidence": 0, "full_name": "string", "given_names": "string", "language": "string", "script": "string", "source": "mrz", "surname": "string" } ], "recommended_action": "continue" }, "tax_number": "string" }, "review_decision": { "automatic_status": "string", "decided_at": "string", "decision": "string", "source": "string" }, "revision": 0, "status": "string" }, "created_at": "string", "extracted_data": { "date_of_birth": "string", "date_of_issue": "string", "document_number": "string", "document_type": "string", "expiry_date": "string", "extended_data": { "property1": "string", "property2": "string" }, "first_name": "string", "full_name": "string", "full_name_latin": "string", "full_name_native": "string", "full_name_original": "string", "gender": "string", "issuing_country": "string", "last_name": "string", "middle_name": "string", "mrz": "string", "nationality": "string", "ocr": { "additional": { "property1": "string", "property2": "string" }, "address": "string", "barcode": { "property1": "string", "property2": "string" }, "booklet_number": "string", "date_of_birth": "string", "document_class": "string", "document_name": "string", "document_number": "string", "document_series": "string", "document_type": "string", "expiry_date": "string", "field_issues": { "property1": "string", "property2": "string" }, "first_name": "string", "full_name": "string", "full_name_latin": "string", "gender": "string", "issue_date": "string", "issuing_authority": "string", "issuing_authority_name": "string", "issuing_country": "string", "issuing_place": "string", "issuing_state_code": "string", "last_name": "string", "localized": { "property1": { "property1": "string", "property2": "string" }, "property2": { "property1": "string", "property2": "string" } }, "middle_name": "string", "mrz_code": "string", "mrz_data": { "property1": "string", "property2": "string" }, "mrz_type": "string", "nationality": "string", "nationality_name": "string", "native_full_name": "string", "personal_number": "string", "place_of_birth": "string", "portrait": "string", "portrait_position": { "x1": 0, "x2": 0, "y1": 0, "y2": 0 }, "position": { "x1": 0, "x2": 0, "y1": 0, "y2": 0 }, "profession": "string", "reconciliation": { "canonical_name": { "confidence": 0, "full_name": "string", "given_names": "string", "language": "string", "script": "string", "source": "mrz", "surname": "string" }, "confidence": 0, "conflicts": [ { "code": "name_mismatch", "field": "string", "left_source": "mrz", "right_source": "mrz", "severity": "string" } ], "decision": "accept", "evidence_sufficient": true, "fixable_by_recapture": true, "model": "string", "mrz": { "decision_source": "string", "independent_available": true, "independent_valid": true, "parsed": { "checks": { "property1": { "expected": "string", "observed": "string", "valid": true }, "property2": { "expected": "string", "observed": "string", "valid": true } }, "date_of_birth": "string", "document_number": "string", "expiry_date": "string", "given_names": "string", "layout": "TD1", "nationality": "string", "raw_lines": [ "string" ], "sex": "string", "surname": "string", "valid": true, "validation_complete": true }, "provider_state": "valid", "provider_validation": "string", "shadow_decision_applied": true, "shadow_state": "valid" }, "names": [ { "confidence": 0, "full_name": "string", "given_names": "string", "language": "string", "script": "string", "source": "mrz", "surname": "string" } ], "recommended_action": "continue" }, "tax_number": "string" }, "place_of_birth": "string" }, "id": "string", "is_current": true, "issuing_country": "string", "pages": [ { "download_url": "string", "download_url_expires_at": "string", "image_id": "string", "side": "string" } ], "reason_codes": [ "string" ], "session_id": "string", "side": "string", "status": "string", "step_id": "string", "type": "string", "verification": { "checks": [ { "is_authentic": true, "liveness_score": 0, "portrait_replace_score": 0, "printed_copy_score": 0, "rejection_reasons": [ "string" ], "screen_replay_score": 0, "similarity_score": 0, "status": "string", "type": "string" } ], "status": "string" } } ]}Document collections and document sides
A document step remains in compatible single-document mode when collection is absent. Configure collection.min_documents, max_documents (0 means unlimited), accepted countries/types and review rules in the Flow Builder. Empty accepted lists permit all provider-supported values; suggested values do not restrict recognition.
Each logical document has an immutable ID and incrementing revision. Two sides of an ID card or residence permit count as one document. Upload both files with file_type: document and optional file_side: front / back, then send collection_submit with document_storage_key / file_id plus optional back_document_storage_key / back_file_id. Older collection clients using document_back_storage_key / document_back_file_id remain compatible; conflicting aliases are rejected. Legacy execute_step continues accepting document_back_storage_key / document_back_file_id. Single-file requests are unchanged. The current KBY AI multipage endpoint accepts a first image and one optional second image; it does not accept an arbitrary number of pages.
Results retain separate citizenship and residence-right claims, each linked to source document ID and revision. An issuing country alone never establishes citizenship. Residence permits establish the stated residence right, not a verified current address. Unknown owner identity and contradictory evidence remain explicit and follow configured review behavior. Failed documents remain visible for review and do not contribute confirmed claims.
Automatic document requests support global conditions, issuer/nationality conditions, and targeted local overrides. Conditions within a rule match the same source document. Country sources can use a fixed country, the source issuing country, or source nationality. Rule requirements must be satisfied before collection completion.
Admin document views display each document's issuer, explicit nationality, recognized fields, original sides and separate authenticity results. document_order keeps displayed numbering stable even when a primary document is selected for compatible legacy fields. doc_liveness_sides preserves front/back scores separately.
KYB document analysis archives the full evidence and exact AI HTTP response bytes, including unknown fields, with a private tenant/session/execution binding. Cached analysis retains these bytes. A committed attempt does not publish a second completion on message redelivery. Authorized operators download archives through the KYB raw-response endpoint with regulated-media step-up and an audit event. Historical responses that were never archived cannot be reconstructed and are shown as unavailable.
The admin session-documents response includes steps[].document_collection while a collection is active, including processing and failed documents. Latest revisions are merged into the current attempt without duplicating original files. Expired documents require review unless expiry_check.reject_expired explicitly enables rejection; a strict validation failure is never downgraded by another review reason.
Finite collection limits must leave room for each active conditional rule’s source document and its requested documents. A permit-to-passport rule requiring one additional document needs a maximum of at least two; unconditional requirements do not reserve a source slot. Disabled rules do not consume capacity. The Builder shows this error before saving, and the backend validates the same constraint.