# Labels

## List labels

`labels.list()  -> LabelListResponse`

**get** `/v1/labels`

List the labels the user has created for organizing chats. Filter chats by label via GET /v1/chats/search with labelID.

### Returns

- `List[Label]`

  Labels the user has created, sorted by name.

  - `id: str`

    Unique identifier of the label.

  - `name: str`

    Display name of the label.

### Example

```python
import os
from beeper_desktop_api import BeeperDesktop

client = BeeperDesktop(
    access_token=os.environ.get("BEEPER_ACCESS_TOKEN"),  # This is the default and can be omitted
)
labels = client.labels.list()
print(labels)
```

#### Response

```json
[
  {
    "id": "id",
    "name": "name"
  }
]
```

## Domain Types

### Label

- `class Label: …`

  A user-created label that organizes chats across accounts.

  - `id: str`

    Unique identifier of the label.

  - `name: str`

    Display name of the label.

### Label List Response

- `List[Label]`

  Labels the user has created, sorted by name.

  - `id: str`

    Unique identifier of the label.

  - `name: str`

    Display name of the label.
