Social API reference

Social API · Post-Reactions

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

React to a post. Idempotent: re-posting the same (actor, type) returns the existing edge with `created: false`.

Path parameters

community_id*string

Social community UUID.

post_id*string

Social post 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 — social actor UUID. Standardized name (task 008 / G11).

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

type*string

Reaction type (1..64 chars).

Example: "like"

Response · 201 Reaction added.

edge*object
id*string · uuid

Edge UUID.

Example: "eeeeeeee-0000-0000-0000-000000000001"

community_id*string · uuid

Owning community UUID.

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

kind*string

Edge kind (`reaction:<type>`).

Example: "reaction:like"

src_actor_id*string · uuid

Reactor actor UUID.

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

dst_actor_id*string · uuid

Destination actor UUID — always `null` for post reactions (the target is `dst_post_id`).

Example: null

dst_post_id*string · uuid

Target post UUID.

Example: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb"

payload*object

Free-form payload.

Example: {}

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

Denormalised 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"
}

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
  }
}