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

# list

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

List the account's IP lists with the number of addresses in each.

A custom rule matches the addresses of a list with the condition `ip IN ["@ip_list:<list id>"]` (or `NOT IN`).

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

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

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

## Response

### 200

success

- `list of ApiV1AccountIdIpListsGetResponsesContentApplicationJsonSchemaItems`

## Types

### ApiV1AccountIdIpListsGetResponsesContentApplicationJsonSchemaItems

- `id` (string, required)
- `name` (string, required)
- `version` (integer, required) — Grows by one on every change of the list's items
- `itemsCount` (integer, required)
- `createdAt` (string, required)
- `updatedAt` (string, required)

## Examples

**Response**

```json
[
  {
    "id": "01a1d45d-bd8b-7796-9184-2fba2b8a5c0e",
    "name": "office",
    "version": 1,
    "itemsCount": 2,
    "createdAt": "1794564275595",
    "updatedAt": "1794564275595"
  }
]
```

**SDK Code**

```python IP Lists_list_example
import requests

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

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

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

print(response.json())
```

```javascript IP Lists_list_example
const url = 'https://api.botbye.com/api/v1/account_id/ip-lists';
const options = {method: 'GET', 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_list_example
package main

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

func main() {

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

	req, _ := http.NewRequest("GET", 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_list_example
require 'uri'
require 'net/http'

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

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

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

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

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

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

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

$client = new \GuzzleHttp\Client();

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

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

```csharp IP Lists_list_example
using RestSharp;

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

```swift IP Lists_list_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")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
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()
```