> 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: Manage Site Visitor Email Subscriptions

## Article: Manage Site Visitor Email Subscriptions

## Article Link: https://dev.wix.com/docs/build-apps/launch-your-app/app-promotion/self-promotion/manage-site-visitor-email-subscriptions.md

## Article Content:

# Manage Site Visitor Email Subscriptions
If your app sends emails to a site’s users, it’s really important to make sure you don’t send emails to anyone that’s unsubscribed from that site’s mailing list. This helps you to comply with regulations relating to email communications (like GDPR) and maintain a positive user experience.

Here’s how to manage site visitor subscriptions correctly:

## Step 1 | Check the user's subscription status
Before you send any emails, check whether or not a user is subscribed.

There are two ways to do this:

1.  Use our [Email Subscriptions API](https://dev.wix.com/docs/rest/crm/communication/email-subscriptions/introduction.md) to query the email address and check a user’s subscription status.
2.  Listen to the [Email Subscription Changed Webhook](https://dev.wix.com/docs/rest/crm/communication/email-subscriptions/emailsubscription-email-subscription-changed.md) to see whenever an email subscription changes.

## Step 2 | Update the user's subscription status
When a user unsubscribes, you need to make sure that you update the email subscription status.

You can either:

1.  [Generate an unsubscribe link using our API](https://dev.wix.com/docs/rest/crm/communication/email-subscriptions/generate-unsubscribe-link.md): Add this to all of the emails you send to that specific email address and it automatically unsubscribes the user when they click the link
2.  Use your own unsubscribe link / method if you have one: If a user does unsubscribe, you can make an API request to [update that info](https://dev.wix.com/docs/rest/crm/communication/email-subscriptions/upsert-email-subscription.md).

## See also
- [Send marketing emails](https://dev.wix.com/docs/build-apps/launch-your-app/app-promotion/send-marketing-emails.md)
- [About app promotion](https://dev.wix.com/docs/build-apps/launch-your-app/app-promotion/about-app-promotion.md)