> 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: removeMarketingConsent(details: MarketingConsentDetails, options: RemoveMarketingConsentOptions) # Method package: wixMarketingV2 # Method menu location: wixMarketingV2 --> marketingConsent --> removeMarketingConsent # Method Link: https://dev.wix.com/docs/velo/apis/wix-marketing-v2/marketing-consent/remove-marketing-consent.md # Method Description: Removes a marketing consent. The consent is cancelled, and the `state` is updated to `REVOKED`. The marketing consent entity still exists, but the recipient is no longer eligible to receive commmunication. To delete a marketing consent entirely, use Delete Marketing Consent. Required fields: - `details.type`. - `details.email` OR `details.phone`. - `info.lastRevokeActivity`. # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## removeMarketingConsent example for dashboard page code ```javascript import { marketingConsent } from 'wix-marketing.v2'; async function removeMarketingConsent(details, options) { try { const result = await marketingConsent.removeMarketingConsent(details, options); return result; } catch (error) { console.error(error); // Handle the error } } ``` ## removeMarketingConsent example for exporting from backend code ```javascript import { marketingConsent } from 'wix-marketing.v2'; import { webMethod, Permissions } from 'wix-web-module'; import { elevate } from 'wix-auth'; const elevatedRemoveMarketingConsent = elevate(marketingConsent.removeMarketingConsent); export const removeMarketingConsent = webMethod( Permissions.Anyone, async (details, options) => { try { const result = await elevatedRemoveMarketingConsent(details, options); return result; } catch (error) { console.error(error); // Handle the error } } ); ``` ---