Endpoint
Authentication
Requires authentication via Bearer token in theAuthorization header.
Request
Multipart Form Data
Send files asmultipart/form-data with one or more file fields.
Headers
All upload options are configured via custom headers:Filename format to use. Options:
random, uuid, date, name, gfycat, random-words.Override the generated filename (without extension).
Override the file extension.
Override the return domain. Supports multiple domains separated by commas (randomly selected).
Set file expiration. Accepts:
- Human-readable duration:
1d,7d,30m,2h - ISO date:
date=2024-12-31T23:59:59Z - Never expire:
never
If server has
maxExpiration configured, requests exceeding this limit will be rejected.Protect file with a password. Users must enter this password to view the file.
Maximum number of views before file is deleted.
Store the original filename for reference.
Upload to a specific folder ID.
Folder must allow uploads if uploading without authentication.
Compress images by the specified percentage (0-100). Only works for image files.
Image compression format. Options:
webp, jpeg, png, avif.Return plain text URLs (comma-separated) instead of JSON response.
Response
JSON Response (default)
Array of uploaded file objects.
Unique file identifier.
Generated filename with extension.
MIME type of the file.
Full URL to access the file.
Whether GPS metadata was removed (if enabled in server config).
ISO 8601 timestamp when files will be deleted, or
"never" if no expiration.Array indicating which files had assumed MIME types (if server has
assumeMimetypes enabled).Plain Text Response
WhenX-Zipline-No-Json: true is set, returns comma-separated URLs:
Examples
Basic Upload
Upload with Expiration
Upload with Compression
Upload Multiple Files
Password Protected Upload
Upload to Folder
Response Example
Error Responses
400 Bad Request
- Invalid header values
- Disabled file extension
- Invalid filename characters
- Unrecognized MIME type (when
assumeMimetypesis enabled)
403 Forbidden
- Folder not open for uploads
413 Payload Too Large
- File exceeds
maxFileSizelimit - Upload would exceed user quota
Notes
Files are validated against the server’s
disabledExtensions list. Check your server configuration for allowed file types.GPS metadata is automatically removed from images if
removeGpsMetadata is enabled in server configuration.