Creates an event.
The event includes a default registration form in the selected language, which consists of input fields for first name, last name, and email. See Registration Form for more information.
You can create the event as a draft by setting the draft value to true. Otherwise, the event is published right away.
The event is automatically set up to send daily summary reports of new guests to your business email.
This function requires elevated permissions and runs only on the backend and on dashboard pages.
function createEvent(
event: V3Event,
options: CreateEventOptions,
): Promise<V3Event>;
Event data.
Optional fields.
import { wixEventsV2 } from "wix-events.v2";
async function createEvent(event, options) {
try {
const result = await wixEventsV2.createEvent(event, options);
return result;
} catch (error) {
console.error(error);
// Handle the error
}
}
There are 2 errors with this status code.
There are 2 errors with this status code.
This method may also return standard errors. Learn more about standard Wix errors.