apiDocs.title
apiDocs.endpoint
POST https://upload.zerostorage.net/api/upload/universalapiDocs.endpointDescription
apiDocs.authentication
apiDocs.authenticationDescription
- apiDocs.apiKey: apiDocs.apiKeyDescription
x-api-key: your_api_key_here - apiDocs.anonymousUpload: apiDocs.anonymousUploadDescription
apiDocs.fileAccessSecurity
apiDocs.fileAccessSecurityDescription
apiDocs.headerMethod:
x-api-key: your_api_key_hereapiDocs.requestParameters
| apiDocs.table.parameter | apiDocs.table.type | apiDocs.table.required | apiDocs.table.description |
|---|---|---|---|
| file | File | Yes | apiDocs.table.file |
| title | String | No | apiDocs.table.title |
| description | String | No | apiDocs.table.descriptionParam |
| folderId | String | No | apiDocs.table.folderId |
apiDocs.response
apiDocs.successResponse
{
"fileId": "generated_file_id",
"filename": "video.mp4",
"size": 1048576,
"viewUrl": "/watch/generated_file_id",
"success": true
}apiDocs.errorResponses
apiDocs.unauthorized
{
"error": "Invalid or inactive API key"
}Note: This error only occurs when an invalid API key is provided. Requests without an API key are treated as anonymous uploads.
apiDocs.badRequest
{
"error": "No file provided"
}apiDocs.exampleUsage
apiDocs.usingCurl (with API Key)
curl.exe -X POST "https://upload.zerostorage.net/api/upload/universal" `
-H "x-api-key: your_api_key_here" `
-F "file=@/path/to/your/file.mp4" `
-F "title=My File Title" `
-k `
-sapiDocs.usingCurl (Anonymous Upload)
curl.exe -X POST "https://upload.zerostorage.net/api/upload/universal" `
-F "file=@/path/to/your/file.mp4" `
-F "title=My File Title" `
-k `
-sapiDocs.usingPowerShell (with API Key)
$form = @{
file = Get-Item -Path "C:\path\to\your\file.mp4"
title = "My File Title"
description = "Optional description"
folderId = "your_folder_id_here"
}
$response = Invoke-RestMethod -Uri 'https://upload.zerostorage.net/api/upload/universal' \
-Method Post \
-Headers @{
'x-api-key' = 'your_api_key_here'
} \
-Form $formapiDocs.usingPowerShell (Anonymous Upload)
$form = @{
file = Get-Item -Path "C:\path\to\your\file.mp4"
title = "My File Title"
description = "Optional description"
}
$session = New-Object Microsoft.PowerShell.Commands.WebRequestSession
$response = Invoke-RestMethod -Uri 'https://upload.zerostorage.net/api/upload/universal' \
-Method Post \
-WebSession $session \
-Form $formNote: Anonymous uploads use session cookies. The -WebSession parameter maintains the session for tracking.
apiDocs.folderManagement
apiDocs.folderManagementDescription
apiDocs.listFolders
apiDocs.listFoldersDescription
GET https://upload.zerostorage.net/api/folders?parentId=optional_parent_id&page=1&limit=20 Headers: x-api-key: your_api_key_here
apiDocs.queryParameters:
• parentId (optional): Get subfolders of a specific folder
• page (optional): Page number for pagination (default: 1)
• limit (optional): Number of folders per page (default: 20)
Response includes folder IDs that you can use in upload requests.
apiDocs.responseExample:
{
"folders": [
{
"id": "folder_id_here",
"name": "My Documents",
"description": "Important documents",
"parent_id": null,
"created_at": "2024-01-15T10:30:00.000Z",
"updated_at": "2024-01-15T10:30:00.000Z",
"_count": {
"files": 5,
"children": 2
}
}
],
"pagination": {
"total": 1,
"totalPages": 1,
"currentPage": 1,
"limit": 20
}
}apiDocs.createFolder
apiDocs.createFolderDescription
POST https://upload.zerostorage.net/api/folders
Headers: x-api-key: your_api_key_here
Content-Type: application/json
{
"name": "My Folder",
"description": "Optional description",
"parentId": "optional_parent_folder_id"
}apiDocs.responseExample:
{
"id": "new_folder_id_here",
"name": "My Folder",
"description": "Optional description",
"parent_id": "optional_parent_folder_id",
"created_at": "2024-01-15T10:30:00.000Z",
"updated_at": "2024-01-15T10:30:00.000Z",
"_count": {
"files": 0,
"children": 0
}
}apiDocs.deleteFolder
apiDocs.deleteFolderDescription
apiDocs.deleteFolderUrlDescription
DELETE https://upload.zerostorage.net/api/folders/{folderId}
Headers: x-api-key: your_api_key_hereapiDocs.usingCurl:
curl -X DELETE "https://upload.zerostorage.net/api/folders/your_folder_id_here" \ -H "x-api-key: your_api_key_here"
apiDocs.errorResponses
apiDocs.unauthorized
{
"error": "Invalid API key"
}400 apiDocs.badRequest
{
"error": "Folder name is required"
}404 Not Found
{
"error": "Folder not found"
}apiDocs.completeWorkflow
Here's a complete example of how to create a folder and upload a file to it:
apiDocs.step1
curl -X POST https://upload.zerostorage.net/api/folders \
-H "x-api-key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"name": "My Project Files",
"description": "Files for my project"
}'apiDocs.step2
curl -X POST https://upload.zerostorage.net/api/upload/universal \ -H "x-api-key: your_api_key_here" \ -F "file=@/path/to/your/file.mp4" \ -F "title=Project Video" \ -F "folderId=returned_folder_id_from_step_1"
apiDocs.fileManagement (Listing)
apiDocs.listFilesDescription
apiDocs.listFiles
apiDocs.listFilesUrl
GET https://upload.zerostorage.net/api/files?folderId=optional_id&page=1&limit=12&search=query&fileType=video|image|audio|other Headers: x-api-key: your_api_key_here
apiDocs.queryParameters:
• folderId (optional): Get files in a specific folder (use 'null' for root)
• page (optional): Page number (default: 1)
• limit (optional): Files per page (default: 12)
• search (optional): Search in title, description, or filename
• fileType (optional): Filter by type (video, image, audio, or other)
apiDocs.responseExample:
{
"files": [
{
"id": "file_id_here",
"title": "My Video",
"description": "A description",
"filename": "video.mp4",
"file_size": 1048576,
"file_type": "video/mp4",
"status": "ready",
"created_at": "2024-01-15T10:30:00.000Z",
"thumbnailUrl": "/api/files/file_id_here/thumbnail"
}
],
"pagination": {
"total": 1,
"totalPages": 1,
"currentPage": 1,
"limit": 12
}
}apiDocs.fileDeletion
apiDocs.fileDeletionDescription
apiDocs.deleteEndpoint
DELETE https://upload.zerostorage.net/api/files/{fileId}apiDocs.deleteEndpointDescription
apiDocs.deleteExampleCurl
curl.exe -X DELETE "https://upload.zerostorage.net/api/files/your_file_id_here" `
-H "x-api-key: your_api_key_here" `
-k `
-sapiDocs.deleteExamplePowerShell
Invoke-RestMethod -Uri 'https://upload.zerostorage.net/api/files/your_file_id_here' `
-Method Delete `
-Headers @{
'x-api-key' = 'your_api_key_here'
}apiDocs.notes
- apiDocs.notes1
- apiDocs.notes2
- apiDocs.notes3
- apiDocs.notes4