# Delete a sandbox

> Stop it if it is running, charge the run up to now, and delete the machine and its disk. This cannot be undone. Works with test-mode keys and on any plan, so a team that left its paid plan can still clean up.

`DELETE https://api.zavu.dev/v1/sandboxes/{sandboxId}`

Stop it if it is running, charge the run up to now, and delete the machine and its disk. This cannot be undone. Works with test-mode keys and on any plan, so a team that left its paid plan can still clean up.

## Parameters

- `sandboxId` (path, string, required): Sandbox ID.

## Responses

### 204

Deleted.

### 401

Unauthorized.

- `code` (string, required)
- `message` (string, required)
- `details` (object)

### 404

Sandbox not found, or it belongs to another project.

- `code` (string, required)
- `message` (string, required)
- `details` (object)

### 503

`sandbox_unavailable`: no machine capacity right now. Nothing was charged for machine time; retry shortly.

- `code` (string, required)
- `message` (string, required)
- `details` (object)

## Example

```bash
curl -X DELETE "https://api.zavu.dev/v1/sandboxes/sandbox_abc123" \
  -H "Authorization: Bearer $ZAVUDEV_API_KEY"
```

```typescript
import Zavudev from "@zavudev/sdk";

const zavu = new Zavudev({ apiKey: process.env.ZAVUDEV_API_KEY });

await zavu.sandboxes.delete("sandbox_abc123");
```
