> For the complete documentation index, see [llms.txt](https://finext.gitbook.io/one-kyc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://finext.gitbook.io/one-kyc/api/documents-and-media.md).

# 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 OneKYC 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**.

<mark style="color:blue;">`GET`</mark> `undefined/v1/kyc/documents/supported`

## Fetching a media file

Returns a signed download URL for a media file by its identifier. Required scope: **media:read**.

<mark style="color:blue;">`GET`</mark> `undefined/v1/kyc/media/{media_id}`

> **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 identifier
* `media` — an object with storage keys (informational; not API identifiers)

**Recommended order:**

1. **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 photos
   * `portrait_photo_url` — portrait from the document
   * `selfie_photo_url` — selfie
   * `avatar_photo_url` — avatar
   * `photo_url_expires_at` — URL expiration
2. **Or fetch the document list** — `GET /v1/kyc/applicants/{applicant_id}/documents`. If you only have your own identifier, use `GET /v1/kyc/applicants/external/{external_id}/documents`. The response contains the `id` of each document (UUID), which you can pass to `GET /v1/kyc/media/{media_id}`.
3. **Download the file** through the signed URL (HTTP GET, no auth). The URL is valid for a limited time.

> **Important.** The `media` field in the webhook holds internal storage keys, not API identifiers. To download files, use the signed URLs from the `GET /v1/kyc/applicants/{applicant_id}` response.

## Applicant documents

Returns the documents uploaded by a specific applicant during verification. Required scope: **documents:read**.

<mark style="color:blue;">`GET`</mark> `undefined/v1/kyc/applicants/{applicant_id}/documents`

## 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**.

<mark style="color:blue;">`GET`</mark> `undefined/v1/kyc/applicants/external/{external_id}/documents`
