> 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

# BulkReportNotSpamSubmission

# Package: forms

# Namespace: FormSpamSubmissionReportService

# Method link: https://dev.wix.com/docs/api-reference/crm/forms/form-spam-submission-report-v4/bulk-report-not-spam-submission.md

## Permission Scopes:
Manage form submissions.: SCOPE.FORMS.MANAGE-SUBMISSIONS

## Introduction

Restores multiple spam submissions of a form as regular submissions.

For each report, a new submission is created from the report's data, with a new submission ID, and the report is deleted shortly after. 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.

In the results, `itemMetadata.id` is the ID of the new submission. Report IDs that don't exist or that belong to another form are skipped.

To restore a single submission, call [Report Not Spam Submission](https://dev.wix.com/docs/api-reference/crm/forms/spam-submissions/report-not-spam-submission.md).

---

## REST API

### Schema

```
 Method: bulkReportNotSpamSubmission
 Description: Restores multiple spam submissions of a form as regular submissions.  For each report, a new submission is created from the report's data, with a new submission GUID, and the report is deleted shortly after. 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.  In the results, `itemMetadata.id` is the GUID of the new submission. Report GUIDs that don't exist or that belong to another form are skipped.  To restore a single submission, call [Report Not Spam Submission](https://dev.wix.com/docs/api-reference/crm/forms/spam-submissions/report-not-spam-submission.md).
 URL: https://www.wixapis.com/form-spam-submission-report-service/v4/bulk/form-spam-submission-reports/report-not-spam-submission
 Method: POST
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  formId
 Method parameters: 
   param name: formId | type: formId | description: GUID of the form that the reports belong to. | required: true | validation: format GUID
   param name: formSpamSubmissionReportIds | type: array<formSpamSubmissionReportIds> | description: IDs of the form spam submission reports to restore.  | validation: minItems 1, maxItems 100, format GUID
 Return type: BulkReportNotSpamSubmissionResponse
  - name: results | type: array<BulkReportNotSpamSubmissionResult> | description: Result for each restored report.  | validation: minItems 1, maxItems 100
     - name: itemMetadata | type: ItemMetadata | description: Metadata about the submission created from the report. `id` is the new submission GUID.  
        - name: id | type: string | description: Item GUID. Should always be available, unless it's impossible (for example, when failing to create an item).  | validation: format GUID
        - name: originalIndex | type: integer | description: Index of the item within the request array. Allows for correlation between request and response items.  
        - name: success | type: boolean | description: Whether the requested action was successful for this item. When `false`, the `error` field is populated.  
        - name: error | type: ApplicationError | description: Details about the error in case of failure.  
           - name: code | type: string | description: Error code.  
           - name: description | type: string | description: Description of the error.  
           - name: data | type: object | description: Data related to the error.  
     - name: formSpamSubmissionReportId | type: string | description: GUID of the restored form spam submission report.  | validation: format GUID
  - name: bulkActionMetadata | type: BulkActionMetadata | description: Metadata about the bulk action, such as the number of successes and failures.  
     - name: totalSuccesses | type: integer | description: Number of items that were successfully processed.  
     - name: totalFailures | type: integer | description: Number of items that couldn't be processed.  
     - name: undetailedFailures | type: integer | description: Number of failures without details because detailed failure threshold was exceeded.  


```

### Examples

### Restore multiple spam submissions
```curl
curl -X POST \
'https://www.wixapis.com/form-spam-submission-report-service/v4/bulk/form-spam-submission-reports/report-not-spam-submission' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
-d '{
  "formId": "21bcb6c7-02b3-4ed1-b6db-7856094fac03",
  "formSpamSubmissionReportIds": [
    "a7c3e2f1-5b8d-4e9a-9c1f-3d2e4b6a8f10",
    "c4d9f6b2-7a1e-4c3b-8f5d-2e9a7b1c6d42"
  ]
}'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.forms.formSpamSubmissionReports.bulkReportNotSpamSubmission(formId, options)
 Description: Restores multiple spam submissions of a form as regular submissions.  For each report, a new submission is created from the report's data, with a new submission GUID, and the report is deleted shortly after. 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.  In the results, `itemMetadata.id` is the GUID of the new submission. Report GUIDs that don't exist or that belong to another form are skipped.  To restore a single submission, call [Report Not Spam Submission](https://dev.wix.com/docs/api-reference/crm/forms/spam-submissions/report-not-spam-submission.md).
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  formId
 Method parameters: 
   param name: formId | type: string | description: GUID of the form that the reports belong to. | required: true | validation: format GUID
   param name: options | type: BulkReportNotSpamSubmissionOptions  none  
        - name: formSpamSubmissionReportIds | type: array<string> | description: IDs of the form spam submission reports to restore.  | validation: minItems 1, maxItems 100, format GUID
 Return type: PROMISE<BulkReportNotSpamSubmissionResponse>
  - name: results | type: array<BulkReportNotSpamSubmissionResult> | description: Result for each restored report.  | validation: minItems 1, maxItems 100
     - name: itemMetadata | type: ItemMetadata | description: Metadata about the submission created from the report. `id` is the new submission GUID.  
        - name: _id | type: string | description: Item GUID. Should always be available, unless it's impossible (for example, when failing to create an item).  | validation: format GUID
        - name: originalIndex | type: integer | description: Index of the item within the request array. Allows for correlation between request and response items.  
        - name: success | type: boolean | description: Whether the requested action was successful for this item. When `false`, the `error` field is populated.  
        - name: error | type: ApplicationError | description: Details about the error in case of failure.  
           - name: code | type: string | description: Error code.  
           - name: description | type: string | description: Description of the error.  
           - name: data | type: object | description: Data related to the error.  
     - name: formSpamSubmissionReportId | type: string | description: GUID of the restored form spam submission report.  | validation: format GUID
  - name: bulkActionMetadata | type: BulkActionMetadata | description: Metadata about the bulk action, such as the number of successes and failures.  
     - name: totalSuccesses | type: integer | description: Number of items that were successfully processed.  
     - name: totalFailures | type: integer | description: Number of items that couldn't be processed.  
     - name: undetailedFailures | type: integer | description: Number of failures without details because detailed failure threshold was exceeded.  


```

### Examples

### Restore multiple spam submissions
```javascript
import { formSpamSubmissionReports } from "@wix/forms";

async function bulkReportNotSpamSubmission() {
  const response = await formSpamSubmissionReports.bulkReportNotSpamSubmission(
    "21bcb6c7-02b3-4ed1-b6db-7856094fac03",
    {
      formSpamSubmissionReportIds: [
        "a7c3e2f1-5b8d-4e9a-9c1f-3d2e4b6a8f10",
        "c4d9f6b2-7a1e-4c3b-8f5d-2e9a7b1c6d42"
      ]
    },
  );
}

/* Promise resolves to:
 * {
 *   "results": [
 *     {
 *       "itemMetadata": {
 *         "_id": "d2f4a6c8-5e7b-4d9a-b1c3-9f2e4a6d8b71",
 *         "originalIndex": 0,
 *         "success": true
 *       },
 *       "formSpamSubmissionReportId": "a7c3e2f1-5b8d-4e9a-9c1f-3d2e4b6a8f10"
 *     },
 *     {
 *       "itemMetadata": {
 *         "_id": "7c9e1b3d-6f8a-4a2c-8e5b-3a7d9f1c5e84",
 *         "originalIndex": 1,
 *         "success": true
 *       },
 *       "formSpamSubmissionReportId": "c4d9f6b2-7a1e-4c3b-8f5d-2e9a7b1c6d42"
 *     }
 *   ],
 *   "bulkActionMetadata": {
 *     "totalSuccesses": 2,
 *     "totalFailures": 0,
 *     "undetailedFailures": 0
 *   }
 * }
 */

```

### bulkReportNotSpamSubmission (self-managed)
Self-managed 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 { formSpamSubmissionReports } from '@wix/forms';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { formSpamSubmissionReports },
  // Include the auth strategy and host as relevant
});


async function bulkReportNotSpamSubmission(formId,options) {
  const response = await myWixClient.formSpamSubmissionReports.bulkReportNotSpamSubmission(formId,options);
};
```

---