Upload Endpoint Documentation

Integrate our file storage platform into your own applications using our universal upload API.

Endpoint

POST https://upload.zerostorage.net/api/upload/universal

This endpoint allows you to upload video files to the platform. It supports both direct file uploads and chunked uploads for large files.

It accepts either multipart/form-data (direct file upload) or JSON with a url field (server-side download).

Authentication

API Key (Optional)

Include your API key in the request headers to associate uploads with your account.

x-api-key: your_api_key_here

Anonymous Upload

Omit the API key header to perform an anonymous upload.

NO API KEY REQUIRED

Upload a File (multipart/form-data)

ParameterTypeRequiredDescription
fileBinary/FileYESThe video file to upload
titleStringNoTitle for the video. If not provided, filename will be used
descriptionStringNoOptional description for the video
folderIdString (ID)NoOptional folder ID to organize the file. Use the Folders API to get available folder IDs

Upload from URL (JSON)

Send a JSON body to have the server download the file for you (same backend as the "Download from URL" feature). Supports direct links, known video hosts, and folder extractors (OneDrive, Gofile). Unlike direct file uploads, anonymous URL downloads are not allowed — an API key or logged-in session is required.

ParameterTypeRequiredDescription
urlString (URL)YESDirect URL of the file to download
titleStringNoCustom file title (filename is accepted as an alias)
descriptionStringNoOptional file description
folderIdString (ID)NoFolder to import into
Bash / Terminal
curl -X POST "https://upload.zerostorage.net/api/upload/universal" \
 -H "Content-Type: application/json" \
 -H "x-api-key: your_api_key_here" \
 -d '{"url": "https://example.com/video.mp4", "title": "video.mp4"}'

Success response: {"success": true, "fileId": "...", "message": "..."} — the download runs server-side in the background.

Response

HTTP 200 OKSuccess Response (200)

{
  "fileId": "gen_8x2a1",
  "filename": "my_file.mp4",
  "size": 1048576,
  "viewUrl": "/watch/gen_8x2a1",
  "success": true
}

HTTP 401 UnauthorizedError Responses

{
  "error": "Invalid or inactive API key"
}

Example Usage

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
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

cURL — Download from URL (JSON mode)

Bash / Terminal
curl -X POST "https://upload.zerostorage.net/api/upload/universal" \
 -H "Content-Type: application/json" \
 -H "x-api-key: your_api_key_here" \
 -d '{"url": "https://example.com/video.mp4", "title": "video.mp4"}'

PowerShell

PowerShell 5+
curl.exe -X POST "https://upload.zerostorage.net/api/upload/universal" `
-H "x-api-key: your_api_key_here" `
-F "file=@C:\videos\clip.mp4" `
-F "title=My File Title" `
-k
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 $form

File Management

GET

List Files

Auth Required
https://upload.zerostorage.net/api/files?folderId=id&page=1&limit=12&search=query&fileType=video

Example 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=20

Example Request

curl -X GET "https://upload.zerostorage.net/api/folders?parentId=root" \
  -H "x-api-key: your_api_key_here"

Response Body

{
  "folders": [
    {
      "id": "folder_1",
      "name": "Documents",
      "fileCount": 12
    },
    {
      "id": "folder_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/folder_id_here" \
  -H "x-api-key: your_api_key_here"

Response Body

{
  "success": true,
  "message": "Folder and all its contents deleted successfully"
}
Home
My Files
API Docs
Contact
Transfers