/v1/communities/{community_id}/posts/{post_id}/reactionsAuthReact to a post. Idempotent: re-posting the same (actor, type) returns the existing edge with `created: false`.
Path parameters
community_id*stringSocial community UUID.
post_id*stringSocial post UUID.
Headers
Idempotency-KeystringOpaque 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 · uuidReactor — social actor UUID. Standardized name (task 008 / G11).
Example: "aaaaaaaa-0000-0000-0000-000000000001"
type*stringReaction type (1..64 chars).
Example: "like"
Response · 201 Reaction added.
edge*objectid*string · uuidEdge UUID.
Example: "eeeeeeee-0000-0000-0000-000000000001"
community_id*string · uuidOwning community UUID.
Example: "cccccccc-cccc-cccc-cccc-cccccccccccc"
kind*stringEdge kind (`reaction:<type>`).
Example: "reaction:like"
src_actor_id*string · uuidReactor actor UUID.
Example: "aaaaaaaa-0000-0000-0000-000000000001"
dst_actor_id*string · uuidDestination actor UUID — always `null` for post reactions (the target is `dst_post_id`).
Example: null
dst_post_id*string · uuidTarget post UUID.
Example: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb"
payload*objectFree-form payload.
Example: {}
created_at*string · date-timeISO timestamp.
Example: "2026-05-01T12:00:00.000Z"
created*boolean`true` on first call; `false` on idempotent retry.
Example: true
reaction_counts*objectDenormalised reaction counts after the write.
Example: {"like":13,"fire":3}
Example
Request
POST https://social.productcraft.co/v1/communities/{community_id}/posts/{post_id}/reactions
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json
{
"actor_id": "aaaaaaaa-0000-0000-0000-000000000001",
"type": "like"
}import { Social } from "@productcraft/social";
// Reads PRODUCTCRAFT_API_KEY from the environment
const social = new Social();
const reaction = await social.community("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f").as("7a8b9c0d-1e2f-4a3b-8c4d-5e6f7a8b9c0d").posts.reactions.create("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f", { type: "like" });social.community(…).posts.reactions.create(postId, params, options?): Social.Reaction
Response
{
"edge": {
"id": "eeeeeeee-0000-0000-0000-000000000001",
"community_id": "cccccccc-cccc-cccc-cccc-cccccccccccc",
"kind": "reaction:like",
"src_actor_id": "aaaaaaaa-0000-0000-0000-000000000001",
"dst_actor_id": null,
"dst_post_id": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
"payload": {},
"created_at": "2026-05-01T12:00:00.000Z"
},
"created": true,
"reaction_counts": {
"like": 13,
"fire": 3
}
}