> 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

# UpdateSchedule

# Package: calendar

# Namespace: SchedulesService

# Method link: https://dev.wix.com/docs/api-reference/business-management/calendar/schedules-v3/update-schedule?apiView=SDK.md

## Permission Scopes:
Manage Calendars: SCOPE.DC-CALENDAR.MANAGE

## Introduction

Updates a schedule.


Each time the schedule is updated,
`revision` increments by 1.
The current `revision` must be passed when updating the schedule.
This ensures you're working with the latest schedule
and prevents unintended overwrites.

---

## REST API

### Schema

```
 Method: updateSchedule
 Description: Updates a schedule.   Each time the schedule is updated, `revision` increments by 1. The current `revision` must be passed when updating the schedule. This ensures you're working with the latest schedule and prevents unintended overwrites.
 URL: https://www.wixapis.com/calendar/v3/schedules/{schedule.id}
 Method: PATCH
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  schedule, schedule, schedule.revision, schedule.permissionsentity, schedule.permissions.role
 Method parameters: 
   param name: participantNotification | type: ParticipantNotification    
        - name: notifyParticipants | type: boolean | description: Whether to notify the participants about changes made to the schedule or event.  Default: `false`  
        - name: message | type: string | description: Message to send.  Min: 1 character Max: 5000 characters  | validation: minLength 1, maxLength 5000
        - name: metadata | type: object | description: Information about the delivery channels used to send the notification. For example, `{"channels": "SMS" }`, `{"channels": "EMAIL" }`, or `{"channels": "EMAIL, SMS" }`.  Max: 10 keys Max key length: 64 characters Max value length: 1000 characters  | validation: format map
   param name: schedule | type: Schedule | description: A collection of [events](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object.md) associated with a specific entity, such as a [Bookings service](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/service-object.md), or [Bookings resource](https://dev.wix.com/docs/rest/business-solutions/bookings/staff-members-and-resources/resource-v2/resource-object.md). Schedules can also serve as templates for the events they manage, setting default values like a default location. | required: true 
        - name: id | type: string | description: Schedule GUID. | required: true | read-only: true | validation: format GUID
        - name: externalId | type: string | description: External GUID. You can't update the external GUID.  If the schedule belongs to a Bookings staff member, identical to the GUID of the [resource](https://dev.wix.com/docs/rest/business-solutions/bookings/staff-members-and-resources/resource-v2/resource-object.md). If the schedule belongs to a Bookings service, identical to the GUID of the [service](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/service-object.md).  | validation: format GUID, immutable
        - name: name | type: string | description: Schedule name.  Min: 1 character Max: 200 characters  | validation: minLength 1, maxLength 200
        - name: timeZone | type: string | description: Time zone the schedule is associated with in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database). For example, `America/New_York`.  Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties.md).  Min: 1 character Max: 150 characters  | validation: minLength 1, maxLength 150
        - name: businessTimeZoneEnabled | type: boolean | description: Whether the schedule's `timeZone` is automatically synced from `timeZone` of the business [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties.md).  Default: `true`  
        - name: defaultTitle | type: string | description: Default `title` for [events](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object.md) that are added to the schedule.  Min: 1 character Max: 200 characters  | validation: minLength 1, maxLength 200
        - name: defaultLocation | type: Location | description: Default `location` for [events](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object.md) that are added to the schedule.  
           - name: id | type: string | description: [Location](https://dev.wix.com/docs/rest/business-management/locations/location-object.md) GUID. Available only for `BUSINESS` locations.  | validation: format GUID
           - name: type | type: Type | description: Location type.  Supported values: + `BUSINESS`: The event is held at a business location. + `CUSTOMER`: The event is held at the customer's location, such as their home or office. + `CUSTOM`: The event is held at an address or venue not tied to the business or customer.  
                 - enum:
                 -     BUSINESS: The event is held at a business location.
                 -     CUSTOMER: The event is held at the customer's location, such as their home or office.
                 -     CUSTOM: The event is held at an address or venue not tied to the business or customer.
           - name: name | type: string | description: Location name. For `BUSINESS` locations, it's identical to the [location](https://dev.wix.com/docs/rest/business-management/locations/location-object.md) `name`.  Min: 1 character Max: 150 characters  | validation: minLength 1, maxLength 150
           - name: address | type: string | description: Location address. For `BUSINESS` locations, it's identical to the [location](https://dev.wix.com/docs/rest/business-management/locations/location-object.md)'s `formattedAddress`.  | validation: minLength 1, maxLength 300
        - name: defaultCapacity | type: integer | description: Default `totalCapacity` for [events](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object.md) that are added to the schedule.  Min: `0`  | validation: minimum 0, format int32
        - name: defaultConferencingDetails | type: ConferencingDetails | description: Default `conferencingDetails` for [events](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object.md) that are added to the schedule. Returned only if explicitly requested. For more details, see the [permissions article](https://dev.wix.com/docs/rest/business-management/calendar/permissions.md#retrieve-personal-information).  
           - name: hostUrl | type: string | description: URL used by the host to start the conference.  Min: 1 character Max: 2000 characters  | validation: minLength 1, maxLength 2000
           - name: guestUrl | type: string | description: URL used by a guest to join the conference.  Min: 1 character Max: 2000 characters  | validation: minLength 1, maxLength 2000
           - name: password | type: string | description: Conference password.  Min: 1 character Max: 100 characters  | validation: minLength 1, maxLength 100
           - name: externalId | type: string | description: Conference GUID in an external system.  Min: 1 character Max: 150 characters  | validation: minLength 1, maxLength 150
           - name: provider | type: Provider | description: Conferencing provider information.  
              - ONE-OF: 
                 - name: onlineMeetingInfo | type: OnlineMeetingInfo | description: Information about online meeting providers.  
                    - name: appId | type: string | description:   | validation: format GUID
              - name: providerType | type: ProviderType | description:   
                     - enum:
                     -     CUSTOM: Custom conferencing link manually configured by the user.
                     -     ONLINE_MEETING: Online meeting provider integrated via an app.
        - name: appId | type: string | description: GUID of the app that's associated with the schedule. You can't update `appId`. If you want to create a schedule and ensure its associated events appear in the [Bookings calendar](https://support.wix.com/en/article/wix-bookings-about-the-wix-booking-calendar), you must provide the Wix Bookings app GUID `13d21c63-b5ec-5912-8397-c3a5ddb27a97`. For schedules from Wix apps, the following values apply: - Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"` - Wix Services: `"cc552162-24a4-45e0-9695-230c4931ef40"` - Wix Meetings: `"6646a75c-2027-4f49-976c-58f3d713ed0f"` [Full list of apps created by Wix](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/platform/about-apps-created-by-wix.md).  | validation: format GUID, immutable
        - name: permissions | type: array<Permission> | description: List of permissions associated with the schedule. Refer to the [permissions article](https://dev.wix.com/docs/rest/business-management/calendar/permissions.md#roles) for more information.  Max: 1 permission  | validation: maxItems 1
           - name: identity | type: IdentificationData | description: [Wix user](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities.md#wix-users) granted the permission.  
              - ONE-OF: 
                 - name: wixUserId | type: string | description: GUID of a Wix user. For example, the site owner or a [site collaborator](https://support.wix.com/en/article/inviting-people-to-contribute-to-your-site).  | validation: format GUID
           - name: role | type: Role | description: Permission role.  Supported values: + `WRITER`: Full read and write access. + `COMMENTER`: Full read access, write access limited to `event.notes`.  
                 - enum:
                 -     WRITER: Full read and write access.
                 -     COMMENTER: Full read access, write access limited to `event.notes`.
        - name: extendedFields | type: ExtendedFields | description: Extensions enabling applications or users to save custom data related to the schedule.  
           - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured.  You can only access fields for which you have the appropriate permissions.  Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md).  | validation: format map
        - name: revision | type: string | description: Revision number, which increments by 1 each time the schedule is updated. To prevent conflicting changes, the current revision must be passed when updating the schedule. Ignored when creating a schedule. | required: true | read-only: true | validation: format int64
 Return type: UpdateScheduleResponse
  - name: schedule | type: Schedule | description: Updated schedule.  
     - name: id | type: string | description: Schedule GUID.  | read-only: true | validation: format GUID
     - name: externalId | type: string | description: External GUID. You can't update the external GUID.  If the schedule belongs to a Bookings staff member, identical to the GUID of the [resource](https://dev.wix.com/docs/rest/business-solutions/bookings/staff-members-and-resources/resource-v2/resource-object.md). If the schedule belongs to a Bookings service, identical to the GUID of the [service](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/service-object.md).  | validation: format GUID, immutable
     - name: name | type: string | description: Schedule name.  Min: 1 character Max: 200 characters  | validation: minLength 1, maxLength 200
     - name: status | type: Status | description: Schedule status.  Supported values: - `ACTIVE`: You can add events to the schedule or update its fields. - `CANCELLED`: You can't add events to the schedule or update its fields.  Default: `ACTIVE`  | read-only: true 
         - enum:
         -     UNKNOWN_STATUS: 
         -     ACTIVE: You can add events to the schedule or update its fields.
         -     CANCELLED: You can't add events to the schedule or update its fields.
     - name: timeZone | type: string | description: Time zone the schedule is associated with in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database). For example, `America/New_York`.  Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties.md).  Min: 1 character Max: 150 characters  | validation: minLength 1, maxLength 150
     - name: businessTimeZoneEnabled | type: boolean | description: Whether the schedule's `timeZone` is automatically synced from `timeZone` of the business [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties.md).  Default: `true`  
     - name: defaultTitle | type: string | description: Default `title` for [events](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object.md) that are added to the schedule.  Min: 1 character Max: 200 characters  | validation: minLength 1, maxLength 200
     - name: defaultLocation | type: Location | description: Default `location` for [events](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object.md) that are added to the schedule.  
        - name: id | type: string | description: [Location](https://dev.wix.com/docs/rest/business-management/locations/location-object.md) GUID. Available only for `BUSINESS` locations.  | validation: format GUID
        - name: type | type: Type | description: Location type.  Supported values: + `BUSINESS`: The event is held at a business location. + `CUSTOMER`: The event is held at the customer's location, such as their home or office. + `CUSTOM`: The event is held at an address or venue not tied to the business or customer.  
             - enum:
             -     BUSINESS: The event is held at a business location.
             -     CUSTOMER: The event is held at the customer's location, such as their home or office.
             -     CUSTOM: The event is held at an address or venue not tied to the business or customer.
        - name: name | type: string | description: Location name. For `BUSINESS` locations, it's identical to the [location](https://dev.wix.com/docs/rest/business-management/locations/location-object.md) `name`.  Min: 1 character Max: 150 characters  | validation: minLength 1, maxLength 150
        - name: address | type: string | description: Location address. For `BUSINESS` locations, it's identical to the [location](https://dev.wix.com/docs/rest/business-management/locations/location-object.md)'s `formattedAddress`.  | validation: minLength 1, maxLength 300
     - name: defaultCapacity | type: integer | description: Default `totalCapacity` for [events](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object.md) that are added to the schedule.  Min: `0`  | validation: minimum 0, format int32
     - name: defaultConferencingDetails | type: ConferencingDetails | description: Default `conferencingDetails` for [events](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object.md) that are added to the schedule. Returned only if explicitly requested. For more details, see the [permissions article](https://dev.wix.com/docs/rest/business-management/calendar/permissions.md#retrieve-personal-information).  
        - name: hostUrl | type: string | description: URL used by the host to start the conference.  Min: 1 character Max: 2000 characters  | validation: minLength 1, maxLength 2000
        - name: guestUrl | type: string | description: URL used by a guest to join the conference.  Min: 1 character Max: 2000 characters  | validation: minLength 1, maxLength 2000
        - name: password | type: string | description: Conference password.  Min: 1 character Max: 100 characters  | validation: minLength 1, maxLength 100
        - name: externalId | type: string | description: Conference GUID in an external system.  Min: 1 character Max: 150 characters  | validation: minLength 1, maxLength 150
        - name: provider | type: Provider | description: Conferencing provider information.  
           - ONE-OF: 
              - name: onlineMeetingInfo | type: OnlineMeetingInfo | description: Information about online meeting providers.  
                 - name: appId | type: string | description:   | validation: format GUID
           - name: providerType | type: ProviderType | description:   
                 - enum:
                 -     CUSTOM: Custom conferencing link manually configured by the user.
                 -     ONLINE_MEETING: Online meeting provider integrated via an app.
     - name: appId | type: string | description: GUID of the app that's associated with the schedule. You can't update `appId`. If you want to create a schedule and ensure its associated events appear in the [Bookings calendar](https://support.wix.com/en/article/wix-bookings-about-the-wix-booking-calendar), you must provide the Wix Bookings app GUID `13d21c63-b5ec-5912-8397-c3a5ddb27a97`. For schedules from Wix apps, the following values apply: - Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"` - Wix Services: `"cc552162-24a4-45e0-9695-230c4931ef40"` - Wix Meetings: `"6646a75c-2027-4f49-976c-58f3d713ed0f"` [Full list of apps created by Wix](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/platform/about-apps-created-by-wix.md).  | validation: format GUID, immutable
     - name: permissions | type: array<Permission> | description: List of permissions associated with the schedule. Refer to the [permissions article](https://dev.wix.com/docs/rest/business-management/calendar/permissions.md#roles) for more information.  Max: 1 permission  | validation: maxItems 1
        - name: identity | type: IdentificationData | description: [Wix user](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities.md#wix-users) granted the permission.  
           - ONE-OF: 
              - name: wixUserId | type: string | description: GUID of a Wix user. For example, the site owner or a [site collaborator](https://support.wix.com/en/article/inviting-people-to-contribute-to-your-site).  | validation: format GUID
        - name: role | type: Role | description: Permission role.  Supported values: + `WRITER`: Full read and write access. + `COMMENTER`: Full read access, write access limited to `event.notes`.  
             - enum:
             -     WRITER: Full read and write access.
             -     COMMENTER: Full read access, write access limited to `event.notes`.
     - name: extendedFields | type: ExtendedFields | description: Extensions enabling applications or users to save custom data related to the schedule.  
        - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured.  You can only access fields for which you have the appropriate permissions.  Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md).  | validation: format map
     - name: revision | type: string | description: Revision number, which increments by 1 each time the schedule is updated. To prevent conflicting changes, the current revision must be passed when updating the schedule. Ignored when creating a schedule.  | read-only: true | validation: format int64
     - name: createdDate | type: string | description: Date the schedule was created in `YYYY-MM-DDThh:mm:ss.sssZ` format.  | read-only: true | validation: format date-time
     - name: updatedDate | type: string | description: Date the schedule was last updated in `YYYY-MM-DDThh:mm:ss.sssZ` format.  | read-only: true | validation: format date-time

 Possible Errors:
   HTTP Code: 404 | Status Code: NOT_FOUND | Application Code: LOCATION_NOT_FOUND | Description: The business location referenced by `schedule.defaultLocation.id` doesn't exist.
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: UPDATE_CANCELLED_SCHEDULE_NOT_ALLOWED | Description: Can't update a schedule that's been canceled. Canceled schedules are read-only.


```

### Examples

### Update Schedule
Updates the schedule’s default capacity.

```curl
curl -X PATCH \
'https://www.wixapis.com/calendar/v3/schedules/a96c3c31-c9fc-495d-b55b-40c694fe196c' \
-H 'Content-Type: application/json' \
-H 'Authorization: <AUTH>' \
-d '{
      "schedule": {
        "defaultCapacity": 40,
        "revision": "1"
      }
}'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.calendar.schedules.updateSchedule(_id, schedule, options)
 Description: Updates a schedule.   Each time the schedule is updated, `revision` increments by 1. The current `revision` must be passed when updating the schedule. This ensures you're working with the latest schedule and prevents unintended overwrites.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  schedule, _id, schedule.revision, schedule.permissionsentity, schedule.permissions.role
 Method parameters: 
   param name: _id | type: string | description: Schedule GUID. | required: true | validation: format GUID
   param name: schedule | type: UpdateSchedule | description: A collection of [events](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object.md) associated with a specific entity, such as a [Bookings service](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/service-object.md), or [Bookings resource](https://dev.wix.com/docs/rest/business-solutions/bookings/staff-members-and-resources/resource-v2/resource-object.md). Schedules can also serve as templates for the events they manage, setting default values like a default location. | required: true 
        - name: externalId | type: string | description: External GUID. You can't update the external GUID.  If the schedule belongs to a Bookings staff member, identical to the GUID of the [resource](https://dev.wix.com/docs/rest/business-solutions/bookings/staff-members-and-resources/resource-v2/resource-object.md). If the schedule belongs to a Bookings service, identical to the GUID of the [service](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/service-object.md).  | validation: format GUID, immutable
        - name: name | type: string | description: Schedule name.  Min: 1 character Max: 200 characters  | validation: minLength 1, maxLength 200
        - name: timeZone | type: string | description: Time zone the schedule is associated with in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database). For example, `America/New_York`.  Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties.md).  Min: 1 character Max: 150 characters  | validation: minLength 1, maxLength 150
        - name: businessTimeZoneEnabled | type: boolean | description: Whether the schedule's `timeZone` is automatically synced from `timeZone` of the business [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties.md).  Default: `true`  
        - name: defaultTitle | type: string | description: Default `title` for [events](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object.md) that are added to the schedule.  Min: 1 character Max: 200 characters  | validation: minLength 1, maxLength 200
        - name: defaultLocation | type: Location | description: Default `location` for [events](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object.md) that are added to the schedule.  
           - name: _id | type: string | description: [Location](https://dev.wix.com/docs/rest/business-management/locations/location-object.md) GUID. Available only for `BUSINESS` locations.  | validation: format GUID
           - name: type | type: Type | description: Location type.  Supported values: + `BUSINESS`: The event is held at a business location. + `CUSTOMER`: The event is held at the customer's location, such as their home or office. + `CUSTOM`: The event is held at an address or venue not tied to the business or customer.  
                 - enum:
                 -     BUSINESS: The event is held at a business location.
                 -     CUSTOMER: The event is held at the customer's location, such as their home or office.
                 -     CUSTOM: The event is held at an address or venue not tied to the business or customer.
           - name: name | type: string | description: Location name. For `BUSINESS` locations, it's identical to the [location](https://dev.wix.com/docs/rest/business-management/locations/location-object.md) `name`.  Min: 1 character Max: 150 characters  | validation: minLength 1, maxLength 150
           - name: address | type: string | description: Location address. For `BUSINESS` locations, it's identical to the [location](https://dev.wix.com/docs/rest/business-management/locations/location-object.md)'s `formattedAddress`.  | validation: minLength 1, maxLength 300
        - name: defaultCapacity | type: integer | description: Default `totalCapacity` for [events](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object.md) that are added to the schedule.  Min: `0`  | validation: minimum 0, format int32
        - name: defaultConferencingDetails | type: ConferencingDetails | description: Default `conferencingDetails` for [events](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object.md) that are added to the schedule. Returned only if explicitly requested. For more details, see the [permissions article](https://dev.wix.com/docs/rest/business-management/calendar/permissions.md#retrieve-personal-information).  
           - name: hostUrl | type: string | description: URL used by the host to start the conference.  Min: 1 character Max: 2000 characters  | validation: minLength 1, maxLength 2000
           - name: guestUrl | type: string | description: URL used by a guest to join the conference.  Min: 1 character Max: 2000 characters  | validation: minLength 1, maxLength 2000
           - name: password | type: string | description: Conference password.  Min: 1 character Max: 100 characters  | validation: minLength 1, maxLength 100
           - name: externalId | type: string | description: Conference GUID in an external system.  Min: 1 character Max: 150 characters  | validation: minLength 1, maxLength 150
           - name: provider | type: Provider | description: Conferencing provider information.  
              - ONE-OF: 
                 - name: onlineMeetingInfo | type: OnlineMeetingInfo | description: Information about online meeting providers.  
                    - name: appId | type: string | description:   | validation: format GUID
              - name: providerType | type: ProviderType | description:   
                     - enum:
                     -     CUSTOM: Custom conferencing link manually configured by the user.
                     -     ONLINE_MEETING: Online meeting provider integrated via an app.
        - name: appId | type: string | description: GUID of the app that's associated with the schedule. You can't update `appId`. If you want to create a schedule and ensure its associated events appear in the [Bookings calendar](https://support.wix.com/en/article/wix-bookings-about-the-wix-booking-calendar), you must provide the Wix Bookings app GUID `13d21c63-b5ec-5912-8397-c3a5ddb27a97`. For schedules from Wix apps, the following values apply: - Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"` - Wix Services: `"cc552162-24a4-45e0-9695-230c4931ef40"` - Wix Meetings: `"6646a75c-2027-4f49-976c-58f3d713ed0f"` [Full list of apps created by Wix](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/platform/about-apps-created-by-wix.md).  | validation: format GUID, immutable
        - name: permissions | type: array<Permission> | description: List of permissions associated with the schedule. Refer to the [permissions article](https://dev.wix.com/docs/rest/business-management/calendar/permissions.md#roles) for more information.  Max: 1 permission  | validation: maxItems 1
           - name: identity | type: IdentificationData | description: [Wix user](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities.md#wix-users) granted the permission.  
              - ONE-OF: 
                 - name: wixUserId | type: string | description: GUID of a Wix user. For example, the site owner or a [site collaborator](https://support.wix.com/en/article/inviting-people-to-contribute-to-your-site).  | validation: format GUID
           - name: role | type: Role | description: Permission role.  Supported values: + `WRITER`: Full read and write access. + `COMMENTER`: Full read access, write access limited to `event.notes`.  
                 - enum:
                 -     WRITER: Full read and write access.
                 -     COMMENTER: Full read access, write access limited to `event.notes`.
        - name: extendedFields | type: ExtendedFields | description: Extensions enabling applications or users to save custom data related to the schedule.  
           - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured.  You can only access fields for which you have the appropriate permissions.  Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md).  | validation: format map
        - name: revision | type: string | description: Revision number, which increments by 1 each time the schedule is updated. To prevent conflicting changes, the current revision must be passed when updating the schedule. Ignored when creating a schedule. | required: true | read-only: true | validation: format int64
   param name: options | type: UpdateScheduleOptions  none  
        - name: participantNotification | type: ParticipantNotification | description: Information about whether participants of the schedule's updated events are notified and the message they receive.  
           - name: notifyParticipants | type: boolean | description: Whether to notify the participants about changes made to the schedule or event.  Default: `false`  
           - name: message | type: string | description: Message to send.  Min: 1 character Max: 5000 characters  | validation: minLength 1, maxLength 5000
           - name: metadata | type: object | description: Information about the delivery channels used to send the notification. For example, `{"channels": "SMS" }`, `{"channels": "EMAIL" }`, or `{"channels": "EMAIL, SMS" }`.  Max: 10 keys Max key length: 64 characters Max value length: 1000 characters  | validation: format map
 Return type: PROMISE<Schedule>
  - name: _id | type: string | description: Schedule GUID.  | read-only: true | validation: format GUID
  - name: externalId | type: string | description: External GUID. You can't update the external GUID.  If the schedule belongs to a Bookings staff member, identical to the GUID of the [resource](https://dev.wix.com/docs/rest/business-solutions/bookings/staff-members-and-resources/resource-v2/resource-object.md). If the schedule belongs to a Bookings service, identical to the GUID of the [service](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/service-object.md).  | validation: format GUID, immutable
  - name: name | type: string | description: Schedule name.  Min: 1 character Max: 200 characters  | validation: minLength 1, maxLength 200
  - name: status | type: Status | description: Schedule status.  Supported values: - `ACTIVE`: You can add events to the schedule or update its fields. - `CANCELLED`: You can't add events to the schedule or update its fields.  Default: `ACTIVE`  | read-only: true 
     - enum:
     -     UNKNOWN_STATUS: 
     -     ACTIVE: You can add events to the schedule or update its fields.
     -     CANCELLED: You can't add events to the schedule or update its fields.
  - name: timeZone | type: string | description: Time zone the schedule is associated with in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database). For example, `America/New_York`.  Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties.md).  Min: 1 character Max: 150 characters  | validation: minLength 1, maxLength 150
  - name: businessTimeZoneEnabled | type: boolean | description: Whether the schedule's `timeZone` is automatically synced from `timeZone` of the business [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties.md).  Default: `true`  
  - name: defaultTitle | type: string | description: Default `title` for [events](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object.md) that are added to the schedule.  Min: 1 character Max: 200 characters  | validation: minLength 1, maxLength 200
  - name: defaultLocation | type: Location | description: Default `location` for [events](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object.md) that are added to the schedule.  
     - name: _id | type: string | description: [Location](https://dev.wix.com/docs/rest/business-management/locations/location-object.md) GUID. Available only for `BUSINESS` locations.  | validation: format GUID
     - name: type | type: Type | description: Location type.  Supported values: + `BUSINESS`: The event is held at a business location. + `CUSTOMER`: The event is held at the customer's location, such as their home or office. + `CUSTOM`: The event is held at an address or venue not tied to the business or customer.  
         - enum:
         -     BUSINESS: The event is held at a business location.
         -     CUSTOMER: The event is held at the customer's location, such as their home or office.
         -     CUSTOM: The event is held at an address or venue not tied to the business or customer.
     - name: name | type: string | description: Location name. For `BUSINESS` locations, it's identical to the [location](https://dev.wix.com/docs/rest/business-management/locations/location-object.md) `name`.  Min: 1 character Max: 150 characters  | validation: minLength 1, maxLength 150
     - name: address | type: string | description: Location address. For `BUSINESS` locations, it's identical to the [location](https://dev.wix.com/docs/rest/business-management/locations/location-object.md)'s `formattedAddress`.  | validation: minLength 1, maxLength 300
  - name: defaultCapacity | type: integer | description: Default `totalCapacity` for [events](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object.md) that are added to the schedule.  Min: `0`  | validation: minimum 0, format int32
  - name: defaultConferencingDetails | type: ConferencingDetails | description: Default `conferencingDetails` for [events](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object.md) that are added to the schedule. Returned only if explicitly requested. For more details, see the [permissions article](https://dev.wix.com/docs/rest/business-management/calendar/permissions.md#retrieve-personal-information).  
     - name: hostUrl | type: string | description: URL used by the host to start the conference.  Min: 1 character Max: 2000 characters  | validation: minLength 1, maxLength 2000
     - name: guestUrl | type: string | description: URL used by a guest to join the conference.  Min: 1 character Max: 2000 characters  | validation: minLength 1, maxLength 2000
     - name: password | type: string | description: Conference password.  Min: 1 character Max: 100 characters  | validation: minLength 1, maxLength 100
     - name: externalId | type: string | description: Conference GUID in an external system.  Min: 1 character Max: 150 characters  | validation: minLength 1, maxLength 150
     - name: provider | type: Provider | description: Conferencing provider information.  
        - ONE-OF: 
           - name: onlineMeetingInfo | type: OnlineMeetingInfo | description: Information about online meeting providers.  
              - name: appId | type: string | description:   | validation: format GUID
        - name: providerType | type: ProviderType | description:   
             - enum:
             -     CUSTOM: Custom conferencing link manually configured by the user.
             -     ONLINE_MEETING: Online meeting provider integrated via an app.
  - name: appId | type: string | description: GUID of the app that's associated with the schedule. You can't update `appId`. If you want to create a schedule and ensure its associated events appear in the [Bookings calendar](https://support.wix.com/en/article/wix-bookings-about-the-wix-booking-calendar), you must provide the Wix Bookings app GUID `13d21c63-b5ec-5912-8397-c3a5ddb27a97`. For schedules from Wix apps, the following values apply: - Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"` - Wix Services: `"cc552162-24a4-45e0-9695-230c4931ef40"` - Wix Meetings: `"6646a75c-2027-4f49-976c-58f3d713ed0f"` [Full list of apps created by Wix](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/platform/about-apps-created-by-wix.md).  | validation: format GUID, immutable
  - name: permissions | type: array<Permission> | description: List of permissions associated with the schedule. Refer to the [permissions article](https://dev.wix.com/docs/rest/business-management/calendar/permissions.md#roles) for more information.  Max: 1 permission  | validation: maxItems 1
     - name: identity | type: IdentificationData | description: [Wix user](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities.md#wix-users) granted the permission.  
        - ONE-OF: 
           - name: wixUserId | type: string | description: GUID of a Wix user. For example, the site owner or a [site collaborator](https://support.wix.com/en/article/inviting-people-to-contribute-to-your-site).  | validation: format GUID
     - name: role | type: Role | description: Permission role.  Supported values: + `WRITER`: Full read and write access. + `COMMENTER`: Full read access, write access limited to `event.notes`.  
         - enum:
         -     WRITER: Full read and write access.
         -     COMMENTER: Full read access, write access limited to `event.notes`.
  - name: extendedFields | type: ExtendedFields | description: Extensions enabling applications or users to save custom data related to the schedule.  
     - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured.  You can only access fields for which you have the appropriate permissions.  Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md).  | validation: format map
  - name: revision | type: string | description: Revision number, which increments by 1 each time the schedule is updated. To prevent conflicting changes, the current revision must be passed when updating the schedule. Ignored when creating a schedule.  | read-only: true | validation: format int64
  - name: _createdDate | type: Date | description: Date the schedule was created in `YYYY-MM-DDThh:mm:ss.sssZ` format.  | read-only: true 
  - name: _updatedDate | type: Date | description: Date the schedule was last updated in `YYYY-MM-DDThh:mm:ss.sssZ` format.  | read-only: true 

 Possible Errors:
   HTTP Code: 404 | Status Code: NOT_FOUND | Application Code: LOCATION_NOT_FOUND | Description: The business location referenced by `schedule.defaultLocation.id` doesn't exist.
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: UPDATE_CANCELLED_SCHEDULE_NOT_ALLOWED | Description: Can't update a schedule that's been canceled. Canceled schedules are read-only.


```

### Examples

### updateSchedule
```javascript
import { schedules } from '@wix/calendar';

async function updateSchedule(_id,schedule,options) {
  const response = await schedules.updateSchedule(_id,schedule,options);
};
```

### updateSchedule (with elevated permissions)
```javascript
import { schedules } from '@wix/calendar';
import { auth } from '@wix/essentials';

async function myUpdateScheduleMethod(_id,schedule,options) {
  const elevatedUpdateSchedule = auth.elevate(schedules.updateSchedule);
  const response = await elevatedUpdateSchedule(_id,schedule,options);
}
```

### updateSchedule (self-managed)
Self-managed SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { schedules } from '@wix/calendar';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { schedules },
  // Include the auth strategy and host as relevant
});


async function updateSchedule(_id,schedule,options) {
  const response = await myWixClient.schedules.updateSchedule(_id,schedule,options);
};
```

---