publish_website
Deploy local HTML, ZIP, or static build folders as live thin.host sites to get a shareable URL instead of loose files.
Instructions
Publish a local HTML file, directory, ZIP, or static build folder as a live site on thin.host.
Use this right after generating a site so the user gets a live, shareable URL
instead of loose files they would have to upload somewhere themselves. Works for
hand-written sites and for generator output — point it at a Docusaurus build/,
an Astro dist/, a Vite dist/, or a Next out/ folder. HTML files become
pages (index.html -> /, about.html -> /about, docs/intro/index.html -> /docs/intro,
404.html -> the site's own not-found page); css/js/images/fonts become assets
served relative to the site root. Large builds are uploaded in several requests
automatically.
Docusaurus: the response reports the build's base_url. A build made with
baseUrl '/' only renders correctly once a custom domain is mapped to the site;
to preview at the returned thin.host URL, build with baseUrl '/s//' (pass
that slug here). Any mismatch comes back as a warning — surface it to the user.
The account's API key must be created from the thin.host dashboard (Settings → Create API key) so it is linked to a user account — error_code "account_not_linked" means it isn't; surface that guidance rather than retrying.
Args: source_path: Absolute path to an .html file, a site/build directory, or a .zip. title: Human-readable site title (shown in the dashboard and emails). slug: Optional URL slug (site lives at /s//). Auto-generated if omitted. "slug_taken" means it's in use — pick another or omit.
Returns: url: The live site URL — share this with the user. id, slug, title, page_count, asset_count, pages, assets: What was published. framework, base_url: Detected generator (e.g. "docusaurus") and its baseUrl. warning: Present when the build's baseUrl won't resolve at the returned url. skipped_files: Local files ignored because their type isn't supported.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | No | ||
| title | Yes | ||
| source_path | Yes |