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:
It is important to know the following points before using this API:
entityName
and an entityId
.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.
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:
reasonTypeCount
array, and pass it to your data analysis tool for processing.reason
field from these events and send it to your data analysis tool to update your calculations in real time.The following table shows field support for filters and sorting for the Report object:
Fields | Supported Filters | Sortable |
---|---|---|
id | $eq , $ne , $in , $lt , $lte , $gt , $gte | Sortable |
createdDate | $eq , $ne , $in , $lt , $lte , $gt , $gte | Sortable |
entityName | $eq , $ne , $in , $lt , $lte , $gt , $gte | Sortable |
entityId | $eq , $ne , $in , $lt , $lte , $gt , $gte | Sortable |
Report ID.
Reported entity name, such as comment
.
Reported entity ID.
Identity of who created a report.
Reason for the report.
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.
Date and time when the report created.
Date and time when the report updated.
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": {
"id": "dd7cfd02-1837-4fb8-bc6f-86316f0984a9",
"entityName": "comment",
"entityId": "50353fbc-b265-4f03-888f-a53aa272758d",
"identity": {
"identityType": "MEMBER",
"memberId": "141a3e01-da55-4b3a-a44a-2f194bfc8897"
},
"reason": {
"reasonType": "DRUGS",
"description": "This person promotes drug usage."
},
"revision": "1",
"createdDate": "2021-10-26T17:22:10.299Z",
"updatedDate": "2021-10-26T17:22:10.299Z"
}
}
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.
You can only call this method when authenticated as a Wix app or Wix user identity.
Report details.
Created report.
curl -X POST \ https://www.wixapis.com/reports/v2/reports \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Authorization: <AUTH>' \
-d '{
"report": {
"entityName": "comment",
"entityId": "50353fbc-b265-4f03-888f-a53aa272758d"
"reason": {
"reasonType": "DRUGS",
"description": "This person promotes drug usage."
}
}
}'
{
"report": {
"id": "dd7cfd02-1837-4fb8-bc6f-86316f0984a9",
"entityName": "comment",
"entityId": "50353fbc-b265-4f03-888f-a53aa272758d",
"identity": {
"identityType": "MEMBER",
"memberId": "141a3e01-da55-4b3a-a44a-2f194bfc8897"
},
"reason": {
"reasonType": "DRUGS",
"description": "This person promotes drug usage."
},
"revision": "1",
"createdDate": "2021-10-26T17:22:10.299Z",
"updatedDate": "2021-10-26T17:22:10.299Z"
}
}
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.
You can only call this method when authenticated as a Wix app or Wix user identity.
ID of the report to retrieve.
Retrieved report.
curl -X GET \ https://www.wixapis.com/reports/v2/reports/dd7cfd02-1837-4fb8-bc6f-86316f0984a9 \
-H 'Authorization: <AUTH>'
{
"report": {
"id": "dd7cfd02-1837-4fb8-bc6f-86316f0984a9",
"entityName": "comment",
"entityId": "50353fbc-b265-4f03-888f-a53aa272758d",
"identity": {
"identityType": "MEMBER",
"memberId": "141a3e01-da55-4b3a-a44a-2f194bfc8897"
},
"reason": {
"reasonType": "DRUGS",
"description": "This person promotes drug usage."
},
"revision": "1",
"createdDate": "2021-10-26T17:22:10.299Z",
"updatedDate": "2021-10-26T17:22:10.299Z"
}
}
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.
You can only call this method when authenticated as a Wix app or Wix user identity.
ID of the report to delete.
curl -X DELETE \ https://www.wixapis.com/reports/v2/reports/dd7cfd02-1837-4fb8-bc6f-86316f0984a9 \
-H 'Authorization: <AUTH>'
{}
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.
You can only call this method when authenticated as a Wix app or Wix user identity.
Report ID.
Report to update.
Updated report.
curl -X PATCH \ https://www.wixapis.com/reports/v2/reports/dd7cfd02-1837-4fb8-bc6f-86316f0984a9 \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Authorization: <AUTH>' \
-d '{
"report": {
"id": "dd7cfd02-1837-4fb8-bc6f-86316f0984a9"
"entityId": "d360b45e-d2fe-4351-b412-55f22fee2db3"
}
}'
{
"report": {
"id": "dd7cfd02-1837-4fb8-bc6f-86316f0984a9",
"entityName": "comment",
"entityId": "d360b45e-d2fe-4351-b412-55f22fee2db3",
"identity": {
"identityType": "MEMBER",
"memberId": "141a3e01-da55-4b3a-a44a-2f194bfc8897"
},
"reason": {
"reasonType": "DRUGS",
"description": "This person promotes drug usage."
},
"revision": "1",
"createdDate": "2021-10-26T17:22:10.299Z",
"updatedDate": "2021-10-26T17:22:10.299Z"
}
}
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.
Reported entity name, such as comment
.
Reported entity ID.
Report to create or update.
Updated or created report.
curl -X POST \ https://www.wixapis.com/reports/v2/reports/upsert/entity-name/comment/entity-id/d360b45e-d2fe-4351-b412-55f22fee2db3 \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Authorization: <AUTH>' \
-d '{
"report": {
"entityName": "comment",
"entityId": "50353fbc-b265-4f03-888f-a53aa272758d"
"reason": {
"reasonType": "DRUGS",
"description": "This person promotes drug usage."
}
}
}'
{
"report": {
"id": "dd7cfd02-1837-4fb8-bc6f-86316f0984a9",
"entityName": "comment",
"entityId": "50353fbc-b265-4f03-888f-a53aa272758d",
"identity": {
"identityType": "MEMBER",
"memberId": "141a3e01-da55-4b3a-a44a-2f194bfc8897"
},
"reason": {
"reasonType": "DRUGS",
"description": "This person promotes drug usage."
},
"revision": "1",
"createdDate": "2021-10-26T17:22:10.299Z",
"updatedDate": "2021-10-26T17:22:10.299Z"
}
}
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Deletes multiple reports by filter, and removes them from the report list in the dashboard.
You can only call this method when authenticated as a Wix app or Wix user identity.
Query options. See API Query Language for more details.
Job ID. Pass this ID to Get Async Job to retrieve job details and metadata.
curl -X POST \ https://www.wixapis.com/reports/v2/reports/bulk/delete-by-filter \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Authorization: <AUTH>' \
-d '{
"filter": {
"entityId": {
"$eq": "50353fbc-b265-4f03-888f-a53aa272758d"
}
}
}'
{
"jobId": "4257085b-527c-4d0c-b011-fd5f86618599"
}
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Counts reports by reason types.
You can only call this method when authenticated as a Wix app or Wix user identity.
Reported entity name. For example, comment
.
ID of the reported entity.
List of reports grouped by the reason type.
curl -X POST \ https://www.wixapis.com/reports/v2/reports/reason-types/count \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Authorization: <AUTH>' \
-d '{
"entityName": "comment",
"entityId": "50353fbc-b265-4f03-888f-a53aa272758d"
}'
{
"reasonTypeCount": [
{
"reasonType": "DRUGS",
"count": 2
},
{
"reasonType": "UNAUTHORIZED_SALES",
"count": 8
}
]
}
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Retrieves a list of reports, given the provided paging, filtering, and sorting. Query Reports runs with these defaults, which you can override:
createdDate
is sorted in ASC
orderpaging.limit
is 100
paging.offset
is 0
For field support for filters and sorting, see Reports: Supported Filters and Sorting. To learn about working with Query endpoints, see API Query Language.
You can only call this method when authenticated as a Wix app or Wix user identity.
Query options. See API Query Language for more details.
List of reports.
Paging metadata.
curl -X POST \ https://www.wixapis.com/reports/v2/reports/query \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Authorization: <AUTH>' \
-d '{
"query": {
"filter": {
"entityId": {
"$eq": "50353fbc-b265-4f03-888f-a53aa272758d"
}
}
}
}'
{
"reports": [
{
"id": "dd7cfd02-1837-4fb8-bc6f-86316f0984a9",
"entityName": "comment",
"entityId": "50353fbc-b265-4f03-888f-a53aa272758d",
"identity": {
"identityType": "MEMBER",
"memberId": "141a3e01-da55-4b3a-a44a-2f194bfc8897"
},
"reason": {
"reasonType": "DRUGS",
"description": "This person promotes drug usage."
},
"revision": "1",
"createdDate": "2021-10-26T17:22:10.299Z",
"updatedDate": "2021-10-26T17:22:10.299Z"
},
{
"id": "2e776fae-80b6-4a5e-b6b9-891d8bc4d481",
"entityName": "comment",
"entityId": "50353fbc-b265-4f03-888f-a53aa272758d",
"identity": {
"identityType": "MEMBER",
"memberId": "141a3e01-da55-4b3a-a44a-2f194bfc8897"
},
"reason": {
"reasonType": "UNAUTHORIZED_SALES",
"description": "This person sells illegal stuff."
},
"revision": "1",
"createdDate": "2021-10-26T17:22:10.299Z",
"updatedDate": "2021-10-26T17:22:10.299Z"
}
]
}
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Updates extended fields of a report. Extended fields must first be configured in the app dashboard.
You can only call this method when authenticated as a Wix app or Wix user identity.
ID of the report to update.
Identifier for the app whose extended fields are being updated.
Data to update. Structured according to the schema defined when the extended fields were configured.
Updated report.
curl POST 'https://www.wixapis.com/reports/v2/reports/dd7cfd02-1837-4fb8-bc6f-86316f0984a9/update-extended-fields' \
-H 'Content-Type: application/json' \
-H 'Authorization: <AUTH>' \
-d '{
"namespace": "@my-app/data-extension-name",
"namespaceData": {
"reviewed": true
}
}'
{
"report": {
"id": "dd7cfd02-1837-4fb8-bc6f-86316f0984a9",
"entityName": "comment",
"entityId": "50353fbc-b265-4f03-888f-a53aa272758d",
"identity": {
"identityType": "MEMBER",
"memberId": "141a3e01-da55-4b3a-a44a-2f194bfc8897"
},
"reason": {
"reasonType": "DRUGS",
"description": "This person promotes drug usage."
},
"revision": "1",
"createdDate": "2021-10-26T17:22:10.299Z",
"updatedDate": "2021-10-26T17:22:10.299Z",
"extendedFields": {
"namespaces": {
"@my-app/data-extension-name": {
"reviewed": true
}
}
}
}
}
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Triggered when a report is created.
Unique event ID. Allows clients to ignore duplicate webhooks.
Fully qualified domain name of the entity associated with the event. Expected wix.reports.v2.report
.
Event name. Expected created
.
ID of the entity associated with the event.
Event timestamp.
Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).
If present, indicates the action that triggered the event.
Event information.
The data payload will include the following as an encoded JWT:
{
"data": {
"eventType": "wix.reports.v2.report_created",
"instanceId": "<app-instance-id>",
"data": "<stringified-JSON>",
// The identity field is sent as a stringified JSON
"identity": {
"identityType": "<identityType>", // ANONYMOUS_VISITOR, MEMBER, WIX_USER, APP
"anonymousVisitorId": "<anonymousVisitorId>", // in case of ANONYMOUS_VISITOR
"memberId": "<memberId>", // in case of MEMBER
"wixUserId": "<wixUserId>", // in case of WIX_USER
"appId": "<appId>" // in case of APP
}
}
}
{
"id": "87c0d894-4ed1-4c75-b167-27b7622558d2",
"entityFqdn": "wix.reports.v2.report",
"slug": "created",
"entityId": "89f3da66-abcb-4b0f-bb1d-68ce0faaaa12",
"createdEvent": {
"entity": {
"id": "dd7cfd02-1837-4fb8-bc6f-86316f0984a9",
"entityName": "comment",
"entityId": "50353fbc-b265-4f03-888f-a53aa272758d",
"identity": {
"identityType": "MEMBER",
"memberId": "141a3e01-da55-4b3a-a44a-2f194bfc8897"
},
"reason": {
"reasonType": "DRUGS",
"description": "This person promotes drug usage."
},
"revision": "1",
"createdDate": "2021-10-26T17:22:10.299Z",
"updatedDate": "2021-10-26T17:22:10.299Z"
}
},
"eventTime": "2021-01-27T11:23:43.804694Z",
"triggeredByAnonymizeRequest": false
}
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Triggered when a report is deleted.
Unique event ID. Allows clients to ignore duplicate webhooks.
Fully qualified domain name of the entity associated with the event. Expected wix.reports.v2.report
.
Event name. Expected deleted
.
ID of the entity associated with the event.
Event timestamp.
Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).
If present, indicates the action that triggered the event.
Event information.
The data payload will include the following as an encoded JWT:
{
"data": {
"eventType": "wix.reports.v2.report_deleted",
"instanceId": "<app-instance-id>",
"data": "<stringified-JSON>",
// The identity field is sent as a stringified JSON
"identity": {
"identityType": "<identityType>", // ANONYMOUS_VISITOR, MEMBER, WIX_USER, APP
"anonymousVisitorId": "<anonymousVisitorId>", // in case of ANONYMOUS_VISITOR
"memberId": "<memberId>", // in case of MEMBER
"wixUserId": "<wixUserId>", // in case of WIX_USER
"appId": "<appId>" // in case of APP
}
}
}
{
"id": "87c0d894-4ed1-4c75-b167-27b7622558d2",
"entityFqdn": "wix.reports.v2.report",
"slug": "deleted",
"entityId": "89f3da66-abcb-4b0f-bb1d-68ce0faaaa12",
"deletedEvent": {},
"eventTime": "2021-01-27T11:23:43.804694Z",
"triggeredByAnonymizeRequest": false
}
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Triggered when count of reports by reason is updated.
Unique event ID. Allows clients to ignore duplicate webhooks.
Fully qualified domain name of the entity associated with the event. Expected wix.reports.v2.report
.
Event name. Expected entity_report_summary_changed
.
ID of the entity associated with the event.
Event timestamp.
Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).
If present, indicates the action that triggered the event.
Event information.
The data payload will include the following as an encoded JWT:
{
"data": {
"eventType": "wix.reports.v2.report_entity_report_summary_changed",
"instanceId": "<app-instance-id>",
"data": "<stringified-JSON>",
// The identity field is sent as a stringified JSON
"identity": {
"identityType": "<identityType>", // ANONYMOUS_VISITOR, MEMBER, WIX_USER, APP
"anonymousVisitorId": "<anonymousVisitorId>", // in case of ANONYMOUS_VISITOR
"memberId": "<memberId>", // in case of MEMBER
"wixUserId": "<wixUserId>", // in case of WIX_USER
"appId": "<appId>" // in case of APP
}
}
}
{
"id": "6a986053-6942-4ca7-abe4-a04ee0f9c234",
"entityFqdn": "wix.reports.v2.report",
"slug": "entity_report_summary_changed",
"entityId": "b0c15082-c4da-4bd2-b040-1f1b3546edba",
"actionEvent": {
"body": {
"entityName": "comment",
"entityId": "50353fbc-b265-4f03-888f-a53aa272758d",
"reportCount": 3,
"reasonCounts": [
{
"reasonType": "SPAM",
"count": 2
},
{
"reasonType": "DRUGS",
"count": 1
}
]
}
},
"eventTime": "2021-01-27T11:23:43.804694Z",
"triggeredByAnonymizeRequest": false
}
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Triggered when a report is updated.
Unique event ID. Allows clients to ignore duplicate webhooks.
Fully qualified domain name of the entity associated with the event. Expected wix.reports.v2.report
.
Event name. Expected updated
.
ID of the entity associated with the event.
Event timestamp.
Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).
If present, indicates the action that triggered the event.
Event information.
The data payload will include the following as an encoded JWT:
{
"data": {
"eventType": "wix.reports.v2.report_updated",
"instanceId": "<app-instance-id>",
"data": "<stringified-JSON>",
// The identity field is sent as a stringified JSON
"identity": {
"identityType": "<identityType>", // ANONYMOUS_VISITOR, MEMBER, WIX_USER, APP
"anonymousVisitorId": "<anonymousVisitorId>", // in case of ANONYMOUS_VISITOR
"memberId": "<memberId>", // in case of MEMBER
"wixUserId": "<wixUserId>", // in case of WIX_USER
"appId": "<appId>" // in case of APP
}
}
}
{
"id": "87c0d894-4ed1-4c75-b167-27b7622558d2",
"entityFqdn": "wix.reports.v2.report",
"slug": "updated",
"entityId": "89f3da66-abcb-4b0f-bb1d-68ce0faaaa12",
"updatedEvent": {
"currentEntity": {
"id": "dd7cfd02-1837-4fb8-bc6f-86316f0984a9",
"entityName": "comment",
"entityId": "50353fbc-b265-4f03-888f-a53aa272758d",
"identity": {
"identityType": "MEMBER",
"memberId": "141a3e01-da55-4b3a-a44a-2f194bfc8897"
},
"reason": {
"reasonType": "DRUGS",
"description": "This person promotes drug usage."
},
"revision": "1",
"createdDate": "2021-10-26T17:22:10.299Z",
"updatedDate": "2021-10-26T17:22:10.299Z"
}
},
"eventTime": "2021-01-27T11:23:43.804694Z",
"triggeredByAnonymizeRequest": false
}