Files API
Upload
Upload a file
/v1/files
Upload a file in a single operation.
Request Body
Response Body
file_id
string
The document ID.
name
string
The name of the document.
size_bytes
string
The size of the document, in bytes.
content_type
string
MIME type.
created_at
string
The Unix timestamp for when the document was created.
expires_at
string
The Unix timestamp for when the document will expire.
Blake 3 hash of the document,
string
Expected values: "Initializing", "Uploading", "Complete", "Failed"
string
upload_error_message
string
Error message if upload failed.
processing_status
string
Processing status of the file (pending, processing, complete, failed, skipped).
file_path
string
Optional: hierarchical path for the file (e.g., "folder1/subfolder"). This is relative to the team root and does not include the filename.
Initialize a file upload
/v1/files:initialize
Initialize a file upload by creating metadata and reserving a file_id.
Request Body
name
string
required
Name of the file.
content_type
string
required
Mime type of the file.
Response Body
file_id
string
The generated file_id for this upload.
metadata
object
Metadata of an uploaded file.
Upload a file in chunks
/v1/files:uploadChunks
Upload file data in chunks (client streaming).
Request Body
file_id
string
required
The file_id from InitializeFileUploadResponse.
chunk
string
required
File data chunk.
Response Body
file_id
string
The document ID.
name
string
The name of the document.
size_bytes
string
The size of the document, in bytes.
content_type
string
MIME type.
created_at
string
The Unix timestamp for when the document was created.
expires_at
string
The Unix timestamp for when the document will expire.
Blake 3 hash of the document,
string
Expected values: "Initializing", "Uploading", "Complete", "Failed"
string
upload_error_message
string
Error message if upload failed.
processing_status
string
Processing status of the file (pending, processing, complete, failed, skipped).
file_path
string
Optional: hierarchical path for the file (e.g., "folder1/subfolder"). This is relative to the team root and does not include the filename.
Did you find this page helpful?