> 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

# Package: forms

# Namespace: formSpamSubmissionReportV4

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

# Webhook Permissions Scopes IDs:
Manage form submissions.: SCOPE.FORMS.MANAGE-SUBMISSIONS

## Introduction

Triggered when a form spam submission report is deleted. Also fires when the report expires after 30 days, and when the submission is restored as not spam.

---

## REST API

### Schema

```
Webhook: Form Spam Submission Report Deleted
Description: Triggered when a form spam submission report is deleted. Also fires when the report expires after 30 days, and when the submission is restored as not spam.
Event body:
 - name: id | type: string | description: Unique event ID. Allows clients to ignore duplicate events.
 - name: entityFqdn | type: string | description: Fully qualified domain name of the entity associated with the event.
 - name: slug | type: string | description: Event name.
 - name: entityId | type: string | description: ID of the entity associated with the event.
 - name: eventTime | type: string (date-time) | description: Event timestamp.
 - name: triggeredByAnonymizeRequest | type: boolean | description: Whether the event was triggered as a result of a privacy regulation application such as GDPR.
 - name: originatedFrom | type: string | description: If present, indicates the action that triggered the event.

```

### Examples


```curl
{
  "id": "d89ac711-727f-4884-ab09-5ce4e334df02",
  "entityFqdn": "wix.forms.v4.form_spam_submission_report",
  "slug": "deleted",
  "entityId": "e62e3011-55cf-4de3-a497-e097b52d86b7",
  "deletedEvent": {
    "movedToTrash": false,
    "deletedEntityAsJson": "{\"id\": \"e62e3011-55cf-4de3-a497-e097b52d86b7\", \"formId\": \"e62e3011-55cf-4de3-a497-e097b52d86b8\", \"namespace\": \"wix.form_app.form\", \"submitter\": {\"visitorId\": \"4b42fb49-8c77-4128-859c-8247756f68ef\"}, \"submissions\": {\"first_name\": \"Adam\", \"last_name\": \"Fisher\"}, \"reportReason\": \"EMAIL_QUOTA_REACHED\", \"createdDate\": \"2019-10-30T16:20:00.299Z\", \"reportedDate\": \"2019-10-30T17:22:10.299Z\", \"updatedDate\": \"2019-10-30T17:22:10.299Z\", \"revision\": \"1\", \"submissionStatusAtReport\": \"PENDING\"}"
  },
  "eventTime": "2019-11-29T17:22:10.299Z",
  "triggeredByAnonymizeRequest": false,
  "entityEventSequence": "2"
}

```

---

## JavaScript SDK

### Schema

```
Webhook: onFormSpamSubmissionReportDeleted
Description: Triggered when a form spam submission report is deleted. Also fires when the report expires after 30 days, and when the submission is restored as not spam.
Payload: FormSpamSubmissionReportDeletedEnvelope
  - name: entity | type: FormSpamSubmissionReport | description: none
     - name: _id | type: string | description: Form spam submission report GUID.
     - name: formId | type: string | description: GUID of the form the submission was made on.
     - name: namespace | type: string | description: Namespace of the app that the form belongs to. Copied from the form.  Currently supports `wix.form_app.form`, the namespace of the Wix Forms app.
     - name: submitter | type: Submitter | description: Identity of the submitter: a member, visitor, app, or user.
        - ONE-OF:
           - name: memberId | type: string | description: Member GUID.
           - name: visitorId | type: string | description: Visitor GUID.
           - name: applicationId | type: string | description: Application GUID.
           - name: userId | type: string | description: User GUID.
     - name: submissions | type: Map<string,Value> | description: Submitted values. Each key is the `target` of a form field, and each value is what the submitter entered in that field.  Validated against the form's fields when the report is created.
        - ONE-OF:
           - name: nullValue | type:  | description: 
           - name: numberValue | type: number | description: 
           - name: stringValue | type: string | description: 
           - name: boolValue | type: boolean | description: 
           - name: structValue | type: object | description: 
           - name: listValue | type: ListValue | description: 
              - name: values | type: array<Value> | description: 
     - name: reportReason | type: ReportReason | description: Reason the submission was flagged as spam.
         - enum:
         -     EMAIL_QUOTA_REACHED: Too many submissions with the same email address in a short time.
         -     IP_BLOCKLISTED: The submitter's IP address is blocklisted.
         -     EMAIL_BLOCKLISTED: An email address in the submission is blocklisted.
         -     AI_REPORTED: Flagged by an AI model that analyzes the submission text. Runs on forms with the `ADVANCED` spam protection level.
         -     MANUALLY_REPORTED: Reported as spam by a person, such as the site owner or a collaborator.
         -     MODERATION_SPI: Flagged by a spam moderation service plugin installed on the site.
         -     AI_REPORTED_LLM: Flagged by a large language model (LLM) that analyzes the submission text. Runs on forms with the `ADVANCED` spam protection level, after all other checks found no spam.
     - name: _createdDate | type: Date | description: Date and time the original submission was created.  When you create a report for an existing submission, specify the submission's creation date to keep it. Can't be in the future.  Default: Date and time the report is created
     - name: reportedDate | type: Date | description: Date and time the submission was reported as spam.
     - name: _updatedDate | type: Date | description: Date and time the form spam submission report was last updated.
     - name: revision | type: string | description: Revision number, which increments by 1 each time the form spam submission report is updated.  Ignored when creating a form spam submission report.
     - name: extendedFields | type: ExtendedFields | description: Custom field data for the form spam submission report object.  [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions.md) must be configured in the app dashboard before they can be accessed with API calls.
        - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured.  You can only access fields for which you have the appropriate permissions.  Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md).
     - name: submissionStatusAtReport | type: SubmissionStatus | description: Status of the submission when it was reported as spam.  When the submission is restored as not spam, a `PENDING` status becomes `CONFIRMED`. Any other status is kept.  Returned as `PENDING` when the status wasn't recorded.
         - enum:
         -     PENDING: A submission is created, but has not yet been recorded in the Wix Forms collection.
         -     CONFIRMED: A submission is recorded in the Wix Forms collection.
         -     PAYMENT_WAITING: A form submission requiring payment is created.
         -     PAYMENT_CANCELED: An order of a form submission is canceled.
     - name: orderDetails | type: OrderDetails | description: Payment details of the submission.  Available only for forms with payments.
        - name: checkoutId | type: string | description: GUID of the checkout created for the submission.
     - name: contactId | type: string | description: GUID of the contact who submitted the form: the site member who submitted it, or the contact matched to the submitter.
     - name: accessRestriction | type: string | description: GUID of the user who is authorized to view the original submission. Copied from the submission's `accessRestriction`.  When set, reading the report requires the same additional access check as reading the submission.
     - name: reportReasonDescription | type: string | description: Additional details about why the submission was flagged as spam. For example, the explanation returned by a spam moderation service plugin, or a note from the person who reported it.
     - name: childMetaSiteId | type: string | description: GUID of the site the submission was made on.  Returned only when the site shares its data with a parent site. In that case, spam submission reports from all child sites are stored on the parent site, and this field identifies which site the report came from.
  - name: metadata | type: EventMetadata | description: none
     - name: instanceId | type: string | description: App instance GUID.
     - name: eventType | type: string | description: Event type.
     - name: identity | type: IdentificationData | description: The identification type and identity data.
        - ONE-OF:
           - name: anonymousVisitorId | type: string | description: GUID of a site visitor that has not logged in to the site.
           - name: memberId | type: string | description: GUID of a site visitor that has logged in to the site.
           - name: wixUserId | type: string | description: GUID of a Wix user (site owner, contributor, etc.).
           - name: appId | type: string | description: GUID of an app.
        - name: identityType | type: WebhookIdentityType | description: 
             - enum: UNKNOWN, ANONYMOUS_VISITOR, MEMBER, WIX_USER, APP
     - name: accountInfo | type: AccountInfo | description: Details related to the account
        - name: accountId | type: string | description: GUID of the Wix account associated with the event.
        - name: parentAccountId | type: string | description: GUID of the parent Wix account. Only included when accountId belongs to a child account.
        - name: siteId | type: string | description: GUID of the Wix site associated with the event. Only included when the event is tied to a specific site.
     - name: _id | type: string | description: Event GUID. With this GUID you can easily spot duplicated events and ignore them.
     - name: entityFqdn | type: string | description: Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities. For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
     - name: slug | type: string | description: Event action name, placed at the top level to make it easier for users to dispatch messages. For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
     - name: entityId | type: string | description: GUID of the entity associated with the event.
     - name: eventTime | type: Date | description: Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`.
     - name: triggeredByAnonymizeRequest | type: boolean | description: Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).
     - name: originatedFrom | type: string | description: If present, indicates the action that triggered the event.
     - name: entityEventSequence | type: string | description: A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number. You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.

```

### Examples


```javascript
import { formSpamSubmissionReports } from '@wix/forms';

formSpamSubmissionReports.onFormSpamSubmissionReportDeleted((event) => {
    // handle your event here
});
```


```javascript
import { createClient, AppStrategy } from '@wix/sdk';
import { formSpamSubmissionReports } from '@wix/forms';

const wixClient = createClient({
  auth: AppStrategy({
    appId: 'MY-APP-ID',
    publicKey: 'YOUR_APP_PUBLIC_KEY',
  }),
  modules: {
      formSpamSubmissionReports,
    },
});

wixClient.formSpamSubmissionReports.onFormSpamSubmissionReportDeleted((event) => {
    // handle your event here
});
```

---