Files
File operations (upload and download) follow a two-step process involving a Signed Access Signature (SAS) URL.
Request Flow (Upload)
- Request URL: Call
POST /filesto get a signed upload URL (uploadUrl) and afileId. - Upload Content:
PUTyour file binary directly to theuploadUrlwith the headerx-ms-blob-type: BlockBlob. The URL is in the formathttps://blobs.bevaya.ai/{organization_id}/{blob_path}?{sas_token}and expires after 15 minutes.
Request Flow (Download)
- Request Metadata: Call
GET /files/{fileId}to retrieve file metadata, which includes adownloadUrl. - Download Content:
GETthedownloadUrlto download the file content directly from storage.
Get SAS URL for file upload
Request a signed URL to upload a file. After receiving the uploadUrl, PUT your file content directly to it with the x-ms-blob-type: BlockBlob header. Flow: 1. POST /files - Get presigned upload URL 2. PUT {uploadUrl} - Upload file directly to Azure with headers: - x-ms-blob-type: BlockBlob - Content-Type: application/octet-stream (or actual MIME type)
The returned URL is valid for 15 minutes (write SAS token).
Get SAS URL for file upload › Request Body
filenameName of the file with extension. Required for validation and MIME type detection. Example: document.pdf.
workspaceIdThe workspace to associate the uploaded file with. Format: UUID. Example: 2b8d1514-6231-5c79-9108-5110495d6789.
categoryitemIdOptional item ID to associate the file with. Format: UUID. Example: 6f215958-0675-90b3-3542-955483910123.
parentFileIdOptional parent file ID, for building file hierarchies. Format: UUID.
Get SAS URL for file upload › Responses
Success response
blobPathBlob path within the organization's storage container.
expiresAtExpiration time of the upload URL. ISO timestamp. Example: 2026-03-31T15:55:41.222Z.
fileIdThe ID of the created file record, in a pending state until upload completes. Format: UUID. Example: 70326069-1786-01c4-4653-066594021234.
messageHuman-readable response message.
successWhether the request was successful.
uploadUrlThe SAS URL for uploading the file content via a PUT request. Valid for 15 minutes; include the x-ms-blob-type: BlockBlob header when uploading.
Get file metadata and download URL
Retrieve file details and a presigned download URL.
path Parameters
fileIdGet file metadata and download URL › Responses
Success response
messageHuman-readable result message.
successWhether the file was found and returned successfully.
Get file pages
Retrieve paginated image renderings of each page in a file (e.g. a PDF).
path Parameters
fileIdquery Parameters
documentIdOptional document ID to filter pages to a single document within the file. Format: UUID.
Get file pages › Responses
Success response
messageHuman-readable result message.
The requested page of results.
successWhether the pages were found and returned successfully.
totalCountTotal number of pages available for the file (or document, if filtered).