> ## Documentation Index
> Fetch the complete documentation index at: https://synthetiq.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# PRD comments

> Threaded review comments on an entity's PRD entries

PRD comment threads carry review feedback on an app's [PRD](/docs/platform-docs/app-framework/prd/overview). Each thread anchors to a PRD entry id and holds a conversation of replies. Threads persist across versions; `raisedOnVersion` records the version the feedback was raised against.

**Authentication (all endpoints):** entity access required — the entity's publisher or a user it is shared with. Read-only reviewers can comment; PRD comments are collaboration metadata, not entity mutations.

Unlike other Platform API resources, PRD comment responses use camelCase field names.

## Thread shape

```json theme={null}
{
  "id": "…",
  "entryId": "tasks.member-can-add",
  "raisedOnVersion": "2026.07.08-101502",
  "status": "open",
  "createdBy": { "id": "…", "name": "Ada", "email": "ada@acme.com", "avatarUrl": null },
  "resolvedBy": null,
  "resolvedAt": null,
  "createdAt": "2026-07-10T09:12:00Z",
  "updatedAt": "2026-07-10T09:12:00Z",
  "replies": [
    { "id": "…", "body": "Should say overdue, not late", "createdAt": "…", "updatedAt": "…", "author": { "id": "…", "name": "Ada", "email": "ada@acme.com", "avatarUrl": null } }
  ]
}
```

## List threads

```bash theme={null}
GET /api/entities/{entityId}/prd-comments
```

| Parameter | Type  | Required | Description                             |
| --------- | ----- | -------- | --------------------------------------- |
| `status`  | query | No       | `open` or `resolved`                    |
| `entryId` | query | No       | Only threads anchored to this PRD entry |

Returns `{ threads: [...] }`, oldest first, with replies nested.

## Create a thread

```bash theme={null}
POST /api/entities/{entityId}/prd-comments
```

| Parameter         | Type | Required | Description                             |
| ----------------- | ---- | -------- | --------------------------------------- |
| `entryId`         | body | Yes      | PRD entry the thread anchors to         |
| `body`            | body | Yes      | Text of the thread's first reply        |
| `raisedOnVersion` | body | No       | Version the feedback was raised against |

Returns `201` with `{ thread }`.

## Resolve or reopen a thread

```bash theme={null}
PATCH /api/entities/{entityId}/prd-comments/{threadId}
```

| Parameter | Type | Required | Description          |
| --------- | ---- | -------- | -------------------- |
| `status`  | body | Yes      | `open` or `resolved` |

Resolving stamps `resolvedBy` and `resolvedAt`; reopening clears them. Returns `{ thread }`.

## Delete a thread

```bash theme={null}
DELETE /api/entities/{entityId}/prd-comments/{threadId}
```

Only the thread's creator may delete it (`403` otherwise). Returns `{ success: true }`.

## Add a reply

```bash theme={null}
POST /api/entities/{entityId}/prd-comments/{threadId}/replies
```

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `body`    | body | Yes      | Reply text  |

Returns `201` with `{ reply }` and bumps the thread's `updatedAt`.

## Delete a reply

```bash theme={null}
DELETE /api/entities/{entityId}/prd-comments/{threadId}/replies/{replyId}
```

Only the reply's author may delete it (`403` otherwise). Deleting the last reply also deletes the thread. Returns `{ success: true, threadDeleted: boolean }`.
