# Blocked IPs endpoints (Admin API)

> 3 FeatherPanel Admin API endpoints from admin/blocked-ips.php: methods, paths, auth, permissions, rate limits, parameters and responses.

Source: https://featherpanel.com/docs/api/reference/admin/blocked-ips/

Defined in [`backend/app/routes/admin/blocked-ips.php`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/blocked-ips.php). Authentication used here: **Admin**. Read [Authentication](https://featherpanel.com/docs/api/authentication/) for how to send credentials and [Rate limits and errors](https://featherpanel.com/docs/api/rate-limits-and-errors/) for the response envelope.

Paths, methods, permissions and rate limits come from the route file. Summaries, parameters and response codes come from the OpenAPI annotations on the controllers; endpoints without annotations show only what the route file declares.

## Endpoints

### GET `/api/admin/blocked-ips`

- Auth: Admin
- Permission: `admin.blocked_ips.view`
- Route name: `admin-blocked-ips`
- Controller: [`BlockedIpsController::index`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/BlockedIpsController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/blocked-ips.php#L26)

**List banned panel IPs**

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `page` | query | integer | no |  |
| `limit` | query | integer | no |  |
| `search` | query | string | no |  |
| `active_only` | query | boolean | no |  |

```bash
curl -X GET "$PANEL_URL/api/admin/blocked-ips" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Responses: `200` OK · `401` Unauthorized

### PUT `/api/admin/blocked-ips`

- Auth: Admin
- Permission: `admin.blocked_ips.create`
- Route name: `admin-blocked-ips-create`
- Controller: [`BlockedIpsController::create`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/BlockedIpsController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/blocked-ips.php#L37)

**Ban an IP from panel registration**

| Body field | Type | Required | Description |
| --- | --- | --- | --- |
| `ip` | string | yes | IPv4/IPv6 or CIDR |
| `reason` | string | no |  |
| `duration` | string | no | Timestring e.g. 1m, 1h, 24h, 7d, 1w, 1h30m; empty/permanent = forever |
| `expires_at` | string | no | Explicit UTC/ISO expiry; overrides duration when set |

```bash
curl -X PUT "$PANEL_URL/api/admin/blocked-ips" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"ip":"","reason":"","duration":"","expires_at":""}'
```

Responses: `201` Created · `400` Validation error · `409` Duplicate

### DELETE `/api/admin/blocked-ips/{id}`

- Auth: Admin
- Permission: `admin.blocked_ips.delete`
- Route name: `admin-blocked-ips-delete`
- Controller: [`BlockedIpsController::delete`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/Admin/BlockedIpsController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/admin/blocked-ips.php#L48)

**Remove a panel IP ban**

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | \- | yes |  |

```bash
curl -X DELETE "$PANEL_URL/api/admin/blocked-ips/$ID" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Responses: `200` Removed · `404` Not found
