Edit Sandbox

  • PATCH
  • /workspaces
  • /:workspace
  • /sandboxes
  • /:sandbox_id

Update sandbox configuration

Request

REQUIRED SCOPES
SANDBOX_MANAGE
URL PARAMETERS
workspacerequiredstring
The human-readable ID of the workspace

Example: "my-company"

sandbox_idrequiredstring
The ID of the sandbox

Example: "sb-1234567890abcdef"

POST PARAMETERS
namestring
The name of the sandbox
identifierstring
A human-readable ID. Alphanumeric characters, underscores, and hyphens (hyphens cannot appear at the start or end).
resourcesstring enum
The resource configuration of the sandbox (CPU x RAM)
Allowed enum:
1x2,
2x4,
3x6,
4x8,
5x10,
6x12,
7x14,
8x16,
9x18,
10x20,
11x22,
12x24,
CUSTOM
first_boot_commandsstring
The commands to run during first boot of the sandbox
app_dirstring
The application directory of the sandbox
appsSandboxAppView[]
The list of apps (run commands) for the sandbox
timeoutinteger
The timeout in seconds after which the sandbox will be automatically stopped
tagsstring[]
The list of tags associated with the sandbox
endpointsTunnelView[]
The tunnel endpoints of the sandbox
variablesAddVariableInObjectRequest[]
The environment variables of the sandbox
permissionsPermissionsView
Access permissions configuration

Response

RESPONSE BODY
urlread-onlystring
API endpoint to GET this object
html_urlread-onlystring
Web URL to view this object in Buddy.works
idstring
The ID of the sandbox
identifierstring
A human-readable ID. Alphanumeric characters, underscores, and hyphens (hyphens cannot appear at the start or end).
namestring
The name of the sandbox
statusstring enum
The current status of the sandbox
Allowed enum:
STARTING,
STOPPING,
FAILED,
RUNNING,
STOPPED,
RESTORING
setup_statusstring enum
The current setup status of the sandbox
Allowed enum:
INPROGRESS,
SUCCESS,
FAILED,
STALE
osstring
The operating system of the sandbox ["ubuntu:22.04", "ubuntu:24.04"]
resourcesstring enum
The resource configuration of the sandbox (CPU x RAM)
Allowed enum:
1x2,
2x4,
3x6,
4x8,
5x10,
6x12,
7x14,
8x16,
9x18,
10x20,
11x22,
12x24,
CUSTOM
first_boot_commandsstring
The commands to run during first boot of the sandbox
app_dirstring
The application directory of the sandbox
appsSandboxAppView[]
The list of apps (run commands) for the sandbox
timeoutinteger
The timeout in seconds after which the sandbox will be automatically stopped
tagsstring[]
The list of tags associated with the sandbox
boot_logsstring[]
The boot logs of the sandbox
endpointsTunnelView[]
The tunnel endpoints of the sandbox
ssh_hoststring
The SSH hostname
ssh_portinteger
The SSH port
projectProjectView
permissionsPermissionsView
Access permissions configuration
variablesEnvironmentVariableView[]
The environment variables of the sandbox

Last modified on Jan 26, 2026

Examples

Example: Update sandbox configuration

curl -X PATCH "https://api.buddy.works/workspaces/:workspace/sandboxes/:sandbox_id" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "Content-Type: application/json" \ -d '{ "name": "Updated sandbox name", "os": "ubuntu:24.04", "resources": "4x8", "first_boot_commands": "npm install && npm run build && npm test", "apps": [ "npm run start:prod" ], "app_dir": "/app/dist", "timeout": 7200, "tags": [ "production", "api", "nodejs", "optimized" ], "endpoints": [ { "name": "api", "endpoint": "3000", "type": "HTTP", "region": "EU", "whitelist": [ "192.168.1.0/24", "10.0.0.0/8", "172.16.0.0/12" ], "timeout": 45, "http": { "verify_certificate": true, "compression": true, "http2": true, "log_requests": false, "request_headers": { "X-Forwarded-For": "updated.domain.pl", "X-Real-IP": "127.0.0.1", "Cache-Control": "no-cache" }, "response_headers": { "X-Frame-Options": "SAMEORIGIN", "X-Content-Type-Options": "nosniff", "Strict-Transport-Security": "max-age=31536000" }, "login": "updated-api-user", "password": "new-secure-password-456", "circuit_breaker": 3, "serve_path": "/v2/api" } }, { "name": "monitoring", "endpoint": "9090", "type": "HTTP", "region": "EU", "timeout": 15, "http": { "verify_certificate": false, "compression": false, "serve_path": "/metrics" } } ], "variables": [ { "key": "my_var", "value": "some_value", "type": "VAR", "description": "a sandbox variable" } ], "permissions": { "others": "DENIED", "users": [ { "id": 42, "access_level": "MANAGE" }, { "id": 55, "access_level": "READ_WRITE" } ], "groups": [ { "id": 10, "access_level": "READ_WRITE" }, { "id": 20, "access_level": "READ_ONLY" } ] } }'

Example: Update sandbox name only

curl -X PATCH "https://api.buddy.works/workspaces/:workspace/sandboxes/:sandbox_id" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "Content-Type: application/json" \ -d '{ "name": "My Renamed Sandbox" }'
EXAMPLE RESPONSE
{ "url": "https://api.buddy.works/workspaces/my-workspace/sandboxes/sb-12345", "html_url": "https://app.buddy.works/sandboxes/sb-12345", "id": "sb-12345", "identifier": "my-api-sandbox", "name": "My API Development Sandbox", "status": "RUNNING", "source_sandbox_id": null, "snapshot_id": null, "os": "ubuntu:24.04", "resources": "2x4", "first_boot_commands": "npm install && npm run build", "app_dir": "/app", "apps": [ { "id": "a1b2c3d", "command": "npm start", "app_status": "RUNNING" } ], "timeout": 3600, "tags": [ "development", "api", "nodejs" ], "boot_logs": [ "Starting sandbox...", "Installing dependencies...", "npm install completed successfully", "Building application...", "Application ready on port 3000" ], "setup_status": "SUCCESS", "endpoints": [ { "name": "www", "endpoint": "80", "type": "HTTP", "region": "EU", "whitelist": [ "192.168.1.0/24" ], "timeout": 30, "http": { "endpoint_url": "https://www-my-api-sandbox-proj1757492386363-my-workspace.eu-1.buddy.app", "verify_certificate": true, "compression": true, "http2": true, "log_requests": true, "request_headers": { "X-Forwarded-For": "wp.pl" }, "response_headers": { "X-Frame-Options": "DENY" }, "circuit_breaker": 5, "serve_path": "/api" } } ], "project": { "url": "https://api.buddy.works/workspaces/my-workspace/projects/proj1757492386363", "html_url": "https://app.buddy.works/proj1757492386363", "name": "proj1757492386363", "display_name": "proj1757492386363", "status": "ACTIVE" }, "variables": [ { "key": "my_var", "value": "some_value", "type": "VAR", "description": "a sandbox variable" } ], "permissions": { "others": "READ_ONLY", "users": [ { "id": 42, "access_level": "READ_WRITE" } ], "groups": [ { "id": 10, "access_level": "READ_WRITE" } ] } }
STATUS
200 OK