Skip to content

Adds or removes the current user reaction on a post and returns the updated count — a second route onto the same behaviour as the reactions toggle endpoint.

This path is served by the comments controller rather than the reaction controller, but the logic is duplicated line for line: same react_type handling, same remove flag, same response. New integrations should prefer POST /feeds/{feed_id}/reactions/toggle.

Endpoint

  • Method: POST

  • Path: /feeds/{feed_id}/react

  • Edition: Core

  • Controller: CommentsController@addOrRemovePostReact

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

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

  • Requires a signed-in user, and the post must be published.

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 Toggle Feed Reaction

POST
/feeds/{feed_id}/react

Adds or removes the current user reaction on a post and returns the updated count — a second route onto the same behaviour as the reactions toggle endpoint.

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

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

Request Body

application/json
JSON
{
  
"react_type": "string",
  
"remove": "string"
}

Responses

Successful response

application/json
JSON
{
  
"message": "string",
  
"new_count": 0
}

Playground

Authorization
Variables
Key
Value
Body

Samples

Powered by VitePress OpenAPI

FluentCommunity developer documentation