About Reports V2

With the Reports v2 API you can create and manage reports for items that are reported by site visitors, such as comments. For example, if a site visitor finds offensive content, such as hate speech, they can report it, and the report will appear in the Wix user's dashboard.

With the Reports v2 API, you can:

  • Create reports for the reported items.
  • Count how many times an item is reported for a specific reason.
  • Query all reports on the site, or use a filter to get the specific ones.
  • Delete individual reports or delete them in bulk using filters.

Before you begin

It is important to know the following points before using this API:

  • Identity can report a specific resource only once. For example, in Wix Comments an identity can report 1 comment for each widget.
  • This API is currently supported for Wix Comments only.

Use cases

Terminology

  • Report: A record created when a site visitor reports content (for example, a comment) as inappropriate or against community guidelines. Each report includes details such as the reason for reporting, the identity of the reporter, and timestamps for creation and updates.
  • Resource: A component or feature within a Wix site that hosts content, such as a comment section, blog, or forum. A resource serves as the context in which entities, like individual comments, can be reported.
  • Reported item: The specific item flagged by a site visitor within a resource, such as a comment or post. Each reported item is identified by an entityName and an entityId.
  • Identity: Identity that can report a comment. For more information about identities, see this article.
Did this help?

Reports v2: Sample Use Cases and Flows

This article shares some possible use cases of the API. You are not limited to these use cases, but they can be a helpful jumping off point as you plan on how to use this API.

Track reasons for content reports

You can analyze user-reported issues and identify recurring problems in the site's content. This helps site owners make informed decisions about updating community guidelines and implementing stricter content rules. For example, if the analysis reveals that a majority of reports cite "spam" as the issue, the site owner can implement automated spam detection tools and update community guidelines to address the problem proactively.

To track reasons for content reports:

  1. Call Count Reports by Reason Types to retrieve the reasonTypeCount array, and pass it to your data analysis tool for processing.
  2. On an ongoing basis, listen for the Report Created and Report Updated webhooks. Extract the reason field from these events and send it to your data analysis tool to update your calculations in real time.
Did this help?

Reports v2: Supported Filters and Sorting

The following table shows field support for filters and sorting for the Report object:

FieldsSupported FiltersSortable
id$eq, $ne, $in, $lt, $lte, $gt, $gteSortable
createdDate$eq, $ne, $in, $lt, $lte, $gt, $gteSortable
entityName$eq, $ne, $in, $lt, $lte, $gt, $gteSortable
entityId$eq, $ne, $in, $lt, $lte, $gt, $gteSortable
Did this help?

Report Object


Properties
idstringRead-onlyformat GUID

Report ID.


entityNamestringminLength 1maxLength 50

Reported entity name, such as comment.


entityIdstringminLength 1maxLength 50

Reported entity ID.


identityIdentityRead-only

Identity of who created a report.


reasonReason

Reason for the report.


revisionintegerRead-onlyformat int64

Revision number, which increments by 1 each time the rule is updated. To prevent conflicting changes, the existing revision must be used when updating a rule.


createdDatestringRead-onlyformat date-time

Date and time when the report created.


updatedDatestringRead-onlyformat date-time

Date and time when the report updated.


extendedFieldsExtendedFields

Custom field data for the report object.

Note: You must configure extended fields using schema plugin extensions in your app's dashboard before you can access the extended fields with API calls.

Report
JSON
Did this help?

POST

Create Report


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Creates a report.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage Reports
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/reports/v2/reports

Body Params
reportReportRequired

Report details.

Response Object
reportReport

Created report.

Create Report
Request
cURL
Response
JSON
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Event TriggersThis method triggers the following events:
Did this help?

GET

Get Report


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Retrieves a report.

Site members and visitors can only access their own reports.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage Reports
Read Reports
Learn more about app permissions.
Endpoint
GET
https://www.wixapis.com/reports/v2/reports/{reportId}

Path Params
reportIdstringRequired

ID of the report to retrieve.

Response Object
reportReport

Retrieved report.

Get Report
Request
cURL
Response
JSON
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?

DELETE

Delete Report


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Deletes a report and removes it from the report list in the dashboard.

Site members and visitors can only delete their own reports.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage Reports
Learn more about app permissions.
Endpoint
DELETE
https://www.wixapis.com/reports/v2/reports/{reportId}

Path Params
reportIdstringRequired

ID of the report to delete.

Response Object
Returns an empty object.
Delete Report
Request
cURL
Response
JSON
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Event TriggersThis method triggers the following events:
Did this help?

PATCH

Update Report


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Updates a report.

Each time the report is updated, revision increments by 1. The current revision must be passed when updating the report. This ensures you're working with the latest report and prevents unintended overwrites.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage Reports
Learn more about app permissions.
Endpoint
PATCH
https://www.wixapis.com/reports/v2/reports/{report.id}

Path Params
report.idstringRequired

Report ID.

Body Params
reportReportRequired

Report to update.

Response Object
reportReport

Updated report.

Update Report
Request
cURL
Response
JSON
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Event TriggersThis method triggers the following events:
Did this help?

POST

Upsert Report


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Creates or updates a report. If the report for the requested entity already exists, updates the report with the provided reason value. Otherwise, creates the report.

Permissions
Manage Reports
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/reports/v2/reports/upsert/entity-name/{report.entityName}/entity-id/{report.entityId}

Path Params
report.entityNamestringRequired

Reported entity name, such as comment.


report.entityIdstringRequired

Reported entity ID.

Body Params
reportReport

Report to create or update.

Response Object
reportReport

Updated or created report.

Upsert Report
Request
cURL
Response
JSON
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Event TriggersThis method triggers the following events:
Did this help?