> 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: deletePolicy(policyId: string) # Method package: wixEventsV2 # Method menu location: wixEventsV2 --> policies --> deletePolicy # Method Link: https://dev.wix.com/docs/velo/apis/wix-events-v2/policies/delete-policy.md # Method Description: Permanently deletes a policy. The `deletePolicy()` function returns a Promise that resolves when the specified policy is deleted. Deleted policies are not returned by the `getPolicy()` or `queryPolicies()` functions. # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## Delete Policy (dashboard page code) ```javascript import { policies } from 'wix-events.v2'; //define policy ID const policyId = '0907cf78-5177-4482-a627-b17ef06badec'; //delete policy function myDeletePolicyFunction(){ try { return policies.deletePolicy(policyId); } catch (error) { console.error(error); // Handle the error } }; // Returns void ``` ## Delete Policy (export from backend code) ```javascript import { Permissions, webMethod } from 'wix-web-module'; import { policies } from 'wix-events.v2'; import * as wixAuth from 'wix-auth'; //define policy ID const policyId = '0907cf78-5177-4482-a627-b17ef06badec'; export const elevatedDeletePolicyFunction = webMethod(Permissions.Anyone, () => { const elevatedDeletePolicy = wixAuth.elevate(policies.deletePolicy); try { return elevatedDeletePolicy(policyId); } catch (error) { console.error(error); // Handle the error } }); /* Promise resolves to void */ ``` ---