# Console: tags

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

> 3 operations. Device tags.

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

Device tags.

## GET /api/tags

List the tags of the devices the account may see.

Each tag once, sorted.

Needs `device.view`. `neodesk tags list` calls it.

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

| Field | Type | Required |
|---|---|---|
| `success` | `true` | yes |
| `data` | object | yes |
| `data.tags` | array of string | 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 |

## POST /api/tags/delete

Remove a tag from every device the account may see.

The tag groups the account may see that select by the tag lose their filter.

Needs `device.edit`. `neodesk tags delete` calls it. It cannot be undone.

Request body, `application/json`:

| Field | Type | Required |
|---|---|---|
| `tag` | string | yes |

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

| Field | Type | Required | What it is |
|---|---|---|---|
| `success` | `true` | yes |  |
| `data` | object | yes |  |
| `data.affectedGroups` | integer |  | Tag groups that selected by the tag |
| `data.failedDevices` | array of string |  | Devices whose tags the server did not change |
| `data.skipped` | integer |  | Devices without the tag |
| `data.tag` | string |  |  |
| `data.updatedDevices` | integer |  |  |

| Error | When |
|---|---|
| 400 | The request is not valid |
| 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 |

## POST /api/tags/rename

Rename a tag on every device the account may see.

The tag groups the account may see that select by the tag get the new name too.

Needs `device.edit`. `neodesk tags rename` calls it.

Request body, `application/json`:

| Field | Type | Required | What it is |
|---|---|---|---|
| `from` | string | yes |  |
| `to` | string | yes | Must differ from from |

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

| Field | Type | Required | What it is |
|---|---|---|---|
| `success` | `true` | yes |  |
| `data` | object | yes |  |
| `data.failedDevices` | array of string |  | Devices whose tags the server did not change |
| `data.from` | string |  |  |
| `data.skipped` | integer |  | Devices without the tag |
| `data.to` | string |  |  |
| `data.updatedDevices` | integer |  |  |
| `data.updatedGroups` | integer |  |  |

| Error | When |
|---|---|
| 400 | The request is not valid |
| 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 |
