Back to Home

API DOCUMENTATION

Integrate Null Drop into your applications with our RESTful API. Secure, fast, and developer-friendly.

Authentication

All API requests require authentication using Bearer tokens. Get your API key from theAPI Keys page.

Authorization Header:
Authorization: Bearer YOUR_API_KEY

Base URL

API Version:
https://nulldrop.xyz/api/v1

Rate Limits & API Keys

Free Plan

100 requests/min
2 API keys

Pro Lite

1,000 requests/min
5 API keys

Pro Plan

1,000 requests/min
10 API keys

Enterprise

Custom requests/min
Custom API keys

Rate limits are per API key. Headers included: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset

Endpoints

POST/api/v1/upload

Upload a file to Null Drop

Example Request
curl -X POST https://nulldrop.xyz/api/v1/upload \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@document.pdf"
Example Response
{
"success": true,
"data": {
"id": "cm123abc456",
"filename": "document.pdf",
"size": 2048576,
"mimeType": "application/pdf",
"downloadUrl": "https://nulldrop.xyz/api/v1/files/cm123abc456/download",
"shareUrl": "https://nulldrop.xyz/share/cuid_token_123",
"uploadedAt": "2024-01-15T10: 30: 00.000Z"
}
}
GET/api/v1/files

List your uploaded files with pagination

Example Request
curl -X GET "https://nulldrop.xyz/api/v1/files?page=1limit=10" \
-H "Authorization: Bearer YOUR_API_KEY"
Example Response
{
"success": true,
"data": {
"files": [
{
"id": "cm123abc456",
"filename": "abc123.pdf",
"originalName": "document.pdf",
"size": 2048576,
"downloadUrl": "https://nulldrop.xyz/api/v1/files/cm123abc456/download",
"shareUrl": "https://nulldrop.xyz/share/cuid_token_123",
"uploadedAt": "2024-01-15T10: 30: 00.000Z",
"updatedAt": "2024-01-15T10: 30: 00.000Z"
}
]
}
}
GET/api/v1/files/{id}

Get details of a specific file

Example Request
curl -X GET https://nulldrop.xyz/api/v1/files/cm123abc456 \
-H "Authorization: Bearer YOUR_API_KEY"
Example Response
{
"success": true,
"data": {
"id": "cm123abc456",
"filename": "document.pdf",
"size": 2048576,
"mimeType": "application/pdf",
"downloadUrl": "https://nulldrop.xyz/api/v1/files/cm123abc456/download",
"shareUrl": "https://nulldrop.xyz/share/cuid_token_123",
"downloadCount": 0,
"uploadedAt": "2024-01-15T10: 30: 00.000Z",
"updatedAt": "2024-01-15T10: 30: 00.000Z",
"expiresAt": null
}
}
DELETE/api/v1/files/{id}

Permanently delete a file

Example Request
curl -X DELETE https://nulldrop.xyz/api/v1/files/cm123abc456 \
-H "Authorization: Bearer YOUR_API_KEY"
Example Response
{
"success": true,
"data": {
"message": "File deleted successfully"
}
}

Status Codes & Errors

HTTP Status Codes

200Success
201Created
400Bad Request
401Unauthorized
404Not Found
429Rate Limited
500Server Error

Error Response Format

{
  "error": "Invalid or inactive API key",
  "code": "UNAUTHORIZED"
}

Common Error Codes

UNAUTHORIZEDInvalid API key
RATE_LIMITEDToo many requests
FILE_NOT_FOUNDFile doesn't exist
STORAGE_EXCEEDEDStorage limit reached
INVALID_FILE_TYPEFile type not allowed