> For the complete documentation index, see [llms.txt](https://docs.complycube.com/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.complycube.com/documentation/api-reference/core-resources/documents.md).

# Documents

Documents can be linked to clients for additional verification checks and KYC record-keeping.

**Documents** can be created for a given client for the following purposes:

* Secure and centralised document storage.
* Perform checks such as [**Document Checks**](https://docs.complycube.com/api-reference/check-types/document-check) and [**Identity Checks**](https://docs.complycube.com/api-reference/check-types/identity-check).

The documents API allows you to create, update, retrieve, upload, and delete documents. You can fetch a specific document or retrieve a list of all your documents.

{% hint style="info" %}
To upload an image attachment, you first have to [**create a document**](/documentation/api-reference/core-resources/documents/create-a-document.md#create-a-document) object, then [**upload an image attachment**](/documentation/api-reference/core-resources/documents/upload-image-attachment.md).
{% endhint %}

### The Document object

<table data-search="true"><thead><tr><th width="202.4">Attribute</th><th width="94" align="center">Type</th><th width="421.4744900488406">Description</th></tr></thead><tbody><tr><td><code>id</code></td><td align="center">string</td><td>The unique identifier for a document.</td></tr><tr><td><code>clientId</code></td><td align="center">string</td><td>The ID of the client associated with this document.</td></tr><tr><td><code>type</code></td><td align="center">string</td><td><p>The type of document. Valid values include:</p><ol><li><code>passport</code></li><li><code>driving_license</code></li><li><code>national_insurance_number</code></li><li><code>social_security_number</code></li><li><code>utility_bill</code></li><li><code>council_tax_bill</code></li><li><code>tenancy_agreement</code></li><li><code>insurance_document</code></li><li><code>government_letter</code></li><li><code>benefits_statement</code></li><li><code>tax_identification_number</code></li><li><code>national_identity_card</code></li><li><code>visa</code></li><li><code>polling_card</code></li><li><code>residence_permit</code></li><li><code>birth_certificate</code></li><li><code>bank_statement</code></li><li><code>financial_statement</code></li><li><code>change_of_name</code></li><li><code>tax_document</code></li><li><code>signed_document</code></li><li><code>company_confirmation_statement</code></li><li><code>company_annual_accounts</code></li><li><code>company_statement_of_capital</code></li><li><code>company_change_of_address</code></li><li><code>company_incorporation</code></li><li><code>company_change_of_officers</code></li><li><code>company_change_of_beneficial_owners</code></li><li><code>vehicle_ownership_document</code></li><li><code>property_ownership_document</code></li><li><code>proof_of_ownership</code></li><li><code>unknown</code></li><li><code>other</code></li></ol></td></tr><tr><td><code>classification</code></td><td align="center">string</td><td><p>The classification or purpose of this document. Valid values include:</p><ol><li><code>proof_of_identity</code></li><li><code>source_of_wealth</code></li><li><code>source_of_funds</code></li><li><code>proof_of_address</code></li><li><code>company_filing</code></li><li><code>other</code></li></ol></td></tr><tr><td><code>documentNumber</code></td><td align="center">string</td><td>The document's number.</td></tr><tr><td><code>issuingCountry</code></td><td align="center">string</td><td>The document's issuing country. This will be the <a href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">two-letter country ISO code</a>.</td></tr><tr><td><code>issuingState</code></td><td align="center">string</td><td>The state that issued the document. This must be the <a href="https://pe.usps.com/text/pub28/28apb.htm">state's USPS abbreviation</a> (e.g. <code>NY</code>, <code>CA</code>, or <code>DE</code>).</td></tr><tr><td><code>images</code></td><td align="center"><p>array</p><p>[object]</p></td><td>The images or attachments associated with the document. This will <strong>only</strong> appear once a document image is uploaded. Also, see <a href="/documentation/api-reference/core-resources/documents.md#the-image-object">the image object</a> below.</td></tr><tr><td><code>createdAt</code></td><td align="center">string</td><td>The date and time when the document was created.</td></tr><tr><td><code>updatedAt</code></td><td align="center">string</td><td>The date and time when the document was updated.</td></tr></tbody></table>

#### The `image` object

<table><thead><tr><th width="201.92502258355918">Attribute</th><th width="94.34670179497152">Type</th><th width="364.2">Description</th></tr></thead><tbody><tr><td><code>id</code></td><td>string</td><td>The unique identifier for a document image attachment.</td></tr><tr><td><code>fileName</code></td><td>string</td><td>The file name.</td></tr><tr><td><code>documentSide</code></td><td>string</td><td>The side of document: <code>front</code> or <code>back</code>.</td></tr><tr><td><code>downloadLink</code></td><td>string</td><td>The download link to the document image.</td></tr><tr><td><code>contentType</code></td><td>string</td><td>The content-type of the document image.</td></tr><tr><td><code>size</code></td><td>number</td><td>The size of the document image in bytes.</td></tr><tr><td><code>createdAt</code></td><td>string</td><td>The date and time when the image was created.</td></tr><tr><td><code>updatedAt</code></td><td>string</td><td>The date and time when the image was updated.</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.complycube.com/documentation/api-reference/core-resources/documents.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
