Skip to content

Add or Toggle Reaction

POST
/api/v1/posts/{id}/reactions

Authorizations

SessionAuth

Session ID for authenticated requests

Type
API Key (header: X-Session-ID)

Parameters

Path Parameters

id*
Type
string
Required

Request Body

application/json
JSON
{
  
"reaction": "like"
}

Responses

Reaction updated

Playground

Server
Authorization
Variables
Key
Value
Body

Samples

Powered by VitePress OpenAPI

Add or toggle a reaction on a blog post.

Auth: session.

Parameters

NameInTypeRequiredDescription
idpathstringYesPost id

Request Body

json
{
	"type": "like"
}

Response 200

json
{
	"data": { "post_id": "post_2", "reaction": "like", "active": true },
	"user_context": { "authenticated": true },
	"meta": {}
}

Response Errors

  • 400 invalid reaction type
  • 401 missing session
  • 404 post not found

Notes

  • Use this for likes, hearts, or similar engagement reactions.
  • The backend should keep the reaction model consistent per user.