Skip to navigation

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.
codestringRequired>=1 character
filesmap from strings to stringsOptional
languageenumOptional
Allowed values:
managedbooleanOptional
packageJsonstringOptional
portintegerOptional1-65535
retentionenumOptional
Allowed values:
sandboxIdstringOptional>=1 character
sleepPolicyobjectOptional
startCommandstringOptional

Response

Sandbox deployment result
sandboxIdstring
statusstring
effectivePolicyobjectOptional
errorstringOptional
outputstringOptional
previewUrlstringOptional
stagestringOptional

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
409
Conflict Error
500
Internal Server Error
503
Service Unavailable Error