Create a file record after uploading. This endpoint should be called AFTER uploading the file using the presigned URL from /files/upload-url. It creates the database record and updates storage usage tracking.
# Step 1: Get presigned upload URL
curl -X POST https://app.mavera.io/api/v1/files/upload-url \
-H "Authorization: Bearer mvra_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"file_name": "document.pdf",
"file_type": "application/pdf",
"file_size": 1048576,
"workspace_id": "ws_abc123"
}'
# Step 2: Upload file to the presigned URL (use upload_url from step 1)
curl -X PUT "PRESIGNED_URL_FROM_STEP_1" \
-H "Content-Type: application/pdf" \
--data-binary @document.pdf
# Step 3: Create the file record (use public_url from step 1)
curl -X POST https://app.mavera.io/api/v1/files \
-H "Authorization: Bearer mvra_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"name": "document.pdf",
"type": "application/pdf",
"url": "PUBLIC_URL_FROM_STEP_1",
"workspace_id": "ws_abc123",
"file_size": 1048576
}'{
"id": "<string>",
"object": "file",
"name": "<string>",
"url": "<string>",
"type": "<string>",
"size": 123,
"source": "upload",
"workspace_id": "<string>",
"folder_id": "<string>",
"folder": {
"id": "<string>",
"name": "<string>"
},
"thumbnail_url": "<string>",
"metadata": {},
"is_favorite": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}Documentation Index
Fetch the complete documentation index at: https://docs.mavera.io/llms.txt
Use this file to discover all available pages before exploring further.
API key prefixed with mvra_live_. Create keys at Settings > Developer > API Keys.
File name
MIME type of the file
Public URL where the file was uploaded (from upload-url response)
Workspace to store the file in
File size in bytes
x >= 1Optional folder ID to organize the file
Optional custom metadata
File created successfully
A file/asset stored in Mavera
Unique file identifier
file File name
Direct URL to access the file
MIME type of the file (e.g., 'image/png', 'application/pdf')
File size in bytes
Source of the file upload
upload, google_drive, dropbox, dropbox_chooser, onedrive, onedrive_picker, url Workspace ID
Folder ID if file is in a folder
Folder details if file is in a folder
Show child attributes
Thumbnail URL for images/videos
Custom metadata attached to the file
Whether the file is in your favorites
# Step 1: Get presigned upload URL
curl -X POST https://app.mavera.io/api/v1/files/upload-url \
-H "Authorization: Bearer mvra_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"file_name": "document.pdf",
"file_type": "application/pdf",
"file_size": 1048576,
"workspace_id": "ws_abc123"
}'
# Step 2: Upload file to the presigned URL (use upload_url from step 1)
curl -X PUT "PRESIGNED_URL_FROM_STEP_1" \
-H "Content-Type: application/pdf" \
--data-binary @document.pdf
# Step 3: Create the file record (use public_url from step 1)
curl -X POST https://app.mavera.io/api/v1/files \
-H "Authorization: Bearer mvra_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"name": "document.pdf",
"type": "application/pdf",
"url": "PUBLIC_URL_FROM_STEP_1",
"workspace_id": "ws_abc123",
"file_size": 1048576
}'{
"id": "<string>",
"object": "file",
"name": "<string>",
"url": "<string>",
"type": "<string>",
"size": 123,
"source": "upload",
"workspace_id": "<string>",
"folder_id": "<string>",
"folder": {
"id": "<string>",
"name": "<string>"
},
"thumbnail_url": "<string>",
"metadata": {},
"is_favorite": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}