API documentation

The API supports simple multipart uploads up to 25 MiB and resumable chunked uploads up to 100 GiB. All responses use JSON except chunk uploads and file downloads.

Download the OpenAPI JSON specification

Limits

Simple upload

POST /api/v1/files

Send multipart fields file and optional retention. Retention defaults to one hour.

curl -X POST https://temp.files.land/api/v1/files \
  -F "file=@example.jpg" \
  -F "retention=6h"

The response contains the public url, expiration time, file ID, and a secret managementToken used for early deletion.

Chunked upload

GET/api/v1/capacity
POST/api/v1/uploads
GET/api/v1/uploads/:id
PATCH/api/v1/uploads/:id
POST/api/v1/uploads/:id/complete
DELETE/api/v1/uploads/:id

1. Create a session

curl -X POST https://temp.files.land/api/v1/uploads \
  -H "Content-Type: application/json" \
  --data '{"filename":"archive.zip","sizeBytes":104857600,"retention":"24h"}'

2. Upload sequential chunks

Send raw binary data with the management token and current byte offset. Read the next offset from the response Upload-Offset header.

curl -X PATCH https://temp.files.land/api/v1/uploads/UPLOAD_ID \
  -H "Authorization: Bearer MANAGEMENT_TOKEN" \
  -H "Upload-Offset: 0" \
  -H "Content-Type: application/octet-stream" \
  --data-binary @chunk.bin

3. Complete the upload

curl -X POST https://temp.files.land/api/v1/uploads/UPLOAD_ID/complete \
  -H "Authorization: Bearer MANAGEMENT_TOKEN"

Downloads and deletion

GET/f/:id/:filename
HEAD/f/:id/:filename
DELETE/api/v1/files/:id

Downloads are public to anyone with the generated URL. Deletion requires the management token as a bearer token.