Skip to content

Files a moderation report against a post or a comment and returns the report together with the reported content.

content_type must be post or comment, post_id is required, and a comment report additionally needs the comment id in parent_id. reason is capped at 255 characters and the optional explanation at 1000. A member can only report the same content once. The running report count is written onto the reported content, and fluent_community/content_moderation/created fires — the listeners on that hook are what notify moderators and can auto-unpublish content once the configured threshold is reached.

Endpoint

  • Method: POST

  • Path: /moderation/report

  • Edition: PRO

  • Controller: ModerationController@create

  • Route source: fluent-community-pro/app/Http/Routes/api.php:93

  • Controller source: fluent-community-pro/app/Http/Controllers/ModerationController.php

  • Requires an active portal user; unlike the rest of the moderation group this endpoint is not gated on the content_moderation feature flag, so reports can still be filed while the feature is off even though no screen lists them.

  • The guard that stops members reporting a moderator applies to posts only, not to comments.

Live sample

The request and response below were recorded against a running FluentCommunity install and then anonymised — member names, emails, avatars and post content are fictional, and long collections are trimmed to a few entries.

POST Create Moderation Report

POST
/moderation/report

Files a moderation report against a post or a comment and returns the report together with the reported content.

Controller: ModerationController@create
Route source: fluent-community-pro/app/Http/Routes/api.php:93

Authorizations

ApplicationPasswords

WordPress Application Passwords — use Basic auth with username:application_password.

Type
API Key (header: Authorization)

Request Body

application/json
JSON
{
  
"reason": "string",
  
"explanation": "string",
  
"content_type": "string",
  
"post_id": "string",
  
"parent_id": "string",
  
"user_id": "string"
}

Responses

Successful response

application/json
JSON
{
  
"content": {
  
  
"comments_count": 0,
  
  
"content_type": "string",
  
  
"created_at": "string",
  
  
"expired_at": "string",
  
  
"featured_image": "string",
  
  
"id": 0,
  
  
"is_sticky": 0,
  
  
"message": "string",
  
  
"message_rendered": "string",
  
  
"meta": {
  
  
  
"auto_flagged": "string",
  
  
  
"flagged_reason": "string",
  
  
  
"media_preview": "string",
  
  
  
"prevent_published": "string",
  
  
  
"reports_count": 0
  
  
},
  
  
"parent_id": "string",
  
  
"permalink": "string",
  
  
"priority": 0,
  
  
"privacy": "string",
  
  
"reactions_count": 0,
  
  
"scheduled_at": "string",
  
  
"slug": "string",
  
  
"space": {
  
  
  
"cover_photo": "string",
  
  
  
"created_at": "string",
  
  
  
"created_by": "string",
  
  
  
"description": "string",
  
  
  
"id": 0,
  
  
  
"logo": "string",
  
  
  
"parent_id": "string",
  
  
  
"privacy": "string",
  
  
  
"serial": "string",
  
  
  
"settings": {
  
  
  
  
"can_request_join": "string",
  
  
  
  
"custom_lock_screen": "string",
  
  
  
  
"default_comment_sort_by": "string",
  
  
  
  
"default_post_sort_by": "string",
  
  
  
  
"disable_layout_style": "string",
  
  
  
  
"disable_post_sort_by": "string",
  
  
  
  
"document_access": "string",
  
  
  
  
"document_library": "string",
  
  
  
  
"document_upload": "string",
  
  
  
  
"emoji": "string",
  
  
  
  
"hide_members_count": "string",
  
  
  
  
"layout_style": "string",
  
  
  
  
"links": [
  
  
  
  
  
{
  
  
  
  
  
  
"additionalProperties": "string"
  
  
  
  
  
}
  
  
  
  
],
  
  
  
  
"media_access": "string",
  
  
  
  
"media_gallery": "string",
  
  
  
  
"members_page_status": "string",
  
  
  
  
"og_image": "string",
  
  
  
  
"restricted_post_only": "string",
  
  
  
  
"shape_svg": "string",
  
  
  
  
"show_paywalls": "string",
  
  
  
  
"show_sidebar": "string",
  
  
  
  
"topic_required": "string"
  
  
  
},
  
  
  
"slug": "string",
  
  
  
"status": "string",
  
  
  
"title": "string",
  
  
  
"type": "string",
  
  
  
"updated_at": "string"
  
  
},
  
  
"space_id": "string",
  
  
"status": "string",
  
  
"title": "string",
  
  
"type": "string",
  
  
"updated_at": "string",
  
  
"user": {
  
  
  
"ID": 0,
  
  
  
"display_name": "string",
  
  
  
"photo": "string",
  
  
  
"user_email": "string",
  
  
  
"user_login": "string",
  
  
  
"user_nicename": "string",
  
  
  
"user_registered": "string",
  
  
  
"user_status": "string",
  
  
  
"user_url": "string"
  
  
},
  
  
"user_id": "string"
  
},
  
"message": "string",
  
"report": {
  
  
"content_type": "string",
  
  
"created_at": "string",
  
  
"explanation": "string",
  
  
"id": 0,
  
  
"meta": "string",
  
  
"parent_id": "string",
  
  
"post_id": "string",
  
  
"reason": "string",
  
  
"reports_count": "string",
  
  
"status": "string",
  
  
"type": "string",
  
  
"user_id": "string"
  
}
}

Playground

Authorization
Body

Samples

Powered by VitePress OpenAPI

FluentCommunity developer documentation