> ## 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.

# Excluir regra de largura de banda

> Excluir uma regra de Recarga automática de largura de banda

## Excluir regra de largura de banda

Exclui uma regra. Nenhuma nova recarga é feita para ela, e o endereço fica livre para uma nova regra de largura de banda. A largura de banda já comprada não é recuperada: esses aluguéis seguem até o fim do seu prazo. Os pedidos de recarga anteriores permanecem no seu histórico de pedidos. Exige o escopo `buy_bandwidth`.

Para interromper as recargas por um tempo sem perder a regra, [pause-a](/pt/api-reference/auto-refill/update-bandwidth-rule) em vez de excluí-la.

### Parâmetros de caminho

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

ID da regra — o `id` retornado por Criar ou Listar regras de largura de banda

### Resposta

**status** `string`

`ok`

### Exemplo

```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"
}
```

### Erros

| Status | Código | Quando |
| - | - | - |
| `403` | `FORBIDDEN` | A chave de API não tem o escopo `buy_bandwidth` |
| `404` | `NOT_FOUND` | Não há regra de largura de banda com este ID na sua conta (ou ela já foi excluída) |
| `409` | `AUTOREFILL_IN_PROGRESS` | Uma recarga desta regra está sendo comprada neste momento — tente novamente em um minuto |

```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.