> 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: deleteLabel(key: string) # Method package: wixCrmV2 # Method menu location: wixCrmV2 --> labels --> deleteLabel # Method Link: https://dev.wix.com/docs/velo/apis/wix-crm-v2/labels/delete-label.md # Method Description: Deletes the specified label from a site and removes it from the contacts it applies to. # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## Delete a label (dashboard page code) ```javascript import { labels } from 'wix-crm.v2'; /* Sample key value: 'custom.at-risk' */ export async function myDeleteLabelFunction(key) { try { const deletedLabel = await labels.deleteLabel(key); console.log('Label deleted.'); } catch (error) { console.log(error); // Handle the error } } /* Promise resolves to void */ ``` ## Delete a label (export from backend code) ```javascript import { Permissions, webMethod } from 'wix-web-module'; import { labels } from 'wix-crm.v2'; import { elevate } from 'wix-auth'; /* Sample key value: 'custom.at-risk' */ export const myDeleteLabelFunction = webMethod(Permissions.Anyone, async (key) => { try { const elevatedDeleteLabel = elevate(labels.deleteLabel); const deletedLabel = await elevatedDeleteLabel(key); console.log('Label deleted.'); } catch (error) { console.log(error); // Handle the error } }); /* Promise resolves to void */ ``` ---