Integrate ephemeral sharing into your apps.
Temp File provides a simple, robust API for developers to upload, manage, and share files programmatically. Whether you're building a CLI tool, a mobile app, or a web platform, our API is designed for speed and security.
Introduction
The Temp File API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.
Base URL: https://tfile.freecustom.email/api
All requests should be made over HTTPS.
Authentication
The Temp File API uses API keys to authenticate requests. You can view and manage your API keys in the Dashboard Settings.
Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.
Authorization: Bearer tf_sk_...POST /upload
POSTRequest a signed URL to upload a file directly to our CDN. This approach ensures maximum speed and minimal latency.
Body Parameters
filenamestring
The original name of the file.
RequiredmimeTypestring
The MIME type of the file (e.g. image/png).
Requiredsizenumber
Size of the file in bytes.
Requiredsha256string
SHA-256 hash of the file for deduplication.
RequiredexpiryHoursnumber
Custom expiry time (1-720 hours).
curl -X POST https://tfile.freecustom.email/api/upload \
-H "Authorization: Bearer tf_sk_..." \
-H "Content-Type: application/json" \
-d '{
"filename": "backup.zip",
"size": 102456,
"sha256": "e3b0c442...",
"mimeType": "application/zip"
}'Changelog
Added SHA-256 Deduplication
Improved upload speeds for existing files by checking hashes before initiating storage transfers.
Initial API Release
Core upload and download endpoints released to production.