Social guides
Guides
Comment reactions.
Same free-form `type` reactions as posts, this time on individual comments. Multiple reactions per (actor, comment) allowed (different `type` values count separately). Counter denormalised onto the comment row for cheap list reads.
1
React
Idempotent: re-posting the same (actor, type) returns the existing edge with created: false.
bash
curl -X POST \
-H "Authorization: Bearer pcft_live_..." \
-H "Content-Type: application/json" \
-d '{"src_actor_id":"<actorId>","type":"like"}' \
"https://social.productcraft.co/v1/communities/<communityId>/posts/<postId>/comments/<commentId>/reactions"json
{
"reaction": {
"comment_id": "...",
"actor_id": "...",
"community_id": "...",
"type": "like",
"created_at": "2026-05-11T19:55:00.000Z"
},
"created": true,
"reaction_counts": { "like": 4 }
}2
Unreact
Idempotent — calling DELETE for a reaction that isn't there returns 200 with the currentreaction_counts rather than 404.
bash
curl -X DELETE \
-H "Authorization: Bearer pcft_live_..." \
"https://social.productcraft.co/v1/communities/<communityId>/posts/<postId>/comments/<commentId>/reactions/<actorId>/like"3
List the reactions on a comment
Cursor-paginated, newest-first. Cursor encodes (created_at, actor_id, type) so multi- reaction-from-same-actor stays stable.
bash
curl -H "Authorization: Bearer pcft_live_..." \
"https://social.productcraft.co/v1/communities/<communityId>/posts/<postId>/comments/<commentId>/reactions?limit=50"Behaviour
What changes downstream
- Notification. The comment's author receives a
kind: "reaction", target_kind: "comment"notification withpayload: { type, post_id }. Self-reactions and blocked-pair reactions are suppressed at the producer. - Visibility. The reactor must be able to read the parent post; for
author_onlycomments they must also be the post author or the comment author. Otherwise returns404 Comment not found(opaque). - Block check. A block in either direction between reactor and comment author 409s the reaction (matches the post-reaction behaviour).
- Counters.
comment.reaction_countsis bumped / decremented atomically alongside the insert / delete and surfaces on every comment list read.
Permissions
PAK scopes
- POST requires
social.createonpcft:agora:comment/<commentId>. - DELETE requires
social.deleteon the same URN. - GET requires
social.listonpcft:agora:community/<communityId>.