> 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 # DeleteConsentConfig # Package: cookieConsentPolicy # Namespace: ConsentConfigsService # Method link: https://dev.wix.com/docs/api-reference/business-management/cookie-consent-policy/consent-configs/delete-consent-config.md ## Permission Scopes: Consent config: SCOPE.CONSENT_CONFIG.MANAGE ## Introduction Permanently deletes a consent config. --- ## REST API ### Schema ``` Method: deleteConsentConfig Description: Permanently deletes a consent config. URL: https://www.wixapis.com/bu/legal/v1/consent-configs/{consentConfigId} Method: DELETE # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: consentConfigId Method parameters: param name: consentConfigId | type: none | required: true Return type: DeleteConsentConfigResponse EMPTY-OBJECT {} ``` ### Examples ### Delete ConsentConfig Delete a consent config ```curl curl -X DELETE \ 'https://www.wixapis.com/consent/consent-config/v1/consent-configs/334afbf6-5c8b-4b43-9e9e-dd28664ca28f' \ -H 'Authorization: ' \ -H 'Content-Type: application/json' ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.cookieConsentPolicy.ConsentConfigsService.deleteConsentConfig(consentConfigId) Description: Permanently deletes a consent config. # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: consentConfigId Method parameters: param name: consentConfigId | type: string | description: Consent config GUID to delete. | required: true Return type: PROMISE EMPTY-OBJECT {} ``` ### Examples ### deleteConsentConfig ```javascript import { consentConfig } from '@wix/consent-policy'; async function deleteConsentConfig(consentConfigId) { const response = await consentConfig.deleteConsentConfig(consentConfigId); }; ``` ### deleteConsentConfig (with elevated permissions) ```javascript import { consentConfig } from '@wix/consent-policy'; import { auth } from '@wix/essentials'; async function myDeleteConsentConfigMethod(consentConfigId) { const elevatedDeleteConsentConfig = auth.elevate(consentConfig.deleteConsentConfig); const response = await elevatedDeleteConsentConfig(consentConfigId); } ``` ### deleteConsentConfig (self-hosted) Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md). ```javascript import { createClient } from '@wix/sdk'; import { consentConfig } from '@wix/consent-policy'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { consentConfig }, // Include the auth strategy and host as relevant }); async function deleteConsentConfig(consentConfigId) { const response = await myWixClient.consentConfig.deleteConsentConfig(consentConfigId); }; ``` ---