Finalize documentation file upload
Register the bytes PUT to uploadUrl as a file document in the documentation library. The stored size and type must match the body. Retrying with the same documentId returns the same document, so a timeout is safe to retry. The file is then listed by GET /api/public/v1/documentation/documents (source custom, documentKind file) and opens for that company’s portal users under Documentation. 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.
Path Parameters
documentId from the prepare call
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
File document created