---
title: "Get comments for a task"
method: GET
path: "/v1/tasks/{taskId}/comments"
tags: ["Task Comments"]
---

# Get comments for a task

`GET /v1/tasks/{taskId}/comments`

Retrieve all comments (including parent comments and replies) for a given task.

**Usage Notes:**
- Parent comments have `parentCommentId = null`.
- Replies have `parentCommentId` set to the ID of the parent comment.
- Clients can use this field to group replies under their parent comment for a threaded conversation view.
- The `sort` parameter controls the order of **parent comments** (replies should be grouped by client regardless of sort order).
- The `comment` field may contain HTML with `@mention` markup. Use `mentionedUserIds` to identify mentioned users.

## Path parameters

- `taskId` integer, required

## Query parameters

- `sort` string

## Headers

- `X-Org-Id` integer, required

## Response `200`

Comments fetched successfully

- ApiSuccessResponseListTaskCommentDto — Standard API success response structure
  - `success` boolean — Indicates if the operation was successful
  - `message` string — Message describing the result of the operation
  - `code` integer — HTTP status code of the response
  - `data` TaskCommentDto[] — Payload containing the response data
    - `tenantId` integer
    - `taskCommentId` integer
    - `comment` string
    - `content` EmailContent
      - `from` string
      - `to` string[]
      - `cc` string[]
      - `bcc` string[]
      - `receivedDate` string, date-time
      - `subject` string
      - `body` string
      - `fromName` string
    - `viaMail` boolean
    - `taskId` integer
    - `projectId` integer
    - `spaceId` integer
    - `parentCommentId` integer
    - `parentTaskId` integer
    - `createdBy` UserMinimalDto
      - `userId` integer
      - `firstName` string
      - `email` string
      - `profilePicURL` string
      - `profilePicColor` string
      - `provider` string
      - `role` OrgRoleDto
        - `orgRoleId` integer
        - `roleName` string
    - `mentionedUserIds` integer[]
    - `createdTime` string, date-time
    - `modifiedTime` string, date-time
    - `taskName` string
    - `projectName` string
    - `spaceName` string
  - `timestamp` string, date-time — Timestamp of the response

---

[API](https://skmtc.net/astravue/apis/astravue-api.md) · [All operations](https://skmtc.net/astravue/apis/astravue-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/astravue/astravue-api/versions/237f5bbd4029/schema)
