Manage your files and buckets programmatically. List, retrieve, update, delete, copy, and move files using our RESTful API.
Authenticate your requests using API keys.
All requests to the File Management API require the Authorization header with a Bearer token containing your API key.
Full access to file management operations. Keep secret.
API keys provide full access to your buckets and files. Never expose them in client-side code or public repositories. Always use environment variables or secure secret management systems.
Retrieve all buckets accessible by your API key.
/bucketsReturns a list of all buckets that your API key has access to, including usage statistics and pricing plan information.
AuthorizationstringrequiredMust be a valid API Key (sk_...)
Retrieve details for a specific bucket.
/buckets/{bucket_name}Returns detailed information about a specific bucket, including usage statistics and pricing plan details.
AuthorizationstringrequiredMust be a valid API Key (sk_...)
List files in a bucket with optional filtering and pagination.
/filesReturns a paginated list of files in the specified bucket. Supports filtering by path prefix and pagination.
AuthorizationstringrequiredMust be a valid API Key (sk_...)
bucketstringrequiredThe bucket name to list files from (query parameter)
pathstringPath prefix to filter files (query parameter)
limitnumberMaximum number of files to return (default: 100, query parameter)
offsetnumberNumber of files to skip for pagination (default: 0, query parameter)
Retrieve details for a specific file by ID.
/files/{file_id}Returns detailed information about a specific file, including its URL, metadata, and visibility settings.
AuthorizationstringrequiredMust be a valid API Key (sk_...)
Update file properties: rename, move, or change visibility.
/files/{file_id}Updates a file's name, path (move), or visibility. You can update one or more properties at once.
AuthorizationstringrequiredMust be a valid API Key (sk_...)
Content-Typestringrequiredapplication/json
namestringNew file name (rename operation)
pathstringNew file path (move operation)
visibilitystringNew visibility: PUBLIC or PRIVATE
Permanently delete a file from storage.
/files/{file_id}Permanently deletes a file from both the database and storage. This action cannot be undone.
AuthorizationstringrequiredMust be a valid API Key (sk_...)
Copy one or more files to a new location, optionally across buckets.
/files/copyCopies file(s) from a source bucket to a target bucket. Supports copying a single file by path or multiple files by ID. For single file copy, use source_path. For multiple files, use file_ids array.
AuthorizationstringrequiredMust be a valid API Key (sk_...)
Content-Typestringrequiredapplication/json
source_bucketstringrequiredSource bucket name
target_bucketstringrequiredTarget bucket name
target_pathstringrequiredTarget path for the copied file(s)
source_pathstringSource file path (for single file copy)
file_idsstring[]Array of file IDs to copy (for multiple file copy)
Move one or more files to a different path within the same bucket.
/files/moveMoves one or more files to a new path within the same bucket. Files are moved by their IDs, and the target path should be a directory path where the files will be placed.
AuthorizationstringrequiredMust be a valid API Key (sk_...)
Content-Typestringrequiredapplication/json
bucketstringrequiredBucket name containing the files to move
file_idsstring[]requiredArray of file IDs to move
target_pathstringrequiredTarget directory path where files will be moved