> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bead.run/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete a machine

> Delete a machine and poll the returned operation while asynchronous cleanup continues.

## Authentication

Send your scoped bearer token in the `Authorization: Bearer <BEAD_TOKEN>` header, or send your API key in `X-API-Key`.

## Parameters

**sandboxID** `string` *required*

Machine identifier returned by creation.

**Idempotency-Key** `string`

Caller-generated durable retry key: lowercase ASCII letters, digits, and hyphens only. Reuse the same key and body after a connection failure. Minimum length: `1`. Maximum length: `255`.

```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
curl --request DELETE \
  --url "https://api.bead.run/sandboxes/$SANDBOX_ID" \
  --header "X-API-Key: $BEAD_API_KEY" \
  --header 'Idempotency-Key: 48fcb7cf-0f9e-4612-bd37-4c66171c2aae'
```

```python Python theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
# sandbox is returned by Sandbox.create or Sandbox.connect.
sandbox.kill()
```

```typescript TypeScript theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
// sandbox is returned by Sandbox.create or Sandbox.connect.
await sandbox.kill();
```

## Response

### 202

Deletion accepted; poll statusURL until status is deleted.

**operationID** `string` *required*

Operation UUID to poll for completion. Format: `uuid`.

**status** `string` *required*

Current operation state. Allowed values: `"deleting"`.

**statusURL** `string` *required*

Relative URL to poll operation progress.

### 204

The sandbox was killed successfully.

No response body.

## Errors

| Status | Meaning |
| - | - |
| 401 | Authentication credential is missing or rejected. |
| 403 | The credential lacks the required scope. |
| 404 | The requested resource does not exist or is outside your organization. |
| 429 | Request or resource admission limit exceeded (`admission_limit`; trial capacity can return `free_capacity_full`). Follow limit.next\_action and Retry-After when present. |
| 503 | Service or persistence is temporarily unavailable. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.