Integrate Null Drop into your applications with our RESTful API. Secure, fast, and developer-friendly.
All API requests require authentication using Bearer tokens. Get your API key from theAPI Keys page.
Rate limits are per API key. Headers included: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
/api/v1/upload
Upload a file to Null Drop
curl -X POST https://nulldrop.xyz/api/v1/upload \ -H "Authorization: Bearer YOUR_API_KEY" \ -F "file=@document.pdf"
{ "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" }}
/api/v1/files
List your uploaded files with pagination
curl -X GET "https://nulldrop.xyz/api/v1/files?page=1limit=10" \ -H "Authorization: Bearer YOUR_API_KEY"
{ "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" } ] }}
/api/v1/files/{id}
Get details of a specific file
curl -X GET https://nulldrop.xyz/api/v1/files/cm123abc456 \ -H "Authorization: Bearer YOUR_API_KEY"
{ "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 }}
/api/v1/files/{id}
Permanently delete a file
curl -X DELETE https://nulldrop.xyz/api/v1/files/cm123abc456 \ -H "Authorization: Bearer YOUR_API_KEY"
{ "success": true, "data": { "message": "File deleted successfully" }}
{ "error": "Invalid or inactive API key", "code": "UNAUTHORIZED" }
UNAUTHORIZED
Invalid API keyRATE_LIMITED
Too many requestsFILE_NOT_FOUND
File doesn't existSTORAGE_EXCEEDED
Storage limit reachedINVALID_FILE_TYPE
File type not allowed