curl --silent --show-error --fail-with-body --request POST \
--url 'https://api.sandbox.stateset.app/api/v1/sandbox/create-from-template' \
--header "Authorization: ApiKey $STATESET_SANDBOX_API_KEY" \
--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 $STATESET_SANDBOX_API_KEY" \
--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.
Request body
CreateFromTemplateRequest
string
required
Identifier of the template to use.
integer
Timeout in seconds (30-3600). Minimum:
30. Maximum: 3600.object
Environment variables to inject. Additional keys map to values of type
string.string
Override template CPU limit (e.g., ‘2’, ‘500m’).
string
Override template memory limit (e.g., ‘2Gi’, ‘512Mi’).
Response
CreateSandboxResponse
string (uuid)
string
SandboxStatusEnum
Allowed values:
'creating', 'running', 'terminating', 'terminated', 'error'.string (date-time)
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 $STATESET_SANDBOX_API_KEY" \
--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 September 21, 2026