# Konsole: address-books

Quelle: https://docs.neode.sk/de/development/api-reference/console-address-books/
Zuletzt geändert: 2026-12-03

> 6 Operationen. Shared address books, their members and each member's rule.

Diese Routen liegen auf der Konsole, Port 3375. Sie nehmen ein API-Token als `Authorization: Bearer ndt_...`; siehe [API-Tokens](https://docs.neode.sk/de/command-line/api-tokens.md). Die Beschreibungen stehen auf Englisch, wie in der OpenAPI-Beschreibung.

Shared address books, their members and each member's rule.

## GET /api/address-books

List shared address books.

The books the account owns or is a member of; every book for the server-level roles.

Needs `device.view`. `neodesk address-books list` calls it.

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

| Field | Type | Required | What it is |
|---|---|---|---|
| `success` | `true` | yes |  |
| `data` | object | yes |  |
| `data.books` | array of [SharedAddressBook](https://docs.neode.sk/de/development/api-reference/schemas.md#sharedaddressbook) | yes |  |
| `data.can_create` | boolean | yes | Whether the account may make books (device.edit) |
| `data.manage_all` | boolean | yes | Whether the account manages every book |

| 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 |
| 503 | Shared address books are not available on this server |

## POST /api/address-books

Create a shared address book.

The account owns the new book.

Needs `device.edit`. `neodesk address-books create` calls it.

Request body, `application/json`:

| Field | Type | Required | What it is |
|---|---|---|---|
| `name` | string | yes | Not "My address book" or "Legacy address book", which the apps use for the account's own book; at most 100 characters |
| `note` | string |  | at most 500 characters |
| `self_join` | boolean |  | Let devices add themselves with RustDesk's preset address book options; needs full control of the book |

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

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

| Error | When |
|---|---|
| 400 | The name or note is invalid |
| 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 |
| 409 | Another book has this name |
| 503 | Shared address books are not available on this server |

## GET /api/address-books/accounts

List the accounts that can be members.

Every account for the server-level roles; else the accounts of the account's organizations, or of no organization when it belongs to none.

Needs `device.view`. `neodesk address-books accounts` calls it.

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

| Field | Type | Required |
|---|---|---|
| `success` | `true` | yes |
| `data` | array of object | yes |
| `data[].id` | integer | yes |
| `data[].username` | 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 |
| 503 | Shared address books are not available on this server |

## PATCH /api/address-books/{guid}

Rename a shared address book or change its note.

Needs full control of the book.

Needs `device.view, with full control of the book`. `neodesk address-books update` calls it.

| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
| `guid` | path | string | yes | The book's GUID |

Request body, `application/json`:

| Field | Type | What it is |
|---|---|---|
| `name` | string | Not "My address book" or "Legacy address book", which the apps use for the account's own book; at most 100 characters |
| `note` | string | at most 500 characters |
| `self_join` | boolean | Let devices add themselves with RustDesk's preset address book options; needs full control of the book |

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

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

| Error | When |
|---|---|
| 400 | The name or note is invalid |
| 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 | There is no such book, or the account is neither its owner nor a member |
| 409 | Another book has this name |
| 503 | Shared address books are not available on this server |

## DELETE /api/address-books/{guid}

Delete a shared address book.

Only the owner and the server-level roles delete a book. The apps lose it at their next refresh.

Needs `device.view, as the book's owner`. `neodesk address-books delete` calls it. It cannot be undone.

| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
| `guid` | path | string | yes | The book's GUID |

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

| Field | Type | Required |
|---|---|---|
| `success` | `true` | 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 | There is no such book, or the account is neither its owner nor a member |
| 503 | Shared address books are not available on this server |

## PUT /api/address-books/{guid}/members

Replace the members of a shared address book.

Needs full control of the book. A new member must be one of the accounts GET /api/address-books/accounts lists; members already there may stay. owner gives the book a new owner, for the server-level roles only.

Needs `device.view, with full control of the book`. `neodesk address-books members-set` calls it.

| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
| `guid` | path | string | yes | The book's GUID |

Request body, `application/json`:

| Field | Type | Required | What it is |
|---|---|---|---|
| `members` | array of object | yes | at most 500 items |
| `members[].id` | integer | yes | The account's ID |
| `members[].rule` | integer, one of `1`, `2`, `3` | yes | 1 read only, 2 read and write, 3 full control |
| `owner` | integer |  | The account that owns the book from now on |

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

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

| Error | When |
|---|---|
| 400 | A member is unknown or outside the account's organizations, or a rule is not 1, 2 or 3 |
| 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 | There is no such book, or the account is neither its owner nor a member |
| 503 | Shared address books are not available on this server |
