# Console: keys

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

> 6 operations. The server's key, the client settings and the QR code.

These routes are on the console, port 3375. They take an API token as `Authorization: Bearer ndt_...`; see [API tokens](https://docs.neode.sk/command-line/api-tokens.md).

The server's key, the client settings and the QR code.

## GET /api/keys/api

Show the console's API key, masked. API tokens never see it whole.

Answers the key with its middle masked (the first and last four characters at most, **** between). With show=true it answers the whole key, which only a super admin may see.

`neodesk keys api` calls it.

| Parameter | In | Type | What it is |
|---|---|---|---|
| `show` | query | string, one of `true` | true answers the whole key |

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

| Field | Type | Required | What it is |
|---|---|---|---|
| `success` | `true` | yes |  |
| `data` | object | yes |  |
| `data.key` | string | yes | The API key, masked unless show=true |
| `data.masked` | boolean | yes |  |

| Error | When |
|---|---|
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account may not do this, or show=true came from an account that is not a super admin |
| 404 | The server has no API key file |

## GET /api/keys/public

Show the server's public key, which clients need.

`neodesk keys public` calls it.

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

| Field | Type | Required | What it is |
|---|---|---|---|
| `success` | `true` | yes |  |
| `data` | object | yes |  |
| `data.key` | string | yes | The Ed25519 public key in base64 |

| Error | When |
|---|---|
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 404 | The server has no public key yet |

## GET /api/keys/public/download

Download the server's public key as id_ed25519.pub.

Answers the key as a text file named id_ed25519.pub.

`neodesk keys public-download` calls it.

**200**: The public key (`text/plain`)

String.

| Error | When |
|---|---|
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 404 | The server has no public key yet |

## GET /api/keys/public/qr

Show the client settings as a QR code (PNG data address).

The code holds the ID server, relay, API address and public key a mobile client scans to configure itself.

`neodesk keys qr` calls it.

| Parameter | In | Type | What it is |
|---|---|---|---|
| `host` | query | string | A host name to build the addresses for. Used when it is a valid host and no public server ID is saved |

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

| Field | Type | Required |
|---|---|---|
| `success` | `true` | yes |
| `data` | [ClientConfigQR](https://docs.neode.sk/development/api-reference/schemas.md#clientconfigqr) | yes |

| Error | When |
|---|---|
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 404 | The server has no public key yet |

## GET /api/keys/qr

Show the client settings as a QR code (the older address of keys qr).

The code holds the ID server, relay, API address and public key a mobile client scans to configure itself. Answers the same as GET /api/keys/public/qr.

`neodesk keys qr-legacy` calls it.

| Parameter | In | Type | What it is |
|---|---|---|---|
| `host` | query | string | A host name to build the addresses for. Used when it is a valid host and no public server ID is saved |

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

| Field | Type | Required |
|---|---|---|
| `success` | `true` | yes |
| `data` | [ClientConfigQR](https://docs.neode.sk/development/api-reference/schemas.md#clientconfigqr) | yes |

| Error | When |
|---|---|
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 404 | The server has no public key yet |

## GET /api/keys/server-info

Show the ID server, relay and API addresses clients get.

Also says where each address came from and answers the masked API key.

`neodesk keys server-info` calls it.

| Parameter | In | Type | What it is |
|---|---|---|---|
| `host` | query | string | A host name to build the addresses for. Used when it is a valid host and no public server ID is saved |

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

| Field | Type | Required |
|---|---|---|
| `success` | `true` | yes |
| `data` | [ClientEndpoints](https://docs.neode.sk/development/api-reference/schemas.md#clientendpoints) | yes |

| Error | When |
|---|---|
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
