Beam Help
Get help now

How-to · Zoho DESK

How to get task comment in Zoho Desk

Retrieve a specific comment from a task.

Retrieving a specific task comment in Zoho Desk requires two identifiers — the task ID and the comment ID — passed to a single GET endpoint that returns the comment's full details.


Why this matters


When building integrations or automations around Zoho Desk tasks, you often need to inspect a particular comment rather than pulling the entire comment thread. This is useful for audit trails, conditional logic based on comment content, or surfacing a single remark inside a third-party tool. Knowing both the list and single-fetch endpoints gives you flexibility depending on whether you already have the commentId in hand.


Step-by-step


Step 1. Confirm your OAuth token includes the correct Desk scope. Your connected app must be authorised with at least Desk.tasks.READ (or the broader Desk.tasks.ALL) before any task-comment endpoint will respond successfully. [8]


Step 2. If you do not yet know the commentId, call the list endpoint first. Issue a GET request to /api/v1/tasks/{taskId}/comments, substituting the real task identifier for {taskId}. The response returns all comments attached to that task, from which you can extract the commentId you need. [2]


# List all comments on a task
comments = client.list_task_comments(taskId="123456789")

Step 3. Once you have both identifiers, fetch the individual comment by sending a GET request to /api/v1/tasks/{taskId}/comments/{commentId}. Replace {taskId} and {commentId} with the real values. [1]


# Retrieve a single task comment
comment = client.get_task_comment(taskId="123456789", commentId="987654321")

The optional p parameter accepts a dictionary of additional query parameters if the endpoint supports pagination or filtering flags. [1]


Step 4. Parse the response object. The returned payload contains the comment's content, author details, timestamps, and any other metadata Zoho Desk associates with that record. Use this data in your downstream logic — for example, feeding it into a conditional workflow or storing it in an external system. [1]


Step 5. If you need to modify the comment after retrieving it, use the PATCH endpoint at /api/v1/tasks/{taskId}/comments/{commentId} with a data dictionary containing the fields to update. [4] To add a brand-new comment, switch to a POST against /api/v1/tasks/{taskId}/comments instead. [5]


Common pitfalls


  • Wrong scope — Using a token that only carries ticket-level scopes (Desk.tickets.READ) will not grant access to task comments. Ensure Desk.tasks.READ or Desk.tasks.ALL is explicitly included in your OAuth configuration. [8]
  • Reversed IDs — Swapping taskId and commentId in the URL path will produce a 404 or an unexpected result. Double-check the order: task ID comes first in the path, comment ID second. [1]
  • Missing commentId — If you skip Step 2 and call the single-fetch endpoint without a valid commentId, the request will fail. Always use the list endpoint to discover comment IDs when they are not already stored in your system. [2]

What to check


  • Verify that the OAuth token in use carries Desk.tasks.READ or Desk.tasks.ALL as a granted scope. [8]
  • Confirm the taskId is valid by checking it against an existing task in your Zoho Desk portal before appending the comment path. [1]
  • After a successful response, validate that the commentId in the returned payload matches the one you requested, ensuring you are acting on the correct record. [1]

---


*Beam Help is an independent expert support resource for Zoho products and is not official Zoho support.*

Sources cited

  1. [1] GET /api/v1/tasks/{taskId}/comments/{commentId}
  2. [2] GET /api/v1/tasks/{taskId}/comments
  3. [3] server.py: chat
  4. [4] PATCH /api/v1/tasks/{taskId}/comments/{commentId}
  5. [5] POST /api/v1/tasks/{taskId}/comments
  6. [6] server.py: chat_plan_stream
  7. [7] config.py
Get Task Comment | Beam Help — Beam Help