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

# Comments

> Complete field reference for the Comment resource in the Zenoo CLM API.

# Comments

Comments provide a threaded discussion system attached to cases, alerts, and checks. They support @mentions, emoji reactions, threading, and system-generated comments for audit compliance.

## Resource fields

| Field               | Type    | Description                                       |
| ------------------- | ------- | ------------------------------------------------- |
| `id`                | string  | Unique comment identifier                         |
| `body`              | string  | Comment text content                              |
| `type`              | string  | Comment type. See [comment types](#comment-types) |
| `author`            | object  | Comment author (see Author object below)          |
| `case_token`        | string  | Parent case token (if attached to a case)         |
| `alert_token`       | string  | Parent alert token (if attached to an alert)      |
| `check_token`       | string  | Parent check token (if attached to a check)       |
| `parent_comment_id` | string  | Parent comment ID for threaded replies            |
| `reply_count`       | number  | Number of direct replies to this comment          |
| `reactions`         | array   | Emoji reactions (see Reaction object below)       |
| `mentioned_users`   | array   | Users @mentioned in this comment                  |
| `is_system`         | boolean | Whether this is a system-generated comment        |
| `created_at`        | string  | ISO 8601 timestamp of creation                    |

## Nested objects

### Author object

| Field       | Type   | Description                |
| ----------- | ------ | -------------------------- |
| `id`        | string | User identifier            |
| `name`      | string | Display name               |
| `email`     | string | Email address              |
| `photo_url` | string | Profile photo URL          |
| `initials`  | string | Initials derived from name |

### Reaction object

| Field          | Type    | Description                                |
| -------------- | ------- | ------------------------------------------ |
| `emoji`        | string  | Emoji character                            |
| `count`        | number  | Total reactions with this emoji            |
| `user_reacted` | boolean | Whether the current user reacted with this |
| `user_names`   | array   | Names of users who reacted                 |

## Comment types

| Type       | Description                                           |
| ---------- | ----------------------------------------------------- |
| `Comment`  | Standard user comment                                 |
| `Decision` | Compliance decision recorded as a comment             |
| `Note`     | Internal note (not visible to external reviewers)     |
| `System`   | System-generated comment (status changes, automation) |

## Example

```json theme={null}
{
  "id": "cmt_001",
  "body": "Reviewed the PEP match. John Doe was a local councillor from 2010-2014. No current political exposure. @sarah.johnson can you confirm the SOW documentation?",
  "type": "Comment",
  "author": {
    "id": "user_analyst01",
    "name": "Alex Thompson",
    "email": "alex@example.com",
    "photo_url": "https://example.com/photos/alex.jpg",
    "initials": "AT"
  },
  "case_token": "cas_xyz789",
  "alert_token": "alt_001",
  "check_token": null,
  "parent_comment_id": null,
  "reply_count": 2,
  "reactions": [
    {
      "emoji": "👍",
      "count": 2,
      "user_reacted": false,
      "user_names": ["Sarah Johnson", "Mike Chen"]
    }
  ],
  "mentioned_users": [{ "id": "user_sarah01", "name": "Sarah Johnson" }],
  "is_system": false,
  "created_at": "2026-02-16T11:00:00Z"
}
```

## System comment example

```json theme={null}
{
  "id": "cmt_sys_001",
  "body": "Alert status changed from Open to Resolved. Action: Approve.",
  "type": "System",
  "author": {
    "id": "system",
    "name": "System",
    "initials": "SY"
  },
  "alert_token": "alt_001",
  "parent_comment_id": null,
  "reply_count": 0,
  "reactions": [],
  "is_system": true,
  "created_at": "2026-02-16T11:30:00Z"
}
```

## Threading

Comments support one level of nesting. Replies reference the parent comment via `parent_comment_id`. Retrieve replies for a comment:

```bash theme={null}
curl -X GET "https://api.zenoo.com/v1/comments/cmt_001/replies" \
  -H "Authorization: Bearer your-api-key"
```

## Notifications

The comment system sends notifications for:

| Event            | Notification type | Recipients                  |
| ---------------- | ----------------- | --------------------------- |
| @mention         | Push notification | Mentioned users             |
| Reply to comment | Push notification | Parent comment author       |
| Comment created  | Platform Event    | All subscribers (real-time) |

## Related endpoints

| Endpoint                             | Method | Description                      |
| ------------------------------------ | ------ | -------------------------------- |
| `GET /v1/cases/{token}/comments`     | GET    | List comments for a case         |
| `GET /v1/alerts/{token}/comments`    | GET    | List comments for an alert       |
| `POST /v1/cases/{token}/comments`    | POST   | Add a comment to a case          |
| `POST /v1/alerts/{token}/comments`   | POST   | Add a comment to an alert        |
| `GET /v1/comments/{id}/replies`      | GET    | Get replies for a comment        |
| `POST /v1/comments/{id}/reactions`   | POST   | Add a reaction to a comment      |
| `DELETE /v1/comments/{id}/reactions` | DELETE | Remove a reaction from a comment |

## See also

* [Case Lifecycle Guide](/guides/case-lifecycle)
* [Alert Management Guide](/guides/alert-management)
