Misar IO Docs
Misar.BlogApi Reference

Reactions

Get and manage article reactions — likes, claps, and bookmarks — via the MisarBlog API.

Overview

Reactions allow readers to express appreciation for articles. Three types are supported: like, clap, and bookmark. Each reader can hold at most one of each type per article. All reaction endpoints require API key authentication.


Get Reactions

GET api.misar.io/blog/v1/reactions

Returns reaction counts and the authenticated user's current reactions for a given article.

Query Parameters

ParameterTypeRequiredDescription
article_idstring (UUID)YesThe article to query reactions for

Response

200 OK

{
  "article_id": "550e8400-e29b-41d4-a716-446655440000",
  "counts": {
    "like": 42,
    "clap": 18,
    "bookmark": 7
  },
  "total": 67,
  "user_reactions": ["like"]
}
article_idstring

The queried article's UUID.

countsobject

Per-type reaction counts. Always includes like, clap, and bookmark keys.

totalnumber

Sum of all reaction counts across all types.

user_reactionsstring[]

Array of reaction types the authenticated user has set. Empty array if the user has not reacted. Possible values: "like", "clap", "bookmark".

Example

curl "https://api.misar.io/blog/v1/reactions?article_id=550e8400-e29b-41d4-a716-446655440000" \
  -H "Authorization: Bearer mbk_your_api_key"

Add a Reaction

POST api.misar.io/blog/v1/reactions

Adds a reaction to an article. If the user has already set this reaction type, the call is a no-op (idempotent).

Request Body

{
  "article_id": "550e8400-e29b-41d4-a716-446655440000",
  "type": "clap"
}
article_idstringrequired

UUID of the article to react to.

type"like" | "clap" | "bookmark"required

The reaction type to add.

Response

201 Created — reaction added.

{ "success": true, "reacted": true, "toggled": true }

200 OK — reaction already existed, no change.

{ "success": true, "reacted": true, "toggled": false }
toggledboolean

true if this call created a new reaction row; false if it already existed.

Example

curl -X POST "https://api.misar.io/blog/v1/reactions" \
  -H "Authorization: Bearer mbk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"article_id": "550e8400-e29b-41d4-a716-446655440000", "type": "clap"}'

Remove a Reaction

DELETE api.misar.io/blog/v1/reactions

Removes a specific reaction type from an article for the authenticated user.

Query Parameters

ParameterTypeRequiredDescription
article_idstring (UUID)YesThe article to remove the reaction from
type"like" | "clap" | "bookmark"YesThe reaction type to remove

Response

200 OK

{ "success": true, "reacted": false }

Example

curl -X DELETE \
  "https://api.misar.io/blog/v1/reactions?article_id=550e8400-e29b-41d4-a716-446655440000&type=clap" \
  -H "Authorization: Bearer mbk_your_api_key"