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
string
required
The site slug (e.g.,
bright-canvas-a7k2).Headers
Request Body
string
required
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