Social API reference

Social API · Comment-Reactions

post/v1/communities/{community_id}/posts/{post_id}/comments/{comment_id}/reactionsAuth

React to a comment. Idempotent: re-posting the same `(actor, type)` returns the existing row with `created: false`. Multiple reactions per `(actor, comment)` are allowed (different `type` values count separately).

Path parameters

community_id*string

Social community UUID. Must belong to the PAK's workspace.

post_id*string

Parent post UUID.

comment_id*string

Comment UUID.

Headers

Idempotency-Keystring

Opaque client-generated string (1-256 chars, `[A-Za-z0-9._:-]`) that makes a retry safe: within 24 h a repeat with the same key and body returns the original response with `Idempotent-Replay: true` instead of running again. Same key with a different body is `409 IDEMPOTENCY_KEY_REUSE`.

Request body

actor_id*string · uuid

Reactor actor UUID. Standardized name (task 008 / G11).

Example: "aaaaaaaa-0000-0000-0000-000000000001"

type*string

Reaction type (free-form short label, e.g. `like`, `fire`, `heart`).

Example: "like"

Response · 201 Reaction added; response carries live `reaction_counts`.

reaction*object
comment_id*string · uuid

Comment UUID.

Example: "bbbbbbbb-0000-0000-0000-000000000001"

actor_id*string · uuid

Reactor actor UUID.

Example: "aaaaaaaa-0000-0000-0000-000000000001"

community_id*string · uuid

Owning community UUID.

Example: "cccccccc-cccc-cccc-cccc-cccccccccccc"

type*string

Reaction type label.

Example: "like"

created_at*string · date-time

ISO timestamp.

Example: "2026-05-01T12:00:00.000Z"

created*boolean

`true` on first call; `false` on idempotent retry.

Example: true

reaction_counts*object

Live denormalised counts on the comment after this write.

Example: {"like":4}

Example

Request

POST https://social.productcraft.co/v1/communities/{community_id}/posts/{post_id}/comments/{comment_id}/reactions
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json

{
  "actor_id": "aaaaaaaa-0000-0000-0000-000000000001",
  "type": "like"
}

Response

{
  "reaction": {
    "comment_id": "bbbbbbbb-0000-0000-0000-000000000001",
    "actor_id": "aaaaaaaa-0000-0000-0000-000000000001",
    "community_id": "cccccccc-cccc-cccc-cccc-cccccccccccc",
    "type": "like",
    "created_at": "2026-05-01T12:00:00.000Z"
  },
  "created": true,
  "reaction_counts": {
    "like": 4
  }
}