## List labels

`$client->labels->list(): list<Label>`

**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>`

  - `string id`

    Unique identifier of the label.

  - `string name`

    Display name of the label.

### Example

```php
<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';

$client = new Client(accessToken: 'My Access Token');

$labels = $client->labels->list();

var_dump($labels);
```

#### Response

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