Social API reference

Social API · Comments

patch/v1/communities/{community_id}/posts/{post_id}/comments/{comment_id}Auth

Update a comment's body, status, or visibility.

Path parameters

community_id*string

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

post_id*string

Social post UUID the comments thread under.

comment_id*string

Social comment UUID.

Request body

bodystring

Updated body.

statusenum (3)

Direct status transition. Prefer the moderation lane for `hidden`/`removed`.

visibilityenum (2)

`public`, or `author_only` to hide it from everyone but its author.

Response · 200 Comment updated.

id*string · uuid

Comment UUID.

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

community_id*string · uuid

Owning community UUID.

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

post_id*string · uuid

Post the comment threads under.

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

parent_id*string · uuid

Parent comment UUID for replies; `null` for top-level.

Example: null

actor_id*string · uuid

Comment author actor UUID.

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

body*string

Comment body.

Example: "Looks great, shipping today."

depth*number

Thread depth — 0 for top-level, 1 for first reply, etc. Capped per community.

Example: 0

status*object

Lifecycle status. `pending_approval` = held by restricted-commenter pre-moderation; list endpoints surface these rows only to the comment author and the post-author (who publishes them via POST :commentId/approve). `removed` rows are hidden from public reads.

Example: "published"

visibility*object

`public` (default) is visible to anyone who can read the post; `author_only` is DM-style (post-author + comment-author only).

Example: "public"

reaction_counts*object

Map of reaction type to count, denormalised on the comment row in lock-step with the comment-reaction writes.

Example: {"like":2}

pinned*boolean

True when the post author has pinned this top-level comment (task 012). Pinned comments lead the top-level listing.

Example: false

pinned_at*string · date-time

ISO timestamp the comment was pinned; null when not pinned.

Example: null

assets*array

Ordered image attachments (task 019). Ref-only; resolve renditions via GET /assets/:id.

created_at*string · date-time

ISO timestamp the row was inserted.

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

updated_at*string · date-time

ISO timestamp of the last update.

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

Example

Request

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

{
  "body": "string",
  "status": "published",
  "visibility": "public"
}

Response

{
  "id": "bbbbbbbb-0000-0000-0000-000000000001",
  "community_id": "cccccccc-cccc-cccc-cccc-cccccccccccc",
  "post_id": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
  "parent_id": null,
  "actor_id": "aaaaaaaa-0000-0000-0000-000000000001",
  "body": "Looks great, shipping today.",
  "depth": 0,
  "status": "published",
  "visibility": "public",
  "reaction_counts": {
    "like": 2
  },
  "pinned": false,
  "pinned_at": null,
  "assets": [
    {
      "asset_id": "eeeeeeee-0000-0000-0000-000000000001",
      "alt_text": "A golden retriever on a beach"
    }
  ],
  "created_at": "2026-05-01T12:00:00.000Z",
  "updated_at": "2026-05-01T12:00:00.000Z"
}