Reactions
Get and manage article reactions — likes, claps, and bookmarks — via the MisarBlog API.
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
api.misar.io/blog/v1/reactionsReturns reaction counts and the authenticated user's current reactions for a given article.
Query parameters
article_idstring (UUID)queryrequiredThe article to query reactions for.
Response fields
article_idstringThe queried article's UUID.
countsobjectPer-type reaction counts. Always includes like, clap, and bookmark keys.
totalnumberSum 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".
{
"article_id": "550e8400-e29b-41d4-a716-446655440000",
"counts": {
"like": 42,
"clap": 18,
"bookmark": 7
},
"total": 67,
"user_reactions": ["like"]
}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
api.misar.io/blog/v1/reactionsAdds a reaction to an article. If the user has already set this reaction type, the call is a no-op (idempotent).
Request body
article_idstringbodyrequiredUUID of the article to react to.
type"like" | "clap" | "bookmark"bodyrequiredThe reaction type to add.
Response fields
toggledbooleantrue if this call created a new reaction row; false if it already existed.
{
"article_id": "550e8400-e29b-41d4-a716-446655440000",
"type": "clap"
}{ "success": true, "reacted": true, "toggled": true }{ "success": true, "reacted": true, "toggled": false }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
api.misar.io/blog/v1/reactionsRemoves a specific reaction type from an article for the authenticated user.
Query parameters
article_idstring (UUID)queryrequiredThe article to remove the reaction from.
type"like" | "clap" | "bookmark"queryrequiredThe reaction type to remove.
Response fields
successbooleantrue when the reaction was removed.
{ "success": true, "reacted": false }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"