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

# Document Storage

> Synctera's document storage service lets you upload, list, and retrieve files — with optional encryption for sensitive documents such as government IDs.

## Overview

Document storage is a simple file service: you upload documents, list them, and retrieve them later. A *document* is any file you or a customer needs to store — a PDF, a Word document, a spreadsheet, a JPEG, almost anything.

**Uploading a document** returns a record with an `id` you can use to fetch the file back byte-for-byte. Documents can also be attached to other resources (for example, business formation documents or EDD supporting evidence).

Key characteristics:

* **Any file type** — store PDFs, images, spreadsheets, and more, up to **32 MB** per document.
* **Optionally encrypted** — set `encryption` to `REQUIRED` to apply additional encryption treatment for PII and government IDs.
* **Multipart upload** — files are sent as `multipart/form-data`, exactly how a browser upload works.
* **Retrievable, append-only** — documents can be uploaded, listed, and retrieved; deletion is not currently supported.

<Warning>
  Set `encryption` to `REQUIRED` whenever you store PII. This applies additional encryption treatment to the stored object. Document types that should always be encrypted include US Social Security Numbers, other national ID numbers, driver's license numbers and images, passport numbers and images, and any similar government ID.
</Warning>

## Prerequisites

This guide assumes you are familiar with:

* [Need to Know — Environments](/reference/need-to-know#environments)
* [Need to Know — Authentication](/reference/need-to-know#authentication)

## The document object

An uploaded document is described by a JSON record:

| Field                                 | Description                                                                   |
| ------------------------------------- | ----------------------------------------------------------------------------- |
| `id`                                  | Unique identifier (read-only, assigned on upload). Used to retrieve the file. |
| `file_name`                           | The original filename of the uploaded file.                                   |
| `name`                                | Display name for the document.                                                |
| `description`                         | Optional description.                                                         |
| `creation_time` / `last_updated_time` | Timestamps (read-only).                                                       |

```json theme={"system"}
{
  "id": "2a1e97a8-96a5-4b24-929a-2f8e4dc6851e",
  "file_name": "hello.txt",
  "name": "hello.txt",
  "description": "",
  "creation_time": "2022-04-06T14:18:10.123265Z",
  "last_updated_time": "2022-04-06T14:18:10.123265Z"
}
```

## Managing documents

<Steps>
  <Step title="Upload a document">
    Send a `POST /v0/documents` request with `Content-Type: multipart/form-data`. The only required form parameter is the file data itself; add `encryption=REQUIRED` for sensitive files. See [Create Document](/reference/createdocument).

    ```shell theme={"system"}
    curl \
      -X POST \
      -H "Authorization: Bearer $apikey" \
      -F encryption=REQUIRED \
      -F file=@secret.png \
      https://api.synctera.com/v0/documents
    ```

    A minimal, non-encrypted upload:

    ```shell theme={"system"}
    curl \
      -X POST \
      -H "Authorization: Bearer $apikey" \
      -F file=@hello.txt \
      https://api.synctera.com/v0/documents
    ```

    The response is the document record described above. Documents cannot exceed **32 MB**.
  </Step>

  <Step title="Retrieve a document">
    Fetch the exact file contents that were uploaded with [GET /v0/documents/\{document\_id}/contents](/reference/getdocument):

    ```shell theme={"system"}
    curl \
      -H "Authorization: Bearer $apikey" \
      https://api.synctera.com/v0/documents/2a1e97a8-96a5-4b24-929a-2f8e4dc6851e/contents
    ```

    The response streams the file back with its original `Content-Disposition` filename and content type — whether that is a 13-byte text file or a 30 MB PDF.
  </Step>

  <Step title="List documents">
    Retrieve a paginated list of all uploaded documents with [GET /v0/documents](/reference/listdocuments):

    ```shell theme={"system"}
    curl \
      -H "Authorization: Bearer $apikey" \
      https://api.synctera.com/v0/documents
    ```
  </Step>
</Steps>

## Best practices

* **Encrypt PII by default** — set `encryption=REQUIRED` for any document containing sensitive personal or government identifiers.
* **Keep files under 32 MB** — split or compress larger files before upload.
* **Store, don't inline** — attach source documents here and reference them from other resources (KYB, EDD) rather than embedding raw data.
* **Record the returned `id`** — you cannot delete a document, so track the `id` to retrieve or reference it later.

## Related guides

<CardGroup cols={2}>
  <Card title="Create a Business Customer" href="/docs/create-a-business" icon="briefcase" horizontal>
    Attach business formation and MSB documentation.
  </Card>

  <Card title="Enhanced Due Diligence" href="/docs/enhanced-due-diligence-guide" icon="magnifying-glass" horizontal>
    Link supporting documents to an EDD submission.
  </Card>

  <Card title="Document Verification" href="/docs/document-verification" icon="id-card" horizontal>
    Verify a customer's identity using their documents.
  </Card>
</CardGroup>

## API reference

* [Create a document](/reference/createdocument)
* [Get a document](/reference/getdocument)
* [List documents](/reference/listdocuments)
