apiDocs.title
Integrate our high-performance file storage and delivery network into your own applications using our universal upload API.
apiDocs.endpoint
POST https://upload.zerostorage.net/api/upload/universalapiDocs.endpointDescription
apiDocs.authentication
apiDocs.apiKey
Include your API key in the request headers to associate uploads with your account.
x-api-key: your_api_key_hereapiDocs.anonymousUpload
Omit the API key header to perform an anonymous upload.
NO API KEY REQUIRED
apiDocs.requestParameters
| apiDocs.table.parameter | apiDocs.table.type | apiDocs.table.required | apiDocs.table.description |
|---|---|---|---|
| file | Binary/File | YES | apiDocs.table.file |
| title | String | No | apiDocs.table.title |
| description | String | No | apiDocs.table.descriptionParam |
| folderId | String (ID) | No | apiDocs.table.folderId |
apiDocs.response
HTTP 200 OKapiDocs.successResponse
{
"fileId": "gen_8x2a1",
"filename": "my_file.mp4",
"size": 1048576,
"viewUrl": "/watch/gen_8x2a1",
"success": true
}HTTP 401 UnauthorizedapiDocs.errorResponses
{
"error": "Invalid or inactive API key"
}apiDocs.exampleUsage
cURL (Command Line)
Bash / Terminal
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=My File Title" \ -k \ -s
PowerShell
PowerShell 7+
$form = @{
file = Get-Item -Path "C:\videos\clip.mp4"
title = "API Upload"
}
$response = Invoke-RestMethod -Uri 'https://upload.zerostorage.net/api/upload/universal' \
-Method Post \
-Headers @{ 'x-api-key' = 'your_api_key_here' } \
-Form $formFile Management
GET
List Files
Auth Required
https://upload.zerostorage.net/api/files?folderId=id&page=1&limit=12&search=query&fileType=videoExample Request
curl -X GET "https://upload.zerostorage.net/api/files?limit=2" \ -H "x-api-key: your_api_key_here"
Response Body
{
"files": [
{
"id": "f1",
"name": "vacation.mp4",
"size": 1048576,
"createdAt": "2024-03-29T12:00:00Z"
},
{
"id": "f2",
"name": "logo.png",
"size": 51200,
"createdAt": "2024-03-29T12:30:00Z"
}
],
"total": 45,
"page": 1,
"limit": 2
}DELETE
Delete File
Auth Required
https://upload.zerostorage.net/api/files/{fileId}Example Request
curl -X DELETE "https://upload.zerostorage.net/api/files/file_id_here" \ -H "x-api-key: your_api_key_here"
Response Body
{
"success": true,
"message": "File deleted successfully"
}Folder Management
GET
List Folders
Auth Required
https://upload.zerostorage.net/api/folders?parentId=id&page=1&limit=20Example Request
curl -X GET "https://upload.zerostorage.net/api/folders?parentId=root" \ -H "x-api-key: your_api_key_here"
Response Body
{
"folders": [
{
"id": "fol_1",
"name": "Documents",
"fileCount": 12
},
{
"id": "fol_2",
"name": "Work",
"fileCount": 5
}
],
"total": 2
}DELETE
Delete Folder
Auth Required
https://upload.zerostorage.net/api/folders/{folderId}Example Request
curl -X DELETE "https://upload.zerostorage.net/api/folders/fol_id_here" \ -H "x-api-key: your_api_key_here"
Response Body
{
"success": true,
"message": "Folder and all its contents deleted successfully"
}