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

# Delete Bandwidth Rule

> Delete a bandwidth Auto Refill rule

## Delete Bandwidth Rule

Deletes a rule. No more refills are made for it, and the address becomes free for a new bandwidth rule. Bandwidth already bought is not taken back: those rentals run until the end of their term. Past refill orders stay in your order history. Requires the `buy_bandwidth` scope.

To stop refills for a while without losing the rule, [pause it](/api-reference/auto-refill/update-bandwidth-rule) instead.

### Path parameters

**rule\_id** `number` *required*

Rule ID — the `id` from Create or List Bandwidth Rules

### Response

**status** `string`

`ok`

### Example

```bash cURL theme={null}
curl -X DELETE https://api.tronrental.com/v1/bandwidth/auto-refill/15 \
  -H "X-API-Key: your_api_key"
```

```python Python theme={null}
import requests

resp = requests.delete(
    "https://api.tronrental.com/v1/bandwidth/auto-refill/15",
    headers={"X-API-Key": "your_api_key"},
)
print(resp.json())
```

```javascript JavaScript theme={null}
const resp = await fetch("https://api.tronrental.com/v1/bandwidth/auto-refill/15", {
  method: "DELETE",
  headers: { "X-API-Key": "your_api_key" },
});
console.log(await resp.json());
```

```json Response theme={null}
{
  "status": "ok"
}
```

### Errors

| Status | Code | When |
| - | - | - |
| `403` | `FORBIDDEN` | The API key lacks the `buy_bandwidth` scope |
| `404` | `NOT_FOUND` | No bandwidth rule with this ID on your account (or it was already deleted) |
| `409` | `AUTOREFILL_IN_PROGRESS` | A refill for this rule is being bought right now — retry in a minute |

```json theme={null}
{
  "detail": {
    "error": {
      "code": "NOT_FOUND",
      "message": "Auto-refill rule not found"
    }
  }
}
```


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