> ## Documentation Index
> Fetch the complete documentation index at: https://deepline.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Unipile: List Calendars

> List the calendars of a connected Google or Microsoft Outlook account, to find the calendar_id for its events and meetings.

List the calendars of a connected Google or Microsoft Outlook account, to find the calendar\_id for its events and meetings.

> [!NOTE]
>
> Tool ID: `unipile_list_calendars`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'unipile_list_calendars',
  {
    "account_id": "123456789"
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute unipile_list_calendars --input '{
  "account_id": "123456789"
}' --json
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "data": {
    "data": [
      {
        "object": "Calendar",
        "id": "id_123",
        "version": "example",
        "name": "Example",
        "is_read_only": true,
        "is_owned_by_user": true,
        "background_color": "example"
      }
    ]
  }
}
```

Use `deepline describe unipile_list_calendars --json` for the latest machine-readable contract.

## Input reference

Returns a list of calendars.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.cursor` | `string` | No | — | A cursor used for pagination. If supported by the provider, use `next_cursor` given by the previous page of the list, else use `offset`. |
| `payload.offset` | `number` | No | — | An offset used for pagination, if supported by the provider, else use `cursor`. |
| `payload.limit` | `number` | No | — | The limit of items to be returned. |
| `payload.account_id` | `string` | Yes | — | The id of the account to use. |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Returns a list of calendars.",
    "properties": {
      "cursor": {
        "type": "string",
        "description": "A cursor used for pagination. If supported by the provider, use `next_cursor` given by the previous page of the list, else use `offset`."
      },
      "offset": {
        "type": "number",
        "description": "An offset used for pagination, if supported by the provider, else use `cursor`."
      },
      "limit": {
        "type": "number",
        "description": "The limit of items to be returned."
      },
      "account_id": {
        "type": "string",
        "description": "The id of the account to use."
      }
    },
    "required": [
      "account_id"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.data` | `array` | Yes | — | — |
| `result.data.data[].object` | `"Calendar"` | Yes | — | Allowed: `Calendar`. |
| `result.data.data[].id` | `string` | Yes | — | The ID of the calendar. |
| `result.data.data[].version` | `string` | Yes | — | Opaque identifier representing the current state of the resource. The value changes whenever the resource is modified and should only be used for change detection. |
| `result.data.data[].name` | `string` | Yes | — | Name of the calendar. |
| `result.data.data[].description` | `string` | No | — | Description of the calendar. |
| `result.data.data[].is_read_only` | `boolean` | Yes | — | Indicates if the calendar is read-only or not. |
| `result.data.data[].is_owned_by_user` | `boolean` | Yes | — | Indicates if the user owns this calendar. |
| `result.data.data[].is_default` | `boolean` | No | — | Indicates if this is the default calendar of the user. |
| `result.data.data[].is_primary` | `boolean` | No | — | Indicates if this is the primary calendar of the user. |
| `result.data.data[].access_role` | `"owner" \| "writer" \| "reader" \| "freeBusyReader"` | No | — | The access role of the authenticated user for this calendar. Allowed: `owner`, `writer`, `reader`, `freeBusyReader`. |
| `result.data.data[].etag` | `string` | No | — | Provider ETag for this calendar. |
| `result.data.data[].background_color` | `string` | Yes | — | Background color of the calendar in hexadecimal format. |
| `result.data.data[].foreground_color` | `string` | No | — | Foreground color of the calendar in hexadecimal format. |
| `result.data.data[].sync_activated` | `boolean` | No | — | Indicates if calendar sync is activated. |
| `result.data.data[].sync_token` | `string \| null` | No | — | Provider sync token used to resume calendar synchronization. |
| `result.data.data[].timezone` | `string` | No | — | Timezone used in this calendar. |
| `result.data.next_cursor` | `string` | No | — | Cursor to get the next page of results if supported. Else use `offset`. |
| `result.meta` | `object` | No | — | Additional response metadata (status, paging). |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload.",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "object": {
                  "type": "string",
                  "enum": [
                    "Calendar"
                  ]
                },
                "id": {
                  "type": "string",
                  "description": "The ID of the calendar."
                },
                "version": {
                  "type": "string",
                  "description": "Opaque identifier representing the current state of the resource. The value changes whenever the resource is modified and should only be used for change detection."
                },
                "name": {
                  "type": "string",
                  "description": "Name of the calendar."
                },
                "description": {
                  "type": "string",
                  "description": "Description of the calendar."
                },
                "is_read_only": {
                  "type": "boolean",
                  "description": "Indicates if the calendar is read-only or not."
                },
                "is_owned_by_user": {
                  "type": "boolean",
                  "description": "Indicates if the user owns this calendar."
                },
                "is_default": {
                  "type": "boolean",
                  "description": "Indicates if this is the default calendar of the user."
                },
                "is_primary": {
                  "type": "boolean",
                  "description": "Indicates if this is the primary calendar of the user."
                },
                "access_role": {
                  "type": "string",
                  "description": "The access role of the authenticated user for this calendar.",
                  "enum": [
                    "owner",
                    "writer",
                    "reader",
                    "freeBusyReader"
                  ]
                },
                "etag": {
                  "type": "string",
                  "description": "Provider ETag for this calendar."
                },
                "background_color": {
                  "type": "string",
                  "description": "Background color of the calendar in hexadecimal format."
                },
                "foreground_color": {
                  "type": "string",
                  "description": "Foreground color of the calendar in hexadecimal format."
                },
                "sync_activated": {
                  "type": "boolean",
                  "description": "Indicates if calendar sync is activated."
                },
                "sync_token": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Provider sync token used to resume calendar synchronization."
                },
                "timezone": {
                  "type": "string",
                  "description": "Timezone used in this calendar."
                }
              },
              "required": [
                "object",
                "id",
                "version",
                "name",
                "is_read_only",
                "is_owned_by_user",
                "background_color"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "type": "string",
            "description": "Cursor to get the next page of results if supported. Else use `offset`."
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [Unipile provider guide](https://deepline.com/docs/providers/unipile/guide.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.