Documentation Index
Fetch the complete documentation index at: https://docs.simplehost.dev/llms.txt
Use this file to discover all available pages before exploring further.
Finalize a Site
After uploading all files, call finalize to make the site live. The API verifies every file has been uploaded to storage before activating the version. Finalize also performs a security scan on browser-delivered files. If SimpleHost detects what looks like an exposed private key or secret in client-side code, finalize will block the publish instead of putting that site live publicly.Path Parameters
The site slug (e.g.,
bright-canvas-a7k2).Headers
| Header | Required | Description |
|---|---|---|
Content-Type | Yes | application/json |
Authorization | Conditional | Required for authenticated sites. Not needed for anonymous sites. |
Request Body
The version ID from the create/update response at
upload.versionId.Example
Response (200)
siteUrl.
Secure Publish Blocking
If finalize detects exposed secret material in the uploaded site files, it returnsSECRET_DETECTED and the site does not go live.
This is intentional. Static browser files are public, so private keys should not be published inside them.
Example Blocked Response
Recommended Agent Behavior
If you are publishing through an agent, the expected flow is:- Explain the issue in plain English
- Ask the user for permission to secure it
- If the user agrees:
- store the secret in site variables
- approve the required proxy host
- update only the published copy
- retry finalize
- If the user refuses, do not publish the site
Errors
| Status | Code | Reason |
|---|---|---|
| 404 | NOT_FOUND | Site not found |
| 401 | UNAUTHORIZED | Not authorized to finalize this site |
| 400 | INVALID_REQUEST | versionId doesn’t match the pending version |
| 400 | INVALID_REQUEST | Not all files have been uploaded |
| 400 | SECRET_DETECTED | Exposed private key or secret was found in public site files |