How do I upload documents through the API?

RequestWhat it does
GET /foldersEvery folder, with its path.
POST /foldersMake a folder: name, and parent_id to put it inside another.
GET /documentsYour documents. ?folder_id= for one folder, or ?folder_id=root for those outside any folder.
GET /documents/{id}One document, with how investors read it.
POST /documentsUpload a document.
POST /documents/{id}/versionsUpload a new version of it.
DELETE /documents/{id}Delete it. Investors lose access at once.

Uploads are sent as a form (multipart/form-data), not JSON:

curl https://galley.1936ai.com/api/v1/documents \
  -H "Authorization: Bearer $GALLEY_API_KEY" \
  -F "file=@deck.pdf" \
  -F "name=Pitch deck" \
  -F "folder_id=…"

Only file is needed: the name is the file's own if you leave it out, and you can add a description. The same files and sizes are allowed as in Galley (see which files can I upload?), and investors with access to the folder see the document at once. A new version takes file and a note on what changed.

Each document has id, name, description, folder_id, content_type, size_bytes, version, key_document, created_at, updated_at, and stats: investors' opens (days they opened it), investors_opened, seconds and downloads.

Still stuck? Write to hello@1936ai.com and a person will answer.