createSchedule( )


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Creates a schedule.

If you want the schedule's events to appear in the Bookings calendar, you must set appId to the ID of the Wix Bookings app by providing {"appId": "13d21c63-b5ec-5912-8397-c3a5ddb27a97"}.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage Bookings - all permissions
Manage Bookings
Manage Calendars
Learn more about app permissions.
Method Declaration
Copy
function createSchedule(
  schedule: Schedule,
  options: CreateScheduleOptions,
): Promise<Schedule>;
Method Parameters
scheduleScheduleRequired

Schedule to create.


optionsCreateScheduleOptions
Returns
Return Type:Promise<Schedule>
JavaScript
import { schedules } from "@wix/calendar"; async function createSchedule(schedule, options) { const response = await schedules.createSchedule(schedule, options); }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?