Document Storage

Document Storage

Synctera provides a simple document storage service for you.
You can upload documents, list them, and retrieve them later.
(Deletion is not currently supported.)

if you are storing PII you should set encryption as required this adds additional encryption treatment to the storage object /note>

curl \
  -H "Authorization: Bearer ..." \
  -X POST \
  -F encryption=REQUIRED
  -F [email protected]

The types of documents that should be stored as encrypted include:

  • US social security numbers (SSNs)
  • any other similar national ID numbers
  • driver's license numbers
  • images of driver's licenses
  • passport numbers
  • images of passports
  • any other similar government ID

What is a document?

A document is any file that either you or one of your customers needs to store.
It could be a PDF file, a Word document, a spreadsheet, a JPEG file ...
almost anything.


To upload a file, send a POST /v0/documents request with
Content-Type: multipart/form-data. Refer to Create Document
(This is how browser upload works.)

The document size cannot exceed 32 MB.

The only required form parameter is the file data itself.
A minimal curl upload:

curl \
  -H "Authorization: Bearer ..." \
  -X POST \
  -F [email protected]

Over the wire, this results in a request something like

POST /v0/documents
Authorization: Bearer ...
Content-Length: 200.
Content-Type: multipart/form-data; boundary=------------------------1deeb99b24570a96

Content-Disposition: form-data; name="file"; filename="hello.txt"
Content-Type: text/plain
Content-Length: 13

Hello, world


The response to your upload request is a JSON object describing the document:

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


To retrieve the uploaded document later,
use GET /v0/documents/{document_id}/contents. Refer to Get Document

GET /v0/documents/2a1e97a8-96a5-4b24-929a-2f8e4dc6851e/contents
Authorization: Bearer ...

200 OK
Content-Disposition: attachment; filename="hello.txt"
Content-Type: text/plain; charset=utf-8
Content-Length: 13

Hello, world

This returns the exact file contents that were uploaded,
whether it is a 13-byte plain text file or
a 30 MB PDF file.


You can also get a paginated list of all uploaded documents
with GET /v0/documents. Refer to List Documents

curl \
  -H "Authorization: Bearer ..." \