> 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`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # CreateSchedule # Package: calendar # Namespace: SchedulesService # Method link: https://dev.wix.com/docs/api-reference/business-management/calendar/schedules-v3/create-schedule.md ## Permission Scopes: Manage Calendars: SCOPE.DC-CALENDAR.MANAGE ## Introduction Creates a schedule. If you want the schedule's events to appear in the [Bookings calendar](https://support.wix.com/en/article/wix-bookings-about-the-wix-booking-calendar), you must set `appId` to the ID of the Wix Bookings app by providing `{"appId": "13d21c63-b5ec-5912-8397-c3a5ddb27a97"}`. --- ## REST API ### Schema ``` Method: createSchedule Description: Creates a schedule. If you want the schedule's events to appear in the [Bookings calendar](https://support.wix.com/en/article/wix-bookings-about-the-wix-booking-calendar), you must set `appId` to the GUID of the Wix Bookings app by providing `{"appId": "13d21c63-b5ec-5912-8397-c3a5ddb27a97"}`. URL: https://www.wixapis.com/calendar/v3/schedules Method: POST # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: schedule, schedule.defaultLocation.type, schedule.defaultConferencingDetails.hostUrl, schedule.defaultConferencingDetails.guestUrl, schedule.permissionsentity, schedule.permissions.role Method parameters: param name: idempotencyKey | type: idempotencyKey | description: Idempotency key guaranteeing that you don't create the same schedule more than once. 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: 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). - name: name | type: string | description: Schedule name. Min: 1 character Max: 200 characters - 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 - 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 - 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. - 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. | required: true - 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 - 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`. - 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` - 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: type | type: Type | description: Conference type. For example, `Zoom`. - enum: UNKNOWN_TYPE, ZOOM, CUSTOM - name: hostUrl | type: string | description: URL used by the host to start the conference. Min: 1 character Max: 2000 characters | required: true - name: guestUrl | type: string | description: URL used by a guest to join the conference. Min: 1 character Max: 2000 characters | required: true - name: password | type: string | description: Conference password. Min: 1 character Max: 100 characters - name: externalId | type: string | description: Conference GUID in an external system. Min: 1 character Max: 150 characters - 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). - name: permissions | type: array | 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 - 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). - 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). Return type: CreateScheduleResponse - name: schedule | type: Schedule | description: Created schedule. - name: id | type: string | description: Schedule 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). - name: name | type: string | description: Schedule name. Min: 1 character Max: 200 characters - 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` - 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 - 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 - 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. - 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 - 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`. - 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` - 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: type | type: Type | description: Conference type. For example, `Zoom`. - enum: UNKNOWN_TYPE, ZOOM, CUSTOM - name: hostUrl | type: string | description: URL used by the host to start the conference. Min: 1 character Max: 2000 characters - name: guestUrl | type: string | description: URL used by a guest to join the conference. Min: 1 character Max: 2000 characters - name: password | type: string | description: Conference password. Min: 1 character Max: 100 characters - name: externalId | type: string | description: Conference GUID in an external system. Min: 1 character Max: 150 characters - 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). - name: permissions | type: array | 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 - 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). - 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). - 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. - name: createdDate | type: string | description: Date the schedule was created in `YYYY-MM-DDThh:mm:ss.sssZ` format. - name: updatedDate | type: string | description: Date the schedule was last updated in `YYYY-MM-DDThh:mm:ss.sssZ` format. ``` ### Examples ### Create Wix Bookings Schedule Extends Wix Bookings by creating a schedule with the Wix Bookings app ID. ```curl curl -X POST \ 'https://www.wixapis.com/calendar/v3/schedules' \ -H 'Content-Type: application/json' \ -H 'Authorization: ' \ -d '{ "schedule": { "name": "Time Blocker", "appId": "13d21c63-b5ec-5912-8397-c3a5ddb27a97" } }' ``` ### Create Schedule Creates a schedule with basic name and App ID info. ```curl curl -X POST \ 'https://www.wixapis.com/calendar/v3/schedules' \ -H 'Content-Type: application/json' \ -H 'Authorization: ' \ -d '{ "schedule": { "name": "Consulting 101", "appId": "27ef4db2-6609-4629-905d-3ec39e9d90e0" } }' ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.calendar.SchedulesService.createSchedule(schedule, options) Description: Creates a schedule. If you want the schedule's events to appear in the [Bookings calendar](https://support.wix.com/en/article/wix-bookings-about-the-wix-booking-calendar), you must set `appId` to the GUID of the Wix Bookings app by providing `{"appId": "13d21c63-b5ec-5912-8397-c3a5ddb27a97"}`. # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: schedule, schedule.defaultLocation.type, schedule.defaultConferencingDetails.hostUrl, schedule.defaultConferencingDetails.guestUrl, schedule.permissionsentity, schedule.permissions.role Method parameters: param name: options | type: CreateScheduleOptions none - name: idempotencyKey | type: string | description: Idempotency key guaranteeing that you don't create the same schedule more than once. 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: 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). - name: name | type: string | description: Schedule name. Min: 1 character Max: 200 characters - 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 - 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 - 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. - 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. | required: true - 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 - 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`. - 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` - 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: type | type: Type | description: Conference type. For example, `Zoom`. - enum: UNKNOWN_TYPE, ZOOM, CUSTOM - name: hostUrl | type: string | description: URL used by the host to start the conference. Min: 1 character Max: 2000 characters | required: true - name: guestUrl | type: string | description: URL used by a guest to join the conference. Min: 1 character Max: 2000 characters | required: true - name: password | type: string | description: Conference password. Min: 1 character Max: 100 characters - name: externalId | type: string | description: Conference GUID in an external system. Min: 1 character Max: 150 characters - 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). - name: permissions | type: array | 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 - 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). - 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). Return type: PROMISE - name: _id | type: string | description: Schedule 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). - name: name | type: string | description: Schedule name. Min: 1 character Max: 200 characters - 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` - 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 - 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 - 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. - 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 - 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`. - 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` - 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: type | type: Type | description: Conference type. For example, `Zoom`. - enum: UNKNOWN_TYPE, ZOOM, CUSTOM - name: hostUrl | type: string | description: URL used by the host to start the conference. Min: 1 character Max: 2000 characters - name: guestUrl | type: string | description: URL used by a guest to join the conference. Min: 1 character Max: 2000 characters - name: password | type: string | description: Conference password. Min: 1 character Max: 100 characters - name: externalId | type: string | description: Conference GUID in an external system. Min: 1 character Max: 150 characters - 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). - name: permissions | type: array | 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 - 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). - 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). - 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. - name: _createdDate | type: Date | description: Date the schedule was created in `YYYY-MM-DDThh:mm:ss.sssZ` format. - name: _updatedDate | type: Date | description: Date the schedule was last updated in `YYYY-MM-DDThh:mm:ss.sssZ` format. ``` ### Examples ### Create Wix Bookings schedule ```javascript import { schedules } from "@wix/calendar"; const schedule = { name: "Time Blocker", appId: "13d21c63-b5ec-5912-8397-c3a5ddb27a97", }; async function createSchedule() { const response = await schedules.createSchedule(schedule); return response; } ``` ### Create schedule with basic name and App ID ```javascript import { schedules } from "@wix/calendar"; const schedule = { name: "Consulting 101", appId: "27ef4db2-6609-4629-905d-3ec39e9d90e0", }; async function createSchedule() { const response = await schedules.createSchedule(schedule); return response; } ``` ### createSchedule (self-hosted) Self-hosted 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 createSchedule(schedule,options) { const response = await myWixClient.schedules.createSchedule(schedule,options); }; ``` ---