> 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/crm/forms/spam-submissions/introduction.md

## Article Content:

# About the Spam Submissions API

The Spam Submissions API lets you check form submissions for spam and manage the submissions of [Wix Forms](https://support.wix.com/en/article/wix-forms-an-overview) forms that were flagged as spam.

With the Spam Submissions API, you can:

- Check whether a submission is spam.
- Query, retrieve, and count a form's spam submission reports.
- Report a submission as spam.
- Restore a spam submission as a regular submission.
- Delete spam submission reports.

A submission flagged as spam is stored as a form spam submission report, which holds the submitted values, the submitter, and the reason the submission was flagged. Regular submissions are managed with the [Form Submissions API](https://dev.wix.com/docs/api-reference/crm/forms/form-submissions/introduction.md), and forms are managed with the [Form Schemas API](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/introduction.md).

## How spam is detected

Wix Forms checks new submissions for spam automatically. You don't need to call [Check For Spam](https://dev.wix.com/docs/api-reference/crm/forms/spam-submissions/check-for-spam.md) for this.

Which checks run depends on the form's `spamFilterProtectionLevel` in the [Form Schemas API](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/introduction.md):

- `NONE`: Spam moderation service plugins installed on the site.
- `BASIC`: Moderation service plugins, blocklisted IP addresses and email addresses, and too many submissions from the same email address in a short time.
- `ADVANCED`: All basic checks, plus AI-based checks of the submission text.

The `reportReason` field of each report shows which check flagged the submission.

## Spam submission lifecycle

A form spam submission report goes through these stages:

- **Reported as spam:** A report is created, and the original submission is deleted. This happens when an automatic check flags a submission, or when you call [Report Spam Submission](https://dev.wix.com/docs/api-reference/crm/forms/spam-submissions/report-spam-submission.md).
- **Restored as not spam:** When you call [Report Not Spam Submission](https://dev.wix.com/docs/api-reference/crm/forms/spam-submissions/report-not-spam-submission.md), a new submission is created from the report's data, with a new submission ID, and the report is deleted. A submission that was `PENDING` when reported is restored as `CONFIRMED`. Any other status is kept. Submission automations run as they do for any new submission, and uploaded files are kept.
- **Deleted:** When you call [Delete Form Spam Submission Report](https://dev.wix.com/docs/api-reference/crm/forms/spam-submissions/delete-form-spam-submission-report.md), the report is permanently deleted, together with its uploaded files.
- **Expired:** Reports are deleted automatically after 30 days, together with their uploaded files.

To store a spam submission that was never saved as a regular submission, call [Create Form Spam Submission Report](https://dev.wix.com/docs/api-reference/crm/forms/spam-submissions/create-form-spam-submission-report.md). Unlike Report Spam Submission, it doesn't delete a submission.

Site owners see spam submission reports in the spam section of the form's submissions in the Wix dashboard. When a report is restored, the submission appears again in the form's submissions.

## Before you begin

It's important to note the following points before starting to code:

- The Spam Submissions API works with forms of the Wix Forms app. Call [Get App Instance](https://dev.wix.com/docs/api-reference/app-management/app-instance/get-app-instance.md) to confirm that the app named `wix_forms` is installed on the site.
- The API supports forms in the Wix Forms namespace, `wix.form_app.form`. Calls for forms in other namespaces fail with a permission error.
- When you query or count reports, specify the namespace. Query filters must include `namespace`, and [Count Form Spam Submission Reports](https://dev.wix.com/docs/api-reference/crm/forms/spam-submissions/count-form-spam-submission-reports.md) requires the `namespace` parameter.

## Use cases

- [Manage a form's spam folder](https://dev.wix.com/docs/api-reference/crm/forms/spam-submissions/sample-flows.md#manage-a-forms-spam-folder)
- [Let site owners mark submissions as spam](https://dev.wix.com/docs/api-reference/crm/forms/spam-submissions/sample-flows.md#let-site-owners-mark-submissions-as-spam)
- [Clear spam flagged for a specific reason](https://dev.wix.com/docs/api-reference/crm/forms/spam-submissions/sample-flows.md#clear-spam-flagged-for-a-specific-reason)

## Terminology

- **Form spam submission report:** A stored copy of a submission that was flagged as spam, with the reason it was flagged.
- **Namespace:** The app that a form belongs to. For Wix Forms, `wix.form_app.form`.
- **Spam protection level:** A form setting that controls which spam checks run on its submissions.
- **Spam moderation service plugin:** An app extension that checks submissions for spam and can flag them.

