Upload File
Uploads
Upload File
Upload a file and get a public URL.
POST
Upload File
Upload a file to StashFyle. Returns file metadata including a public CDN URL (or null for private files).
Request
The file to upload. Max size depends on your plan (10MB-500MB).
Optional folder path to organize files. Example:
images/avatarsSet to
true to make the file private (requires secret key). Private files need signed URLs to access.Auto-delete after this duration. Format:
1h, 7d, 30d. Omit for permanent storage.Response
Unique file identifier. Example:
f_abc123xyzPublic CDN URL.
null for private files.Original filename.
Folder path, or
null if uploaded to root.File size in bytes.
MIME type. Example:
image/jpegWhether the file is private.
ISO 8601 expiration timestamp, or
null if permanent.ISO 8601 creation timestamp.
Examples
Basic Upload
Response
Upload to Folder
Private File
Response
Auto-Expiring File
Response
Errors
| Code | Status | Description |
|---|---|---|
unauthorized | 401 | Invalid or missing API key |
forbidden | 403 | Public key with invalid origin |
bad_request | 400 | Missing file or invalid parameters |
file_too_large | 413 | File exceeds plan limit |
storage_limit_exceeded | 413 | Storage quota exceeded |
grace_period | 403 | Account in grace period |
rate_limit_exceeded | 429 | Too many requests |