> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sphinxhq.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Document Model

> A Document represents a file, such as an ID or proof of address, associated with a case or check.

The Document model is used to handle file uploads. This is essential for any check that requires documentary evidence, such as ID verification (`IDV`), proof of address, or reviewing a company's incorporation documents.

The typical workflow is to first upload the document to get a document `id`, and then reference that `id` as `document_ids` when creating a `Case` or `Check`.

<ResponseField name="id" type="integer" required>
  A unique identifier for the document.
</ResponseField>

<ResponseField name="case" type="integer">
  The ID of the case this document is associated with.
</ResponseField>

<ResponseField name="check" type="integer">
  The ID of the check this document is associated with.
</ResponseField>

<ResponseField name="file" type="string" required>
  The Base64 encoded content of the file.
</ResponseField>

<ResponseField name="original_name" type="string">
  The original name of the uploaded file.
</ResponseField>

<ResponseField name="created_at" type="string" required>
  The timestamp when the document was created.
</ResponseField>

<ResponseField name="updated_at" type="string" required>
  The timestamp when the document was last updated.
</ResponseField>

<ResponseField name="delete_after" type="integer">
  Number of days until the document is automatically deleted. Use `0` for immediate deletion, or `-1` for indefinite retention (never delete). Max `365`. Defaults to `-1` (indefinite).
</ResponseField>
