Skip to main content

Overview

API v2 is a performance-optimized version of v1 with the following changes:
  • Base URL: /api/v1/api/v2
  • New isPublic parameter on upload
  • New _perf field in responses
  • Fully backward compatible

Endpoint Mapping

v1 Endpointv2 Endpoint
POST /api/v1/uploadPOST /api/v2/upload
N/APOST /api/v2/upload/bulk (NEW)
GET /api/v1/filesGET /api/v2/files
GET /api/v1/files/{id}GET /api/v2/files/{id}
GET /api/v1/files/{id}/downloadGET /api/v2/files/{id}/download
DELETE /api/v1/files/{id}DELETE /api/v2/files/{id}
N/ADELETE /api/v2/files/bulk (NEW)

Upload Changes

New Parameter: isPublic

POST /api/v2/upload
Content-Type: multipart/form-data

file: <binary>          # Required
isPublic: true|false    # Optional, defaults to true
Example:
curl -X POST https://nulldrop.xyz/api/v2/upload \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@document.pdf" \
  -F "isPublic=false"

Response Changes

v1 Response

{
  "success": true,
  "data": {
    "id": "abc123",
    "filename": "image.png",
    "size": 102400,
    "mimeType": "image/png",
    "downloadUrl": "https://nulldrop.xyz/api/v1/files/abc123/download",
    "shareUrl": "https://nulldrop.xyz/share/xyz789",
    "uploadedAt": "2025-10-09T12:00:00.000Z"
  }
}

v2 Response

{
  "success": true,
  "data": {
    "id": "abc123",
    "filename": "image.png",
    "size": 102400,
    "mimeType": "image/png",
    "downloadUrl": "https://nulldrop.xyz/api/v2/files/abc123/download",
    "shareUrl": "https://nulldrop.xyz/share/xyz789",
    "isPublic": true,
    "uploadedAt": "2025-10-09T12:00:00.000Z"
  },
  "_perf": 45
}
New fields:
  • isPublic (boolean): File visibility status
  • _perf (number): Request duration in milliseconds

Breaking Changes

None. v2 is fully backward compatible.