> For the complete documentation index, see [llms.txt](https://docs.facephi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.facephi.com/docs.facephi-en/rest-api/identity-api/identity-api-reference/security-compliance/document-custody.md).

# Document Custody

The Document Custody API allows secure file storage with long-term retention.

#### Features

* **Supported file types**: PDF documents
* **Custody period**: 5 years
* **Secure storage**: Pre-signed URLs for secure upload and download
* **Time-limited access**: Upload URLs valid for 5 minutes, download URLs valid for 5 years

#### Flow of work

1. **Request URLs**: Obtain the upload and download URLs.
2. **Upload document**: Use the upload URL to store the PDF file.
3. **Download document**: Use the download URL at any time within 5 years.

{% hint style="warning" %}
The download URL contains a JWT Token valid for 5 years. If the download URL is lost, it will not be possible to recover the file.
{% endhint %}
