madethis.websiteapi

Upload API

Implement uploads in any language. Base URL: https://www.madethis.website

Chunked upload no auth

For folders, zips, or large files. Three steps: initchunkfinalize.

1. Init

POST /api/upload/init
Content-Type: application/json

{"totalBytes": 12345, "ttlSeconds": 3600}

Returns uploadId and chunkSize (3 MB).

2. Chunk

POST /api/upload/chunk
Content-Type: application/octet-stream
x-upload-id: <uploadId>
x-chunk-index: 0

<raw bytes>

3. Finalize

POST /api/upload/finalize
Content-Type: application/json

{
  "uploadId": "<uploadId>",
  "totalChunks": 1,
  "ttlSeconds": 3600,
  "sha256": "<sha256 hex of full zip>"
}

Returns slug and url like /s/abc12345/.

CLI upload api key

Single request for scripts. Get your key at /admin.

curl -fsS -X POST "https://www.madethis.website/api/cli/upload?ttl=1h" \
  -H "Authorization: Bearer $MADETHIS_API_KEY" \
  -H "Content-Type: text/html; charset=utf-8" \
  --data-binary @index.html

Supported: .html · .md · .js / .css (auto-wrapped) · .zip

Response includes fullUrl ready to share.

Serving

GET /s/{slug}/
GET /s/{slug}/app.js
GET /s/{slug}/about.html
GET /s/{slug}/readme.md?raw=1

HTML, JS, and CSS render in the browser. Markdown files get a built-in viewer (headings, code blocks, links). Use ?raw=1 for the source text.

Expired → 410. Missing → 404.

Limits

Full reference with Python/JS examples: API.md on GitHub