> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://api-docs.botbye.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://api-docs.botbye.com/_mcp/server.

# delete

DELETE https://api.botbye.com/api/v1/{account_id}/ip-lists/{ip_list_id}

Delete an IP list.

## Errors

| Status | `code` | When |
| --- | --- | --- |
| 404 | `protection_ip_list.ip_list_not_found` | The account has no list with this id |
| 409 | `protection_ip_list.ip_list_referenced_by_rules` | A custom rule still uses the list; change the rule first |

> **Accepted permissions**
> `Account → IP lists → Delete`
>
> **Token scope**
> `Account IP Lists Action`

Reference: https://api-docs.botbye.com/bot-bye-api/protection/ip-lists/delete

## Authentication

- `X-Api-Key` header (required) — Personal access token. Create it in your BotBye account under **Profile → Personal Access Tokens**, tick the scopes the endpoints you call require (see each endpoint's **Token scope**), and send the token in the `X-Api-Key` request header exactly as the console shows it (it is already Base64-encoded; a token saved earlier in the UUID form must be Base64-encoded first). A token works only for the account it was created in.

## Request

### Path parameters

- `account_id` (string, required)
- `ip_list_id` (string, required)

## Response

### 200

success

## Examples

**Response**

```json
{}
```

**SDK Code**

```python IP Lists_delete_example
import requests

url = "https://api.botbye.com/api/v1/account_id/ip-lists/ip_list_id"

headers = {"X-Api-Key": "<apiKey>"}

response = requests.delete(url, headers=headers)

print(response.json())
```

```javascript IP Lists_delete_example
const url = 'https://api.botbye.com/api/v1/account_id/ip-lists/ip_list_id';
const options = {method: 'DELETE', headers: {'X-Api-Key': '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go IP Lists_delete_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.botbye.com/api/v1/account_id/ip-lists/ip_list_id"

	req, _ := http.NewRequest("DELETE", url, nil)

	req.Header.Add("X-Api-Key", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby IP Lists_delete_example
require 'uri'
require 'net/http'

url = URI("https://api.botbye.com/api/v1/account_id/ip-lists/ip_list_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)
request["X-Api-Key"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java IP Lists_delete_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.delete("https://api.botbye.com/api/v1/account_id/ip-lists/ip_list_id")
  .header("X-Api-Key", "<apiKey>")
  .asString();
```

```php IP Lists_delete_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('DELETE', 'https://api.botbye.com/api/v1/account_id/ip-lists/ip_list_id', [
  'headers' => [
    'X-Api-Key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp IP Lists_delete_example
using RestSharp;

var client = new RestClient("https://api.botbye.com/api/v1/account_id/ip-lists/ip_list_id");
var request = new RestRequest(Method.DELETE);
request.AddHeader("X-Api-Key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift IP Lists_delete_example
import Foundation

let headers = ["X-Api-Key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.botbye.com/api/v1/account_id/ip-lists/ip_list_id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```