Run Command

  • POST
  • /workspaces
  • /:workspace
  • /sandboxes
  • /:sandbox_id
  • /commands

Run a command in a sandbox.

Request

REQUIRED SCOPES
SANDBOX_MANAGE
URL PARAMETERS
workspacerequiredstring
The workspace name.
sandbox_idrequiredstring
The ID of the sandbox.
POST PARAMETERS
commandrequiredstring
Command to execute in the sandbox.
runtimestring
Runtime environment for command execution (default: BASH). Available values: BASH, JAVASCRIPT, TYPESCRIPT, PYTHON.

Last modified on Jan 19, 2026

Request example

curl -X POST "https://api.buddy.works/workspaces/:workspace/sandboxes/:sandbox_id/commands" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "Content-Type: application/json" \ -d '{ "command": "ls -al", "runtime": "BASH" }'

Response

EXAMPLE RESPONSE
{ "url": "https://api.buddy.works/workspaces/buddy/sandboxes/mydn9rjrqvq8d/command/68d5030dfff30824fb1d3e35", "id": "68d5030dfff30824fb1d3e35", "command": "ls -al", "runtime": "BASH", "status": "INPROGRESS" }
STATUS
200 OK