> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> 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`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: Introduction

## Article: Introduction

## Article Link: https://dev.wix.com/docs/api-reference/business-management/marketing/marketing-consent/introduction.md

## Article Content:

# About Marketing Consent

When a visitor signs up for non-transactional (meaning, promotional) content, such as a newsletter, they are consenting to receive marketing messages. This agreement is called a marketing consent. A marketing consent holds the visitor's sign-up details such as email address or phone number, the status of the consent, and more.

The Marketing Consent API allows you to manage a site's marketing consents. With the Marketing Consent API, you can:

+ Create and update a visitor's marketing consent. 
+ Get a visitor's marketing consent by ID or communication details. 
+ Query visitor marketing consents.
+ Cancel a visitor's marketing consent. 
+ Delete a visitor's marketing consent entirely.

You can also listen for events when a visitor's marketing consent is [created](https://dev.wix.com/docs/rest/business-management/marketing/marketing-consent/marketing-consent-created.md), [updated](https://dev.wix.com/docs/rest/business-management/marketing/marketing-consent/marketing-consent-updated.md), and [deleted](https://dev.wix.com/docs/rest/business-management/marketing/marketing-consent/marketing-consent-deleted.md). 

## Opt in levels
A marketing consent has an `optInLevel` of either single or double confirmation. Some countries require double confirmation for all marketing consents. With single confirmation, when a site visitor signs up, their marketing consent `state` is `CONFIRMED`. With double confirmation, when a site visitor signs up, their marketing consent `state` is `PENDING` until the visitor confirms their consent, for example, by clicking a link to verify their email address. When the visitor confirms their consent, the `state` is `CONFIRMED`. 

## Communication eligibility
The [Get Marketing Consent By Identifier](https://dev.wix.com/docs/rest/business-management/marketing/marketing-consent/get-marketing-consent-by-identifier.md) method returns the `communicationEligibility.granted` boolean which determines whether the recipient of the marketing consent is eligible to receive marketing messages. Note that this only serves as a signal for you to decide whether or not you should send marketing messages to the recipient's email address or phone number.

For example:
+ If a visitor cancels their marketing consent, they are no longer eligible to receive communication, and `CommunicationEligibility.granted` is `false`. This applies to marketing consents made by both phone and email. 
+ If a marketing consent's `state` is `NEVER_CONFIRMED`, the visitor has never confirmed to receive communication, and `CommunicationEligibility.granted` is `false`. This applies only to marketing consents made by **phone**. If a visitor made a marketing consent by **email** and the `state` is `NEVER_CONFIRMED`, the visitor can still receive communication, and `CommunicationEligibility.granted` is `true`.

## Before you begin
- Call [Create Marketing Consent](https://dev.wix.com/docs/rest/business-management/marketing/marketing-consent/create-marketing-consent.md) for consent with single confirmation only. To create a marketing consent with double confirmation, call [Upsert Marketing Consent](https://dev.wix.com/docs/rest/business-management/marketing/marketing-consent/upsert-marketing-consent.md).

## Terminology

+ **Visitor:** A visitor is any person who visits a site, including contacts, non-contacts, members, and non-members. 

+ **Communication channel:** Each marketing consent has a communication channel of either `email` or `phone`. A visitor can sign up multiple times using different email addresses and phone numbers, however, they can only create a single marketing consent per email and per phone number.

+ **State:** Different states of a marketing consent: 
  + `UNKNOWN_STATE`: State of the marketing consent is unknown.
  + `NEVER_CONFIRMED`: The visitor never confirmed to receive marketing messages.
  + `REVOKED`: The marketing consent has been removed, for example, when a visitor unsubscribes from a newsletter. 
  + `PENDING`: The marketing consent is pending confirmation. Relevant only for `{"optInLevel": "DOUBLE_CONFIRMATION"}`.
  + `CONFIRMED`: The site visitor has confirmed their marketing consent.   

+ **Opt in level:** A marketing consent can require either single or double confirmation, as some countries require double confirmation for all marketing consents. 

+ **Communication eligibility:** A signal for you to easily check whether or not you can send marketing messages to the recipient's email address or phone number.

