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.
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.
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_countis recalculated from the table rather than decremented, and the postupdated_atis deliberately left untouched.Endpoint
Method:
DELETEPath:
/feeds/{feed_id}/comments/{comment_id}Edition: Core
Controller:
CommentsController@deleteCommentRoute source:
fluent-community/app/Http/Routes/api.php:57Controller source:
fluent-community/app/Http/Controllers/CommentsController.phpThe comment author can always delete; anyone else needs the
delete_any_commentpermission 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
Deletes a comment, recounts the comments on its post and hands any attached media to the media cleanup hook.
Controller:
CommentsController@deleteCommentRoute source:
fluent-community/app/Http/Routes/api.php:57Authorizations
WordPress Application Passwords — use Basic auth with username:application_password.
Parameters
Path Parameters
Feed ID extracted from the URL path.
Comment ID extracted from the URL path.
Responses
Successful response
Playground
Authorization
Variables
Samples