Endpoint
Request
Headers
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
command | string | Yes | Shell command to execute |
timeout | integer | No | Max execution time in seconds (default: 300) |
working_dir | string | No | Working directory |
env | object | No | Environment variables |
name | string | No | Process name for identification |
Example Request
Response
Success (200 OK)
Response Fields
| Field | Type | Description |
|---|---|---|
process_id | string | Process ID (use to check status or kill) |
execution_id | string | Execution ID |
status | string | Initial status (queued or running) |
Status Codes
| Code | Description |
|---|---|
| 200 | Command started |
| 400 | Invalid request |
| 401 | Unauthorized |
| 500 | Failed to start command |
Use Cases
Start Web Server
Run Long Processing Job
Monitor Files
Start Development Server
Check Process Status
Use the List Processes endpoint:Kill Background Command
Use the Kill Process endpoint:Related
- SDK: sandbox.commands.run_background() - Python SDK method
- CLI Commands - Shell commands from CLI
Next Steps
- Run Command - Execute commands synchronously
- List Processes - Check background process status
- Kill Process - Terminate a background process

