# Labels

## List labels

`client.labels.list(RequestOptionsoptions?): 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

- `LabelListResponse = Array<Label>`

  Labels the user has created, sorted by name.

  - `id: string`

    Unique identifier of the label.

  - `name: string`

    Display name of the label.

### Example

```typescript
import BeeperDesktop from '@beeper/desktop-api';

const client = new BeeperDesktop({
  accessToken: process.env['BEEPER_ACCESS_TOKEN'], // This is the default and can be omitted
});

const labels = await client.labels.list();

console.log(labels);
```

#### Response

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

## Domain Types

### Label

- `Label`

  A user-created label that organizes chats across accounts.

  - `id: string`

    Unique identifier of the label.

  - `name: string`

    Display name of the label.

### Label List Response

- `LabelListResponse = Array<Label>`

  Labels the user has created, sorted by name.

  - `id: string`

    Unique identifier of the label.

  - `name: string`

    Display name of the label.
