> 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: deleteEvent(eventId: string) # Method package: wixEventsBackend # Method menu location: wixEventsBackend --> WixEvents --> deleteEvent # Method Link: https://dev.wix.com/docs/velo/apis/wix-events-backend/wix-events/delete-event.md # Method Description: Deletes a Wix event. The `deleteEvent()` function returns a Promise that resolves when the specified Wix event is deleted. Any event can be deleted regardless of its status or if attendees are registered. Deleted events are not returned by the [`getEvent()`](https://dev.wix.com/docs/velo/api-reference/wix-events-backend/wix-events/get-event.md) or [`queryEvent()`](https://dev.wix.com/docs/velo/api-reference/wix-events-backend/wix-events/query-events.md) functions. Only those with "Manage Events" permissions can delete Wix events. > **Note**: This function requires [elevated permissions](https://www.wix.com/velo/reference/wix-auth/elevate) to run. > > This function is not [universal](https://www.wix.com/velo/reference/api-overview/api-versions#api-overview_api-versions_universal-modules) and runs only on the backend. # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## Delete a Wix event ```javascript import { Permissions, webMethod } from "wix-web-module"; import { wixEvents } from "wix-events-backend"; import { elevate } from "wix-auth"; /* Sample eventId value: '9d720f99-1b5a-4141-9877-d32985391e18'; */ export const myDeleteEventFunction = webMethod(Permissions.Anyone, async (eventId) => { try { const elevatedDeleteEvent = elevate(wixEvents.deleteEvent); const deletedEvent = await elevatedDeleteEvent(eventId); console.log('Success! Deleted event:', deletedEvent); return deletedEvent; } catch (error) { console.error(error); // Handle the error } }); /* Promise resolves to void */ ``` ---