> For AI agents: the complete documentation index is available at https://proxykite.com/docs/llms.txt, the full documentation bundle is available at https://proxykite.com/docs/llms-full.txt.

# Whitelist

Client IPs on a proxy's whitelist can use the proxy **without a username and password** (HTTP and SOCKS5).
Everyone else still needs a proxy user. See [Proxy formats](https://proxykite.com/docs/guide/proxy-formats.md#whitelisted-ips-no-password).

Rules: IPv4 ranges must be `/16` or narrower, IPv6 `/32` or narrower; at most 20 entries per proxy; a single IP is
stored as `/32` (IPv4) or `/128` (IPv6). Changes reach the proxy with the node's next config pull (seconds).

## List


`GET /proxies/{id}/whitelist`

**Ability:** `read`



**curl**

```bash
curl 'https://proxykite.com/api/v1/proxies/7/whitelist' \
  -H "Authorization: Bearer $HYP_TOKEN" \
  -H 'Accept: application/json'
```


**Python**

```python
import os
import requests

r = requests.get(
    "https://proxykite.com/api/v1/proxies/7/whitelist",
    headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"},
    timeout=30,
)
print(r.status_code, r.json())
```


**Node.js**

```js
const res = await fetch('https://proxykite.com/api/v1/proxies/7/whitelist', {
  headers: {
    Authorization: `Bearer ${process.env.HYP_TOKEN}`,
    Accept: 'application/json',
  },
  signal: AbortSignal.timeout(30000),
});
console.log(res.status, await res.json());
```


**PHP**

```php
<?php
$ch = curl_init('https://proxykite.com/api/v1/proxies/7/whitelist');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('HYP_TOKEN'),
        'Accept: application/json',
    ],
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
var_dump($status, json_decode($body, true));
```



**Response `200`**

```json
{"data": [{"id": 3, "cidr": "203.0.113.4/32", "note": "office"}]}
```

## Add


`POST /proxies/{id}/whitelist`

**Ability:** `manage` · **Who:** anyone on the account except team viewers; sub-users for their assigned proxies.

| Body field | Type         |                                                                 |
| ---------- | ------------ | --------------------------------------------------------------- |
| `cidr`     | string ≤ 64  | **required**: an IP (`203.0.113.4`) or range (`203.0.113.0/24`) |
| `note`     | string ≤ 100 | optional                                                        |



**curl**

```bash
curl -X POST 'https://proxykite.com/api/v1/proxies/7/whitelist' \
  -H "Authorization: Bearer $HYP_TOKEN" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{"cidr":"203.0.113.4","note":"office"}'
```


**Python**

```python
import os
import requests

r = requests.post(
    "https://proxykite.com/api/v1/proxies/7/whitelist",
    headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"},
    json={"cidr": "203.0.113.4", "note": "office"},
    timeout=30,
)
print(r.status_code, r.json())
```


**Node.js**

```js
const res = await fetch('https://proxykite.com/api/v1/proxies/7/whitelist', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.HYP_TOKEN}`,
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"cidr":"203.0.113.4","note":"office"}),
  signal: AbortSignal.timeout(30000),
});
console.log(res.status, await res.json());
```


**PHP**

```php
<?php
$ch = curl_init('https://proxykite.com/api/v1/proxies/7/whitelist');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('HYP_TOKEN'),
        'Accept: application/json',
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => '{"cidr":"203.0.113.4","note":"office"}',
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
var_dump($status, json_decode($body, true));
```



**Response `201`**

```json
{"data": {"id": 4, "cidr": "203.0.113.4/32", "note": "office"}}
```

`422 validation_failed` (`fields.cidr`) for an invalid or too-wide range, a duplicate, or a full list.

## Remove


`DELETE /proxies/{id}/whitelist/{entryId}`

**Ability:** `manage`



**curl**

```bash
curl -X DELETE 'https://proxykite.com/api/v1/proxies/7/whitelist/4' \
  -H "Authorization: Bearer $HYP_TOKEN" \
  -H 'Accept: application/json'
```


**Python**

```python
import os
import requests

r = requests.delete(
    "https://proxykite.com/api/v1/proxies/7/whitelist/4",
    headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"},
    timeout=30,
)
print(r.status_code)  # 204 = done
```


**Node.js**

```js
const res = await fetch('https://proxykite.com/api/v1/proxies/7/whitelist/4', {
  method: 'DELETE',
  headers: {
    Authorization: `Bearer ${process.env.HYP_TOKEN}`,
    Accept: 'application/json',
  },
  signal: AbortSignal.timeout(30000),
});
console.log(res.status); // 204 = done
```


**PHP**

```php
<?php
$ch = curl_init('https://proxykite.com/api/v1/proxies/7/whitelist/4');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'DELETE',
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('HYP_TOKEN'),
        'Accept: application/json',
    ],
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
echo $status, PHP_EOL; // 204 = done
```



**Response `204`** (no body) · `404 not_found` if the entry is not on this proxy.
