Run Sandbox Execution
- POST
- /workspaces
- /:workspace
- /sandboxes
- /:sandbox_id
- /execs
Run a one-shot execution in the sandbox: command runs with the chosen runtime. Follow it with the exec status and log endpoints of the sandbox.
Info
Returns right away with an
execution_id. For short commands that should return output in the response, use Execute Command.
Examples
Example: Sandbox command request
curl -X POST "https://api.buddy.works/workspaces/:workspace/sandboxes/:sandbox_id/execs" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"command": "ls -la"
}'Example: Sandbox Python command request
curl -X POST "https://api.buddy.works/workspaces/:workspace/sandboxes/:sandbox_id/execs" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"runtime": "PYTHON",
"command": "print('hello')"
}'EXAMPLE RESPONSE{ "url": "https://api.buddy.works/workspaces/my-workspace/sandboxes/sb-1234567890abcdef/execs/5c2e8a14-3b7d-4f61-a9e0-6d4b1c8f2e73", "log_url": "https://api.buddy.works/workspaces/my-workspace/sandboxes/sb-1234567890abcdef/execs/5c2e8a14-3b7d-4f61-a9e0-6d4b1c8f2e73/log", "execution_id": "5c2e8a14-3b7d-4f61-a9e0-6d4b1c8f2e73", "sandbox": "sb-1234567890abcdef", "runtime": "BASH", "type": "COMMAND", "invoker": { "url": "https://api.buddy.works/workspaces/my-workspace/members/1", "id": 1, "name": "John Doe" }, "command": "ls -la", "started_at": "2026-05-28T08:00:09.820Z", "status": "INPROGRESS" }
STATUS200 Execution accepted and started; row carries `status: RUNNING` until poll endpoints flip to terminal