REST API Documentation

Upload files, retrieve info, and manage your files programmatically from any application.

v1.0  ·  Last updated June 2026
Simple multipart upload — no SDK required
Guest upload available without registration
Bearer token auth for registered users
Base URL: https://zippyshare.day/api
All API responses are JSON. Errors return a success: false object with an error message. Successful responses return success: true with the relevant data.

Authentication

The API supports two modes:

  • Guest (no token) — Anyone can upload without registration. Guest file size and storage limits apply.
  • Registered user (Bearer token) — Login to your account, go to Settings → API Access, and generate a token. User limits apply.

Include the token in the Authorization header:

Authorization: Bearer YOUR_API_TOKEN

To get a token: log in → Account SettingsAPI AccessGenerate Token.

Endpoints Overview

Method Endpoint Auth Description
POST/api/uploadOptionalUpload a file
GET/api/file/{file_id}NoneGet file info
DELETE/api/file/{file_id}RequiredDelete your file
GET/api/userRequiredAccount info & limits

POST /api/upload — Upload a File

Upload a file using multipart/form-data. Omit the Authorization header to upload as a guest.

Request Parameters

ParameterTypeRequiredDescription
fileFileYesThe file to upload
auto_deleteIntegerNoOptional. Days until deletion: 0=never, 1, 7, 30, 90, 365. Default: 0 (Never) — omit this parameter to keep the file forever.

cURL — User upload (with token)

curl -X POST https://zippyshare.day/api/upload \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -F "file=@/path/to/document.pdf"

cURL — Guest upload (no token)

curl -X POST https://zippyshare.day/api/upload \
  -F "file=@/path/to/photo.jpg"

JavaScript (fetch)

const form = new FormData();
form.append('file', fileInput.files[0]);
// auto_delete defaults to 0 (Never) — omit to keep file forever

const res = await fetch('https://zippyshare.day/api/upload', {
  method: 'POST',
  headers: { 'Authorization': 'Bearer YOUR_API_TOKEN' },
  body: form,
});
const data = await res.json();
console.log(data.download_link);

PHP

$curl = curl_init();
curl_setopt_array($curl, [
  CURLOPT_URL => 'https://zippyshare.day/api/upload',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_POST => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_TOKEN'],
  CURLOPT_POSTFIELDS => [
    'file' => new CURLFile('/path/to/file.zip', 'application/zip', 'file.zip'),
    // 'auto_delete' => 0, // optional — omit to keep file forever
  ],
]);
$response = json_decode(curl_exec($curl), true);
echo $response['download_link'];

Python

import requests

with open('/path/to/file.zip', 'rb') as f:
    res = requests.post(
        'https://zippyshare.day/api/upload',
        headers={'Authorization': 'Bearer YOUR_API_TOKEN'},
        files={'file': f},
        # data={'auto_delete': 0},  # optional — omit to keep file forever
    )
data = res.json()
print(data['download_link'])

Success Response (HTTP 201)

{{
  "success": true,
  "file_id": "abc123xyz456def",
  "name": "document.pdf",
  "size": 204800,
  "extension": "pdf",
  "download_link": "https://zippyshare.day/f/abc123xyz456def",
  "preview_link": "https://zippyshare.day/p/abc123xyz456def",
  "expires_at": "2026-07-28T00:00:00+00:00"
}}

Note: preview_link is only returned for images and PDF files. expires_at is null when the file never expires. If you omit auto_delete, the file is kept forever.

GET /api/file/{file_id} — Get File Info

Retrieve information about any uploaded file. No authentication required.

curl https://zippyshare.day/api/file/abc123xyz456def

Success Response (HTTP 200)

{{
  "success": true,
  "file_id": "abc123xyz456def",
  "name": "document.pdf",
  "size": 204800,
  "extension": "pdf",
  "mime": "application/pdf",
  "type": "pdf",
  "download_link": "https://zippyshare.day/f/abc123xyz456def",
  "preview_link": "https://zippyshare.day/p/abc123xyz456def",
  "downloads": 14,
  "uploaded_at": "2026-06-28T10:30:00+00:00",
  "expires_at": "2026-07-28T10:30:00+00:00"
}}

DELETE /api/file/{file_id} — Delete a File

Permanently delete one of your own uploaded files. Bearer token required. You can only delete files uploaded with your account.

curl -X DELETE https://zippyshare.day/api/file/abc123xyz456def \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Success Response (HTTP 200)

{{
  "success": true,
  "message": "File deleted successfully."
}}

GET /api/user — Account Info & Limits

Returns your account details and current upload limits. Bearer token required.

curl https://zippyshare.day/api/user \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Success Response (HTTP 200)

{{
  "success": true,
  "user": {{
    "id": 42,
    "name": "John Doe",
    "email": "john@example.com"
  }},
  "limits": {{
    "max_file_size": 1073741824,
    "max_file_size_format": "1.00 GB",
    "storage_total": null,
    "storage_used": 52428800,
    "storage_remaining": null,
    "files_duration_days": null
  }},
  "upload_endpoint": "https://zippyshare.day/api/upload"
}}

Error Responses

All errors return a JSON object with success: false and an error message.

{{
  "success": false,
  "error": "File is too large. Max allowed: 500 MB"
}}
HTTP StatusMeaning
201File uploaded successfully
200Request successful
401Unauthorized — invalid or missing token on a protected endpoint
404File not found
422Validation error (file too large, invalid params, blocked file type, etc.)

Guest vs User Limits

Upload limits are set by the site administrator and may change. Use GET /api/user to check your current limits programmatically.

FeatureGuest (no token)Registered User (token)
Max file sizeSet by adminSet by admin (usually higher)
Storage spaceShared IP-based quotaPersonal quota
Delete files via APINot availableYes
File linked to accountNo (anonymous)Yes

Getting Your API Token

  1. Create a free account or log in at https://zippyshare.day/register
  2. Go to Account Settings → API Access
  3. Enter a name for your token (e.g. "My Website") and click Generate Token
  4. Copy the token immediately — it is shown only once
  5. Use it in the Authorization: Bearer header of your requests
Keep your API token secret. Do not expose it in client-side JavaScript, public repositories, or shared code. If compromised, revoke it immediately from Settings → API Access and generate a new one.