# Run sandbox command

```http
POST /sandboxes/{sandbox_id}/commands/run
```

Run a sandbox command. Requires project.sandboxes.manage.

## Parameters

| Name         | In   | Required | Description                                 |
| ------------ | ---- | -------- | ------------------------------------------- |
| `sandbox_id` | path | Yes      | Sandbox UUID, as returned by createSandbox. |

## Request body

| Field             | Type    | Required | Description |
| ----------------- | ------- | -------- | ----------- |
| `command`         | string  | Yes      |             |
| `cwd`             | string  |          |             |
| `timeout_seconds` | integer |          |             |
| `env`             | object  |          |             |

## Responses

| Status | Description                        |
| ------ | ---------------------------------- |
| 200    | Result of the short-lived command. |
| 400    | Bad request                        |
| 402    | Payment required                   |
| 403    | Forbidden                          |
| 404    | Not found                          |
| 502    | Bad gateway                        |
| 503    | Service unavailable                |
