Skip to content

Deletes a comment, recounts the comments on its post and hands any attached media to the media cleanup hook.

The comment must belong to the post named in the path. The post comments_count is recalculated from the table rather than decremented, and the post updated_at is deliberately left untouched.

Endpoint

  • Method: DELETE

  • Path: /feeds/{feed_id}/comments/{comment_id}

  • Edition: Core

  • Controller: CommentsController@deleteComment

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

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

  • The comment author can always delete; anyone else needs the delete_any_comment permission in the space.

  • Destructive: the comment row is removed outright, and replies to it are orphaned rather than deleted.

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.

DELETE Delete Comment

DELETE
/feeds/{feed_id}/comments/{comment_id}

Deletes a comment, recounts the comments on its post and hands any attached media to the media cleanup hook.

Controller: CommentsController@deleteComment
Route source: fluent-community/app/Http/Routes/api.php:57

Authorizations

ApplicationPasswords

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

Type
API Key (header: Authorization)

Parameters

Path Parameters

feed_id*

Feed ID extracted from the URL path.

Type
integer
Required
comment_id*

Comment ID extracted from the URL path.

Type
integer
Required

Responses

Successful response

application/json
JSON
{
  
"message": "string"
}

Playground

Authorization
Variables
Key
Value

Samples

Powered by VitePress OpenAPI

FluentCommunity developer documentation