Clone
- POST
- /workspaces
- /:workspace
- /sandboxes
Creates a new sandbox by cloning an existing one.
Request example
curl -X POST "https://api.buddy.works/workspaces/:workspace/sandboxes" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"source_sandbox_id": "ghwmnj2az2k67",
"name": "My cloned sandbox",
"identifier": "cloned-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" } ] } }
STATUS201 Created