Reports

The Reports API lets users flag content or people for moderation. Weavy does not act on reports itself -- it stores the report and emits a report_created webhook, leaving the moderation policy (trash, review, delete or restore) to your application.

Report post

Report a post on behalf of the authenticated user. Reporting the same post again refreshes the report.

POST /api/posts/{id}/reports
Path parameters
id integer required

Post id.

Example request
curl -X POST {WEAVY-URL}/api/posts/1/reports
-H "Authorization: Bearer {ACCESS-TOKEN}"
Response codes

204 No Content
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found

Report user

Report a user on behalf of the authenticated user. Reporting the same user again refreshes the report.

POST /api/users/{user}/reports
Path parameters
user string required

User identifier (id or uid).

Example request
curl -X POST {WEAVY-URL}/api/users/bugs-bunny/reports
-H "Authorization: Bearer {ACCESS-TOKEN}"
Response codes

204 No Content
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found

Report comment

Report a comment on behalf of the authenticated user. Reporting the same comment again refreshes the report.

POST /api/comments/{id}/reports
Path parameters
id integer required

Comment id.

Example request
curl -X POST {WEAVY-URL}/api/comments/1/reports
-H "Authorization: Bearer {ACCESS-TOKEN}"
Response codes

204 No Content
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found

Report message

Report a message on behalf of the authenticated user. Reporting the same message again refreshes the report.

POST /api/messages/{id}/reports
Path parameters
id integer required

Message id.

Example request
curl -X POST {WEAVY-URL}/api/messages/1/reports
-H "Authorization: Bearer {ACCESS-TOKEN}"
Response codes

204 No Content
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found