Skip to main content
POST
Upload File
Upload a file to StashFyle. Returns file metadata including a public CDN URL (or null for private files).

Request

file
required
The file to upload. Max size depends on your plan (10MB-500MB).
string
Optional folder path to organize files. Example: images/avatars
boolean
default:"false"
Set to true to make the file private (requires secret key). Private files need signed URLs to access.
string
Auto-delete after this duration. Format: 1h, 7d, 30d. Omit for permanent storage.

Response

string
required
Unique file identifier. Example: f_abc123xyz
string
Public CDN URL. null for private files.
string
required
Original filename.
string
Folder path, or null if uploaded to root.
integer
required
File size in bytes.
string
MIME type. Example: image/jpeg
boolean
required
Whether the file is private.
string
ISO 8601 expiration timestamp, or null if permanent.
string
required
ISO 8601 creation timestamp.

Examples

Basic Upload

Response

Upload to Folder

Private File

Response

Auto-Expiring File

Response

Errors