Everstack
API ReferenceAgentsSandbox Management

Sandbox Management

POST/v1/sandbox
POST/v1/sandbox

Your instance endpoint, shown on the instance page in the dashboard. Each instance has its own host; there is no shared API host.

Request Body

PropertyTypeRequiredDescription
tenantIdstringNo
sessionIdstringNo
imagestringNo
cpuLimitnumberNo
memoryMbstringNo
diskMbstringNo
timeoutSecondsintegerNo
networkModestringNo
idleRetentionSecondsintegerNoIdle retention in seconds. 0 means no expiration (pro/enterprise). When omitted, the server resolves retention from the tenant's plan tier.
templateIdstringNoIf set, use template config as base. Individual fields override template defaults.
namestringNoOptional friendly name for the sandbox.
gitRepoUrlstringNo
gitBranchstringNo
gitInstallationIdstringNo
sshEnabledbooleanNo

Responses

200 Create a new sandbox instance

PropertyTypeDescription
idstring
sessionIdstring
tenantIdstring
containerIdstring
statusstring
backendstring
imagestring
createdAtstring
expiresAtstring
namestringFriendly name for the sandbox (if set).

default An unexpected error response.

PropertyTypeDescription
codeinteger
messagestring
detailsobject[]

Request

curl -X POST "http://localhost:8089/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("http://localhost:8089/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(
    "http://localhost:8089/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"
    }
  ]
}