Complete upload
POST /projects/:projectid/library/files:complete
Finalises a file after its bytes have been uploaded to the signed storage URL. It records the actual byte size, reconciles storage capacity, clears the pending-upload state, and creates thumbnails for supported image formats.
This is not a text-extraction or search-indexing operation. Use suitable workflow nodes or application tools to process the file's contents.
Authentication and request
Use a project key with library.write in Authorization, without Bearer. Replace :projectid with the project used to create the file. Send Content-Type: application/json.
The required path string is the exact storage path returned by Create a file. It is not the directory path, a local filename, the signed URL, or just the file ID.
Using the Quickstart variables:
curl --include --request POST \
--header "Authorization: ${INTELLECTIBLE_PROJECT_API_KEY}" \
--header "Content-Type: application/json" \
--data '{"path":"libraryDocuments/YOUR_PROJECT_ID/YOUR_FILE_ID.txt"}' \
"${INTELLECTIBLE_PUBLIC_API_URL}/projects/${INTELLECTIBLE_PROJECT_ID}/library/files:complete"
Replace the example path with the actual returned value rather than constructing it yourself. Call this only after a successful storage PUT; it is not an upload-progress polling endpoint.
Response
Success returns 200 OK with the plain-text body OK, not JSON. There is no new file ID: keep the documentId returned by creation.
If you have library.read, use List files to inspect the final metadata or Download a file to check the content.
Errors and recovery
- 400: missing path, wrong-project path, missing file metadata/content, or another finalisation failure.
- 401: missing or invalid project credential.
- 403: missing
library.write. - 429: request-rate limit reached.
Capacity reconciliation can fail even after storage accepted the bytes. In that case, the pending file and uploaded content may be removed. Do not treat a successful PUT alone as a completed Library upload.
If completion fails or times out, keep the returned file ID and path while investigating. Check that the PUT succeeded and that the path was passed unchanged. Avoid restarting creation automatically: it creates another file record. See Upload a file and Errors, limits and retries.