# Documents

**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><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>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>change_of_name</code></li><li><code>tax_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>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="/pages/-M6ZH6abpvriBoFNcwo4#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: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

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

The question should be specific, self-contained, and written in natural language.
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.
