Sandbox Management
POST
/v1/sandboxPOST
/v1/sandboxYour instance endpoint, shown on the instance page in the dashboard. Each instance has its own host; there is no shared API host.
Request Body
| Property | Type | Required | Description |
|---|---|---|---|
tenantId | string | No | |
sessionId | string | No | |
image | string | No | |
cpuLimit | number | No | |
memoryMb | string | No | |
diskMb | string | No | |
timeoutSeconds | integer | No | |
networkMode | string | No | |
idleRetentionSeconds | integer | No | Idle retention in seconds. 0 means no expiration (pro/enterprise). When omitted, the server resolves retention from the tenant's plan tier. |
templateId | string | No | If set, use template config as base. Individual fields override template defaults. |
name | string | No | Optional friendly name for the sandbox. |
gitRepoUrl | string | No | |
gitBranch | string | No | |
gitInstallationId | string | No | |
sshEnabled | boolean | No |
Responses
200 Create a new sandbox instance
| Property | Type | Description |
|---|---|---|
id | string | |
sessionId | string | |
tenantId | string | |
containerId | string | |
status | string | |
backend | string | |
image | string | |
createdAt | string | |
expiresAt | string | |
name | string | Friendly name for the sandbox (if set). |
default An unexpected error response.
| Property | Type | Description |
|---|---|---|
code | integer | |
message | string | |
details | object[] |
Request
curl -X POST "https://{instance}.{region}.everstack.ai/v1/sandbox" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"tenantId":"string","sessionId":"string","image":"string","cpuLimit":0,"memoryMb":"string","diskMb":"string","timeoutSeconds":0,"networkMode":"string","idleRetentionSeconds":0,"templateId":"string","name":"string","gitRepoUrl":"string","gitBranch":"string","gitInstallationId":"string","sshEnabled":true}'const response = await fetch("https://{instance}.{region}.everstack.ai/v1/sandbox", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
"tenantId": "string",
"sessionId": "string",
"image": "string",
"cpuLimit": 0,
"memoryMb": "string",
"diskMb": "string",
"timeoutSeconds": 0,
"networkMode": "string",
"idleRetentionSeconds": 0,
"templateId": "string",
"name": "string",
"gitRepoUrl": "string",
"gitBranch": "string",
"gitInstallationId": "string",
"sshEnabled": true
}),
});
const data = await response.json();import requests
response = requests.post(
"https://{instance}.{region}.everstack.ai/v1/sandbox",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"tenantId": "string",
"sessionId": "string",
"image": "string",
"cpuLimit": 0,
"memoryMb": "string",
"diskMb": "string",
"timeoutSeconds": 0,
"networkMode": "string",
"idleRetentionSeconds": 0,
"templateId": "string",
"name": "string",
"gitRepoUrl": "string",
"gitBranch": "string",
"gitInstallationId": "string",
"sshEnabled": true
},
)
data = response.json()Response
{
"id": "string",
"sessionId": "string",
"tenantId": "string",
"containerId": "string",
"status": "string",
"backend": "string",
"image": "string",
"createdAt": "string",
"expiresAt": "string",
"name": "string"
}{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
