REST API Reference

Base URL: https://dropai.zone/api/v1

Authentication

All API requests require an API key passed in the Authorization header:

Authorization: Bearer dz_your_api_key_here

Generate API keys from your account dashboard.


Upload a File

POST/api/v1/upload.php

Multipart Upload
curl -X POST https://dropai.zone/api/v1/upload.php \
  -H "Authorization: Bearer dz_your_key" \
  -F "file=@screenshot.png" \
  -F "ttl_hours=24" \
  -F "description=Error screenshot"
Base64 Upload (JSON)
curl -X POST https://dropai.zone/api/v1/upload.php \
  -H "Authorization: Bearer dz_your_key" \
  -H "Content-Type: application/json" \
  -d '{"file_base64": "iVBORw0...", "filename": "screenshot.png"}'
Parameters
FieldTypeRequiredDescription
filebinaryYes*File data (multipart)
file_base64stringYes*Base64-encoded file (JSON)
filenamestringWith base64Filename with extension
ttl_hoursintegerNoHours until expiry (0 = permanent, Pro only)
max_viewsintegerNoAuto-delete after N views (0 = unlimited)
visibilitystringNopublic, unlisted, or private
descriptionstringNoDescription (max 500 chars)

*Either file (multipart) or file_base64 + filename (JSON) required.

Response
{
  "success": true,
  "data": {
    "slug": "aB3xK9mQ",
    "url": "https://dropai.zone/d/aB3xK9mQ",
    "direct_url": "https://f005.backblazeb2.com/file/...",
    "filename": "screenshot.png",
    "size_bytes": 245760,
    "mime_type": "image/png",
    "expires_at": "2026-02-19T15:30:00Z",
    "created_at": "2026-02-18T15:30:00Z"
  },
  "message": "Dropped!"
}

Get Drop Metadata

GET/api/v1/drop.php?slug={slug}

curl https://dropai.zone/api/v1/drop.php?slug=aB3xK9mQ \
  -H "Authorization: Bearer dz_your_key"

Add &include_content=true to include raw text content for text files.


Delete a Drop

DELETE/api/v1/delete.php?slug={slug}

curl -X DELETE https://dropai.zone/api/v1/delete.php?slug=aB3xK9mQ \
  -H "Authorization: Bearer dz_your_key"

Requires full permission on the API key.


List Your Drops

GET/api/v1/list.php

curl "https://dropai.zone/api/v1/list.php?limit=10&page=1" \
  -H "Authorization: Bearer dz_your_key"

Parameters: page, limit (max 50), type_filter (image, text, document, all).


Error Responses

{
  "success": false,
  "error": "error_code",
  "message": "Human-readable description"
}
CodeHTTPDescription
unauthorized401Missing or invalid API key
rate_limited429Too many requests
not_found404Drop not found
upload_failed400Upload validation or storage error
insufficient_permissions403API key lacks required permission

Rate Limits

TierUploads/HourUploads/DayAPI Calls/Min
Free2510030
Pro1001,00030