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
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." } } }'
Response
JSON
{ "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" } }
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?