apiDocs.title

apiDocs.endpoint

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

apiDocs.endpointDescription

apiDocs.authentication

apiDocs.authenticationDescription

  • apiDocs.apiKey: apiDocs.apiKeyDescriptionx-api-key: your_api_key_here

apiDocs.requestParameters

apiDocs.table.parameterapiDocs.table.typeapiDocs.table.requiredapiDocs.table.description
fileFileYesapiDocs.table.file
titleStringNoapiDocs.table.title
descriptionStringNoapiDocs.table.description
folderIdStringNoapiDocs.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": "Authentication required. Either provide an API key or log in."
}

apiDocs.badRequest

{
  "error": "No file provided"
}

apiDocs.exampleUsage

apiDocs.usingCurl

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

apiDocs.usingPowerShell

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

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
      }
    },
    {
      "id": "another_folder_id",
      "name": "Videos",
      "description": "Video files",
      "parent_id": null,
      "created_at": "2024-01-10T14:20:00.000Z",
      "updated_at": "2024-01-10T14:20:00.000Z",
      "_count": {
        "files": 12,
        "children": 0
      }
    }
  ],
  "pagination": {
    "total": 2,
    "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.errorResponses

apiDocs.unauthorized

{
  "error": "Invalid API key"
}

400 apiDocs.badRequest (apiDocs.createFolder)

{
  "error": "Folder name is required"
}

404 Not Found (apiDocs.createFolder)

{
  "error": "Parent 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.notes

  • apiDocs.notes1
  • apiDocs.notes2
  • apiDocs.notes3
  • apiDocs.notes4
Home
API Docs
Contact
Transparency
Report Abuse