# Comments

The Comments system provides interactive discussion, user Q&A, and feedback threads across marketplace entities (such as listings Q&A, listing comments, and platform updates).

It supports hierarchical nested replies, user like/dislike reactions, moderation status filtering, and automated email notifications for seller/customer Q&A interactions.


**Sample Comment Object**

```json
{
  "id": 105,
  "tenant_id": "1791",
  "account_id": null,
  "user_id": "11474",
  "reference_id": 42,
  "reference_type": "listings_qa",
  "parent": 0,
  "message": "Is this product available for immediate shipping?",
  "active": true,
  "edited": false,
  "likes": 3,
  "unlikes": 0,
  "liked": false,
  "unliked": false,
  "created_at": "2026-08-08T12:00:00.000Z",
  "updated_at": "2026-08-08T12:00:00.000Z",
  "user": {
    "id": "11474",
    "first_name": "Thahaseen",
    "last_name": "Buyer",
    "profile_pic": "https://example.com/avatar.jpg"
  },
  "replies": [
    {
      "id": 108,
      "tenant_id": "1791",
      "account_id": 12,
      "user_id": "9023",
      "reference_id": 42,
      "reference_type": "listings_qa",
      "parent": 105,
      "message": "Yes, we ship within 24 business hours!",
      "active": true,
      "edited": false,
      "likes": 1,
      "unlikes": 0,
      "liked": false,
      "unliked": false,
      "created_at": "2026-08-08T12:15:00.000Z",
      "updated_at": "2026-08-08T12:15:00.000Z",
      "user": {
        "id": "9023",
        "first_name": "Tan",
        "last_name": "Shoppe",
        "profile_pic": "https://example.com/seller-avatar.jpg"
      }
    }
  ]
}
```

## Comment Object

| **attribute** | **type** | **description** |
| --- | --- | --- |
| `id` | `integer` | Unique ID of the comment. |
| `reference_id` | `integer` | ID of the target resource being commented on (e.g. `listing_id`). |
| `reference_type` | `string` | Custom string identifier of the entity scope (e.g. `listings_qa`, `listings_comments`, `updates`, etc.). |
| `parent` | `integer` | Parent comment ID for nested replies (`0` for top-level root comments). |
| `message` | `string` | Text content of the comment. |
| `user_id` | `string` | Unique identifier of the author user. |
| `account_id` | `integer` | Optional account ID if commented on behalf of a merchant account. |
| `active` | `boolean` | Indicates whether the comment is approved and publicly visible. |
| `edited` | `boolean` | Flag indicating if the comment content was modified after posting. |
| `likes` | `integer` | Total number of positive like reactions. |
| `unlikes` | `integer` | Total number of dislike reactions. |
| `liked` | `boolean` | Indicates whether the requesting user has liked this comment. |
| `unliked` | `boolean` | Indicates whether the requesting user has disliked this comment. |
| `user` | `CommentUser` | Author profile summary (`id`, `first_name`, `last_name`, `profile_pic`). |
| `replies` | `array<Comment>` | Nested array of child reply comments. |
| `created_at` | `string` | ISO 8601 timestamp string when the comment was posted. |
| `updated_at` | `string` | ISO 8601 timestamp string when the comment was last updated. |
