---
title: "Retrieves discussion/comment messages for a specific task, including replies, attachments, and system messages. Supports pagination via startItem."
method: GET
path: "/api/TaskDiscussion"
tags: ["TaskDiscussion"]
---

# Retrieves discussion/comment messages for a specific task, including replies, attachments, and system messages. Supports pagination via startItem.

`GET /api/TaskDiscussion`

## Query parameters

- `TaskID` integer, required
- `pageSize` integer
- `startItem` integer

## Response `200`

Returns discussion messages with replies and attachments for the task.

- TaskDiscussion — Discussion thread for a task, containing paginated comment/response messages.
  - `TaskID` integer — The task this discussion belongs to.
  - `ProjectIDFK` integer — The project containing this task.
  - `responses` TaskDiscussionResponse[] — List of discussion messages/comments.
    - `TaskResponseID` integer — Unique identifier for this discussion message.
    - `CreatedByName` string — Display name of the message author.
    - `isActive` boolean — Whether this message is active (not deleted).
    - `CreatedByUserIDFK` integer — User ID of the message author.
    - `ResponseBody` string — The message content (may contain HTML).
    - `DateCreatedString` string — Formatted creation date string.
    - `canDelete` boolean — Whether the current user can delete this message.
    - `canEdit` boolean — Whether the current user can edit this message (author + not system + active membership).
    - `attachments` TaskDiscussionResponseAttachment[] — List of file attachments on this message.
      - `FileAttachmentID` integer — Unique identifier for the file attachment.
      - `Filename` string — Storage filename of the attachment.
      - `DateCreatedString` string — Formatted creation date of the attachment.
      - `provider` string — Storage provider code for the attachment.
      - `FileExtension` string — File extension (e.g. '.pdf', '.png').
      - `PublicFileURL` string — Public URL to download the attachment.
      - `PreviewURL` string — URL for a preview/thumbnail of the attachment.
      - `CanPreview` boolean — Whether a preview is available for this attachment.
      - `Type` string — MIME type or category of the attachment.
      - `URL` string — Direct URL to the attachment.
      - `Preview` string — Preview image URL.
      - `Name` string — Attachment name.
      - `Size` string — File size in human-readable format.
    - `isInternalNote` boolean — Whether this is an internal note (not visible to external contacts).
    - `Unread` string — Whether this message is unread by the current user.
    - `isSystem` boolean — Whether this is a system-generated message (e.g. status change notification).
    - `isEdited` boolean — True if the author has edited this message after posting; drives the (edited) UI indicator.
    - `DateLastEditedUtc` string, date-time — Timestamp (UTC) of the most recent user edit. Null if never edited. Distinct from DateUpdated.
    - `ReplyToMessageID` integer — The message ID this is a reply to, if any.
    - `ReplyToDateCreated` string, date-time — Creation date of the message being replied to.
    - `ReplyToCreatedByUserIDFK` integer — User ID of the author of the message being replied to.
    - `ReplyToUserName` string — Author name of the message being replied to.
    - `ReplyToBody` string — Body of the message being replied to.
    - `ReplyToFileID1` integer
    - `ReplyToFilePreview1` string
    - `ReplyToFileProvider1` string
    - `ReplyToFileName1` string
    - `ReplyToFileType1` string
  - `pageSize` integer — Number of messages returned per page.
  - `startItem` integer — The starting response ID for pagination.

---

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