Deploy Runtype Sandbox
Deploy a session-tier Runtype Sandbox preview. The preview URL is the credential and is bound to the container epoch: a new container mints a new URL, reported by effectivePolicy.freshContainer and previewUrlChanged. Omitted retention preserves unlimited retention; explicit retention is metered and rollout-gated, and the preview is refused from the retention deadline on. sleepPolicy { mode: “never” } keeps the container running until that deadline and requires retention of 10m, 1h or 24h. A redeploy stops the previous server first and fails if the new server never answers on the port.
Authentication
AuthorizationBearer
API key or Clerk session token
Request
This endpoint expects an object.
code
files
language
Allowed values:
managed
packageJson
port
retention
Allowed values:
sandboxId
sleepPolicy
startCommand
Response
Sandbox deployment result
sandboxId
status
effectivePolicy
error
output
previewUrl
stage
Errors
400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
409
Conflict Error
500
Internal Server Error
503
Service Unavailable Error