Create

  • POST
  • /workspaces
  • /:workspace
  • /sandboxes

Create a new sandbox

Request

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

Example: "my-company"

GET PARAMETERS
project_namerequiredstring
The human-readable ID of the project to filter sandboxes

Example: "my-project"

POST PARAMETERS
namerequiredstring
The name of the sandbox
identifierstring
A human-readable ID. Alphanumeric characters, underscores, and hyphens (hyphens cannot appear at the start or end).
osrequiredstring
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
appsstring[]
The list of apps (run commands) for the sandbox
tagsstring[]
The list of tags associated with the sandbox
endpointsTunnelView[]
The tunnel endpoints of the sandbox
variablesAddVariableInObjectRequest[]
The environment variables of the sandbox
timeoutinteger
The timeout in seconds after which the sandbox will be automatically stopped
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

Request example

curl -X POST "https://api.buddy.works/workspaces/:workspace/sandboxes" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "Content-Type: application/json" \ -d '{ "name": "New sandbox", "identifier": "new_sandbox", "os": "ubuntu:24.04", "resources": "2x4", "first_boot_commands": "npm install && npm run build", "apps": [ "npm start", "npm run worker" ], "app_dir": "/app", "timeout": 3600, "tags": [ "development", "api", "nodejs" ], "endpoints": [ { "name": "www", "endpoint": "80", "type": "HTTP", "region": "EU", "whitelist": [ "192.168.1.0/24", "10.0.0.0/8" ], "timeout": 30, "http": { "verify_certificate": true, "compression": true, "http2": true, "log_requests": true, "request_headers": { "X-Forwarded-For": "wp.pl", "X-Real-IP": "127.0.0.1" }, "response_headers": { "X-Frame-Options": "DENY", "X-Content-Type-Options": "nosniff" }, "login": "api-user", "password": "secure-password-123", "circuit_breaker": 5, "serve_path": "/api" } }, { "name": "secure_api", "endpoint": "443", "type": "TLS", "region": "EU", "timeout": 60, "tls": { "private_key": "-----BEGIN PRIVATE KEY----------END PRIVATE KEY-----", "certificate": "-----BEGIN CERTIFICATE----------END CERTIFICATE-----", "ca_certificate": "-----BEGIN CERTIFICATE----------END CERTIFICATE-----", "terminate_at": "REGION" } } ], "variables": [ { "key": "my_var", "value": "some_value", "type": "VAR", "description": "a sandbox variable" } ], "permissions": { "others": "READ_ONLY", "users": [ { "id": 42, "access_level": "READ_WRITE" }, { "id": 100, "access_level": "MANAGE" } ], "groups": [ { "id": 10, "access_level": "READ_WRITE" } ] } }'
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
201 Created