DevelopersYour tokens
Guide

Adding documents

One request for a file up to the plain limit; parts straight to storage for a big one and for every archive. Either way Thaw reads it the way it reads anything.

What adding takes

Putting a document in asks for the write scope and a role that may add (owner, member, an edit or upload-only guest) and never the plan: a Free family’s own app and shortcut put paper in the way the web does. On Free a document past the plan’s room is still taken in and kept, findable by its words, and read the moment the plan has room. The reference marks these routes “put documents in, on every plan”.

The plain road

POST /documents, multipart form data, for anything up to 95 MB.

curl -X POST "https://api.thawed.app/v1/documents" \
  -H "Authorization: Bearer $THAW_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" \
  -F "file=@scan.pdf" \
  -F "title=Roof quote from Alamo Roofing"

Or photographs of pages as pages[], which Thaw assembles into one PDF the way the scan page does, tidying each photo first (the page found on the counter, straightened, the shadow lifted):

curl -X POST "https://api.thawed.app/v1/documents" \
  -H "Authorization: Bearer $THAW_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" \
  -F "pages[]=@page-1.jpg" \
  -F "pages[]=@page-2.jpg"

separate=1 makes one document per page instead. In a business, for=receipt says what Thaw is looking at, and several pages are always one receipt. The answer is 201 with the document rows, status received; Thaw reads it from there, and the row’s status moves through scanning and reading to filed (or needs_review, with the reason). GET /documents/{id} shows where it stands.

A title you send is kept as yours and never rewritten; without one, Thaw names the document from the page.

Words as a document

POST /documents/note turns words into a page, filed and read like anything else: a note about the roof quote, the gist of a phone call, what the plumber said. person_or_thing links it and date is the day it is about.

The road in parts

For a file past 95 MB, and for every archive (.zip, .enex, a previous system’s export), the file goes straight to storage in parts and never through the app. Four calls:

  1. POST /uploads with the name and size. The answer is the key, the upload_id, the size of a part (64 MiB) and how many parts the file takes.
  2. POST /uploads/urls with up to twenty part numbers. Each URL takes one PUT of that part’s bytes and answers with an ETag to keep. Send three at a time; retry a part that fails on its own.
  3. POST /uploads/complete with every part’s number and ETag. A document is copied in, sealed and read; an archive becomes an import, and the answer names it in import_id.
  4. Or POST /uploads/abort to give up; the parts are discarded and nothing is filed.
curl -X POST "https://api.thawed.app/v1/uploads" \
  -H "Authorization: Bearer $THAW_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"paperless-export.zip","size":2147483648,"mime":"application/zip"}'

The family or business that started an upload is the only one that can finish or abandon it. A document this way is 1 GiB at most; an export, 8 GiB.

An import

An archive that arrives by either road becomes an import: unpacked in slices, each entry taken in, sorted and read in full within what the plan will spend on it, with GET /imports/{id} saying where it stands - unpacking, sorting, reading in full, done - and what needs a look and why. Nothing is refused for size: past the plan’s room the rest is counted and left to import later, never deleted.

What Thaw does with it

The same as with anything that arrives: a virus scan, a locked PDF parked for its password, an Office file converted, a photo tidied, the words lifted off a scan that has none, a copy of something already on file folded under it, the sorting read (what it is, whose it is, when it is from) and then the full read (what it means: amounts, terms, dates, what is owed), people & things linked, the Checkup updated. A document already on file arriving again is not a second document: it folds under the first, and the answer says so.