# List calendars

Source: https://docs.vlayers.ai/reference/calendar/list-calendars

`GET /v1/calendar/calendars` · scope `calendar:use`

Lists the calendars on the connected account: the person's main one, any made for an agent, and which of them count when checking whether the person is free. With several accounts connected and none named, every working account is listed.

Requires an API key with the `calendar:use` scope.

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `connectionId` | query | string | no | Only needed when more than one calendar account is connected: the id of the account to use, from `GET /v1/calendar/status`. Example: `"0192f5c0-1a2b-7c3d-8e4f-5a6b7c8d9e01"` |

## Request

cURL:

```bash
curl https://api.vlayers.ai/v1/calendar/calendars \
  -H "Authorization: Bearer $VOICELAYER_API_KEY"
```

TypeScript:

```ts
import { VoiceLayer } from '@voicelayer/api';

const voicelayer = new VoiceLayer();

const { summary } = await voicelayer.calendar.listCalendars();
console.log(summary);
```

Python:

```python
from voicelayer import VoiceLayer

vl = VoiceLayer()

result = vl.calendar.list_calendars()
print(result.summary)
```

## Response `200`

```json
{
  "calendars": [
    {
      "connectionId": "0192f5c0-1a2b-7c3d-8e4f-5a6b7c8d9e01",
      "account": "owner@example.com",
      "app": "Google Calendar",
      "id": "c_agent@group.calendar.google.com",
      "name": "Sales agent",
      "main": false,
      "agentCalendar": true,
      "mailbox": "sales@acme.vlayersmail.com",
      "countsForAvailability": true
    }
  ],
  "summary": "1 calendar. When checking if you're free I look at: Sales agent."
}
```
