Overview
The Flexweg Publishing API lets you programmatically turn any HTML content into a public URL, manage files and folders on your static site, upload videos, and build embeddable forms with submission tracking. Everything is REST over JSON.
Authentication
Most Flexweg API endpoints are authenticated with an API key passed as an HTTP header. There are two types of keys, designed for different use cases.
Publish (demo)
A zero-friction endpoint that takes a blob of HTML and returns a public URL. No account, no API key. The published page expires 60 minutes after creation.
Files
CRUD endpoints for every file hosted on your Flexweg site — HTML, CSS, JS, images, fonts, PDF.
Folders
Create, rename and delete folders to organize your site's file tree. Folders are created automatically when you upload a file into a nested path — these endpoints are for when you want to manage the structure explicitly.
Storage
Check your site's current file count and storage usage against your plan's quota. Useful before a bulk upload, or to surface "near limit" warnings in an admin dashboard.
Videos
Video files use a dedicated endpoint with multipart/form-data upload — bypassing the JSON + base64 overhead of the generic file upload. The file is stored on object storage and served with the same pretty URL as the rest of your site.
Forms
Build embeddable forms — contact, newsletter, surveys — get ready-to-paste HTML or React snippets, and paginate over incoming submissions with spam filtering. All endpoints require X-API-Key.
Errors & limits
Flexweg returns standard HTTP status codes with structured JSON bodies. This page lists the status codes you'll see and the global limits you'll hit.