> 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 # Method name: createTicketDefinition(ticketDefinition: TicketDefinition, options: CreateTicketDefinitionOptions) # Method package: wixEventsV2 # Method menu location: wixEventsV2 --> ticketDefinitionsV2 --> createTicketDefinition # Method Link: https://dev.wix.com/docs/velo/apis/wix-events-v2/ticket-definitions-v2/create-ticket-definition.md # Method Description: > **Note:** This function replaces the deprecated `createTicketDefinition()` function. The deprecated function will continue to work until November 8, 2024, but it will not receive updates. To keep any existing code compatible with future changes, see the [migration instructions](https://www.wix.com/velo/reference/wix-events-v2/ticketdefinitions/createticketdefinition). Creates a ticket definition. It is allowed to create up to 100 definitions per event. # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## createTicketDefinition example for dashboard page code ```javascript import { ticketDefinitionsV2 } from 'wix-events.v2'; async function createTicketDefinition(ticketDefinition, options) { try { const result = await ticketDefinitionsV2.createTicketDefinition(ticketDefinition, options); return result; } catch (error) { console.error(error); // Handle the error } } ``` ## createTicketDefinition example for exporting from backend code ```javascript import { ticketDefinitionsV2 } from 'wix-events.v2'; import { webMethod, Permissions } from 'wix-web-module'; import { elevate } from 'wix-auth'; const elevatedCreateTicketDefinition = elevate(ticketDefinitionsV2.createTicketDefinition); export const createTicketDefinition = webMethod( Permissions.Anyone, async (ticketDefinition, options) => { try { const result = await elevatedCreateTicketDefinition(ticketDefinition, options); return result; } catch (error) { console.error(error); // Handle the error } } ); ``` ---