> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: Introduction

## Article: Introduction

## Article Link: https://dev.wix.com/docs/api-reference/business-solutions/bookings/calendar/external-calendar-v2/introduction.md

## Article Content:

# About the External Calendars API

The External Calendars API allows you to connect and sync external calendars
with a Wix site. By default, you can connect and sync Google, Microsoft, and
Apple calendars with any Wix site. Additionally, site owners can install apps
to support even more external calendar providers.

With the External Calendars API, you can:

+ List supported external calendar providers for a Wix site.
+ Connect an external calendar account to a Wix site.
+ Import events from a connected external calendar to the Wix site.
+ Export events from a [Wix schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction.md)
  to connected external calendars.
+ Retrieve information about a site's connections to external calendar accounts.

## Before you begin

It’s important to note the following points before starting to code:

+ **Authentication Requirements**: External calendar providers have varying
  requirements for authentication. You can call [List Providers](https://dev.wix.com/docs/rest/business-solutions/bookings/calendar/external-calendar-v2/list-providers.md)
  to determine if you can call [Connect By OAuth](https://dev.wix.com/docs/rest/business-solutions/bookings/calendar/external-calendar-v2/connect-by-o-auth.md)
  or [Connect By Credentials](https://dev.wix.com/docs/rest/business-solutions/bookings/calendar/external-calendar-v2/connect-by-credentials.md)
  for a specific provider.
+ **Connection Configuration**: You can configure whether a connection allows
  importing to Wix, exporting to external calendars, or both. Check
  `syncConfig` for each new connection, and call [Update Sync Config](https://dev.wix.com/docs/rest/business-solutions/bookings/calendar/external-calendar-v2/update-sync-config.md)
  as necessary.
+ **Ownership Changes**: If the Wix schedule's ownership changes, the connection
  to the external calendar is automatically disconnected.
+ **Event Notifications**: The External Calendars API doesn't include events
  and doesn't provide real-time notifications about changes to connections or
  providers.

## Use cases

- [Check which connection method to use for a provider](https://dev.wix.com/docs/rest/business-solutions/bookings/calendar/external-calendar-v2/sample-flows.md#check-which-connection-method-to-use-for-a-provider).
- [Connect an external calendar by credentials](https://dev.wix.com/docs/rest/business-solutions/bookings/calendar/external-calendar-v2/sample-flows.md#connect-an-external-calendar-by-credentials).
- [Connect an external calendar by OAuth](https://dev.wix.com/docs/rest/business-solutions/bookings/calendar/external-calendar-v2/sample-flows.md#connect-an-external-calendar-by-oauth).
- [Retrieve a list of events in connected external calendars](https://dev.wix.com/docs/rest/business-solutions/bookings/calendar/external-calendar-v2/sample-flows.md#retrieve-a-list-of-events-in-connected-external-calendars).

## Terminology

- **External calendar provider**: A service or platform that offers calendar
  functionalities. For example, Google Calendar, Microsoft Outlook, Microsoft
  365, or Apple Calendar. These providers can be connected to and synced with
  all Wix sites. Site owners can install apps that enable support for additional
  external calendar providers.
- **Account owner**: The individual or entity that manages an external calendar
  account. This person is responsible for authorizing connections from
  the Wix site to their calendar account.
- **Connection**: An established link between a Wix site and 1 or more external
  calendar accounts, allowing for data synchronization.

For a comprehensive glossary of Wix Bookings terms, see [Terminology](https://dev.wix.com/docs/rest/business-solutions/bookings/terminology.md).

## See also

- [Calendar APIs](https://dev.wix.com/docs/rest/business-management/calendar/introduction.md).
- [How Wix Bookings uses the Calendar APIs](https://dev.wix.com/docs/rest/business-management/calendar/wix-bookings-integration.md).  

## SDK Setup
  `@wix/bookings`

To use the API, install the `@wix/bookings` package.

#### Install the package

Follow the installation instructions for your development environment.

| Development environment | Installation method |
|--|--|
| Wix sites (editor or IDE) | Use the [package manager](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/packages/work-with-npm-packages-in-the-editor.md). |
| Wix sites (local IDE) | Run `wix install @wix/bookings` using the [Wix CLI](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/packages/work-with-npm-packages-with-the-wix-cli.md).|
| Blocks apps | Use the same installation method as Wix sites. |
| CLI and self-hosted apps | Run `npm install @wix/bookings` or `yarn add @wix/bookings`. |
| Headless sites and apps | Run `npm install @wix/bookings` or `yarn add @wix/bookings`. |

#### Import the package

To import the package in your code:

```js
import { externalCalendars } from '@wix/bookings'
```

#### Import types

Types for this API are accessed through the `externalCalendars` namespace you already imported above, as `externalCalendars.<TypeName>`, using any type name shown in these docs.
  