curl --silent --show-error --fail-with-body --request POST \
--url 'https://api.sandbox.stateset.app/api/v1/sandbox/create-from-template' \
--header 'Authorization: ApiKey YOUR_API_KEY' \
--header "Idempotency-Key: ${IDEMPOTENCY_KEY:?Set a unique key for this operation; preserve it on retries}" \
--header 'Content-Type: application/json' \
--data '{
"template_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"timeout_seconds": 250,
"env": {},
"override_cpus": "string",
"override_memory": "string"
}'
{
"sandbox_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"session_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "creating",
"expires_at": "2026-08-31T14:22:05Z"
}
Create sandbox from a template
Creates a new sandbox pre-configured from a named template Served by the live controller (answers 401 unauthenticated) but absent from its published…
POST
/
api
/
v1
/
sandbox
/
create-from-template
curl --silent --show-error --fail-with-body --request POST \
--url 'https://api.sandbox.stateset.app/api/v1/sandbox/create-from-template' \
--header 'Authorization: ApiKey YOUR_API_KEY' \
--header "Idempotency-Key: ${IDEMPOTENCY_KEY:?Set a unique key for this operation; preserve it on retries}" \
--header 'Content-Type: application/json' \
--data '{
"template_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"timeout_seconds": 250,
"env": {},
"override_cpus": "string",
"override_memory": "string"
}'
{
"sandbox_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"session_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "creating",
"expires_at": "2026-08-31T14:22:05Z"
}
Confirm your deployment before running this request. This page describes an API contract;
a published reference does not establish hosted availability. Check the dated
host report and obtain your deployment URL and credentials.
Replace the example host if your provisioned service uses a different URL.
/openapi.json — verified 2026-08-31.
Headers
Persist before first dispatch; exact retries retain principal, route, body and original result. Do not change keys to escape an uncertain mutation.
Request body
CreateFromTemplateRequest
Response
CreateSandboxResponse
Status codes
| Code | Meaning |
|---|---|
200 | Sandbox created from template |
400 | — |
401 | — |
404 | — |
500 | — |
Using this contract
Read the source OpenAPI document for declared schemas and alternatives. This page also includes documented corrections from the spec overlays. Example IDs and values are illustrative; replace them with records from your workspace.curl --silent --show-error --fail-with-body --request POST \
--url 'https://api.sandbox.stateset.app/api/v1/sandbox/create-from-template' \
--header 'Authorization: ApiKey YOUR_API_KEY' \
--header "Idempotency-Key: ${IDEMPOTENCY_KEY:?Set a unique key for this operation; preserve it on retries}" \
--header 'Content-Type: application/json' \
--data '{
"template_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"timeout_seconds": 250,
"env": {},
"override_cpus": "string",
"override_memory": "string"
}'
{
"sandbox_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"session_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "creating",
"expires_at": "2026-08-31T14:22:05Z"
}
Last modified on October 20, 2026