# Server API: blocklist

Source: https://docs.neode.sk/development/api-reference/server-blocklist/
Last updated: 2026-12-03

> 3 operations. Addresses, networks and device IDs the server refuses.

These routes are on the server API, port 21114 (21121 in Docker). They take an API key in `X-API-Key` or a sign-in token; see [The HTTP API](https://docs.neode.sk/development/api.md#signing-in).

Addresses, networks and device IDs the server refuses.

## GET /api/blocklist

List the blocklist entries.

When the blocklist is not enabled, enabled is false, entries is empty and count is missing.

On the server API, port 21114. Needs `blocklist.edit`.

**200**: The entries (`application/json`)

| Field | Type | What it is |
|---|---|---|
| `enabled` | boolean |  |
| `count` | integer |  |
| `entries` | array of [BlocklistEntry](https://docs.neode.sk/development/api-reference/schemas.md#blocklistentry) or null | null when the blocklist is empty |

| Error | When |
|---|---|
| 401 | No credential, or one that is not valid |
| 403 | The credential's role lacks the permission |

## POST /api/blocklist

Block an IP address, a CIDR network or a device ID.

The block is written in the audit log. Only a CIDR value is checked for its form.

On the server API, port 21114. Needs `blocklist.edit`.

Request body, `application/json`:

| Field | Type | Required | What it is |
|---|---|---|---|
| `value` | string | yes | the address, network or device ID |
| `type` | string, one of `ip`, `id`, `cidr` | yes |  |
| `reason` | string |  |  |

**200**: Blocked (`application/json`)

| Field | Type |
|---|---|
| `status` | `"blocked"` |
| `value` | string |

| Error | When |
|---|---|
| 400 | value is missing, type is not ip, id or cidr, or the CIDR is not valid |
| 401 | No credential, or one that is not valid |
| 403 | The credential's role lacks the permission |
| 503 | The blocklist is not enabled |

## DELETE /api/blocklist/{entry}

Unblock an IP address, a CIDR network or a device ID.

On the server API, port 21114. Needs `blocklist.edit`.

| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
| `entry` | path | string | yes | The value as it was blocked; a CIDR network with its slash encoded as %2F |

**200**: Unblocked (`application/json`)

| Field | Type |
|---|---|
| `status` | `"unblocked"` |
| `entry` | string |

| Error | When |
|---|---|
| 401 | No credential, or one that is not valid |
| 403 | The credential's role lacks the permission |
| 404 | No such entry |
| 503 | The blocklist is not enabled |
