Prepare documentation file upload
Start uploading a file (an invoice, quote, order or any PDF, DOCX, XLSX, XLS or CSV up to 50 MiB) into a company’s documentation library. Returns a documentId and a signed uploadUrl valid for 2 hours. Step 2: PUT the raw bytes to uploadUrl with Content-Type set to the returned contentType (no Authorization header). Step 3: POST /api/public/v1/documentation/files//finalize with the same body. Nothing is visible until finalized. Requires documentation.write and the linked user’s write_settings_documentation permission; staff API keys only.
Authorizations
Use your API key as a Bearer token. API keys can be generated in Settings → Integrations → API Access.
Body
Send the same body to prepare and finalize; finalize checks the stored bytes against it.
Title shown in the documentation library, e.g. 'Invoice 2026-1042'
1 - 255"Invoice 2026-1042"
File name with its extension: .pdf, .docx, .xlsx, .xls or .csv
1 - 255"invoice-2026-1042.pdf"
Exact size in bytes, at most 50 MiB
0 < x <= 5242880048213
MIME type of the file. The response's contentType is the one to send on the PUT.
1 - 200"application/pdf"
Company (client) the document belongs to; its portal users can open it. Required unless folderId is a folder pinned to a company: a file without a company would be visible to every client, so it is refused.
Custom folder ID (the UUID of a custom: key from the folders endpoint), e.g. an 'Invoices' folder. A folder pinned to a company only accepts that company.
Response
Upload prepared