Files
Initiate a file upload
Creates a file in Pending status and returns a temporary upload URL.
PUT the file bytes to upload.url using the method and headers in the response.
After the upload is accepted, status becomes Processing, then Completed or Failed.
The upload URL expires after 10 minutes (upload.expiresAt).
Authorization
bearerAuth AuthorizationBearer <token>
Nabu API key from Organization settings → API keys. Keys are prefixed with key_.
In: header
Path Parameters
hubId*string
Knowledge hub identifier. Must be allowed for the API key.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/hubs/string/files" \ -H "Content-Type: application/json" \ -d '{ "fileName": "quarterly-report.pdf", "fileType": "application/pdf", "fileSize": 5242880 }'{ "hubFileId": "file_01234567-89ab-cdef-0123-456789abcdef", "hubId": "hub_01234567-89ab-cdef-0123-456789abcdef", "fileName": "quarterly-report.pdf", "fileType": "application/pdf", "fileSize": 5242880, "status": "Pending", "upload": { "method": "PUT", "url": "https://upload.example/quarterly-report.pdf?token=...", "headers": { "Content-Type": "application/pdf" }, "expiresAt": "2026-08-20T04:30:00.000Z" }}