Skip to main content
POST
/
sandbox
/
{sandboxIdOrName}
/
start
curl -X POST https://api.daytona.io/sandbox/sandbox123/start \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "X-Daytona-Organization-ID: your-org-id"
{
  "id": "sandbox123",
  "organizationId": "org456",
  "name": "my-development-sandbox",
  "snapshot": "ubuntu-4vcpu-8ram-100gb",
  "user": "daytona",
  "env": {
    "NODE_ENV": "development"
  },
  "labels": {
    "project": "my-app",
    "environment": "dev"
  },
  "public": false,
  "networkBlockAll": false,
  "target": "us-east-1",
  "cpu": 4,
  "gpu": 0,
  "memory": 8,
  "disk": 100,
  "state": "starting",
  "desiredState": "started",
  "autoStopInterval": 60,
  "autoArchiveInterval": 10080,
  "autoDeleteInterval": -1,
  "volumes": [],
  "createdAt": "2024-10-01T12:00:00Z",
  "updatedAt": "2024-10-01T14:30:00Z",
  "runnerId": "runner789"
}
Starts a stopped sandbox or restores an archived sandbox to a running state.

Headers

X-Daytona-Organization-ID
string
Use with JWT to specify the organization ID

Path Parameters

sandboxIdOrName
string
required
ID or name of the sandbox to start

Response

Returns the updated sandbox object with the new state.
id
string
The unique identifier of the sandbox
organizationId
string
The organization ID of the sandbox
name
string
The name of the sandbox
snapshot
string
The snapshot used for the sandbox
user
string
The user associated with the sandbox
env
object
Environment variables for the sandbox
labels
object
Labels for the sandbox
public
boolean
Whether the sandbox HTTP preview is public
networkBlockAll
boolean
Whether all network access is blocked
networkAllowList
string
Comma-separated list of allowed CIDR network addresses
target
string
The target environment for the sandbox
cpu
number
The CPU quota for the sandbox
gpu
number
The GPU quota for the sandbox
memory
number
The memory quota for the sandbox in GB
disk
number
The disk quota for the sandbox in GB
state
string
The current state of the sandbox (will be starting or restoring)Options: starting, restoring, started
desiredState
string
The desired state of the sandbox
autoStopInterval
number
Auto-stop interval in minutes
autoArchiveInterval
number
Auto-archive interval in minutes
autoDeleteInterval
number
Auto-delete interval in minutes
volumes
array
Array of volumes attached to the sandbox
createdAt
string
The creation timestamp of the sandbox
updatedAt
string
The last update timestamp of the sandbox
runnerId
string
The runner ID of the sandbox
curl -X POST https://api.daytona.io/sandbox/sandbox123/start \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "X-Daytona-Organization-ID: your-org-id"
{
  "id": "sandbox123",
  "organizationId": "org456",
  "name": "my-development-sandbox",
  "snapshot": "ubuntu-4vcpu-8ram-100gb",
  "user": "daytona",
  "env": {
    "NODE_ENV": "development"
  },
  "labels": {
    "project": "my-app",
    "environment": "dev"
  },
  "public": false,
  "networkBlockAll": false,
  "target": "us-east-1",
  "cpu": 4,
  "gpu": 0,
  "memory": 8,
  "disk": 100,
  "state": "starting",
  "desiredState": "started",
  "autoStopInterval": 60,
  "autoArchiveInterval": 10080,
  "autoDeleteInterval": -1,
  "volumes": [],
  "createdAt": "2024-10-01T12:00:00Z",
  "updatedAt": "2024-10-01T14:30:00Z",
  "runnerId": "runner789"
}

Notes

  • If the sandbox is in an archived state, it will be restored before starting
  • The sandbox state will transition to starting and eventually to started
  • Starting a sandbox that is already running will have no effect

Build docs developers (and LLMs) love