Beam Help
Get help now

How-to · Zoho DESK

How to list ticket comments in Zoho Desk

Retrieve all comments and notes added to a support ticket.

Listing ticket comments in Zoho Desk is straightforward via the REST API: send a GET request to the comments endpoint for a given ticket, and Zoho Desk returns all comments associated with that ticket ID. Here at Beam Help — independent expert support for Zoho, not official Zoho support — we walk you through exactly how to do it.


Why this matters


When building integrations, automations, or support dashboards, you often need to programmatically retrieve the full conversation thread on a ticket. The comments endpoint gives you structured access to every internal note and public reply on a ticket, making it essential for reporting, syncing data to external systems, or feeding context into AI-assisted workflows.


Step-by-step


Step 1. Ensure your OAuth token includes the correct Zoho Desk scopes before making any API call. At minimum you need Desk.tickets.READ in your scope list, though broader configurations also include Desk.tickets.ALL and Desk.tickets.WRITE for full ticket management.[3]


Step 2. Identify the ticket_id for the ticket whose comments you want to retrieve. This is the unique numeric identifier Zoho Desk assigns to each ticket — you can find it in the ticket URL within the Desk agent portal, which follows the pattern https://desk.zoho.com/agent/{portal}/tickets/details/{TicketId}.[7]


Step 3. Make a GET request to the following endpoint, substituting your actual ticket ID:


GET /api/v1/tickets/{ticket_id}/comments

This operation is identified internally as listticketcomments and accepts the ticket_id as a required path parameter. You may also pass optional query parameters via the p dictionary (for example, pagination or filtering options).[4]


Step 4. In Python, the call looks like this:


def list_ticket_comments(self, ticket_id: str, p: dict = None):
    """List ticket comments"""
    return self.c.request("GET", f"/api/v1/tickets/{ticket_id}/comments", p, None)

Pass your ticket ID as a string, and supply any query parameters as a dictionary in the p argument. If you have no extra parameters, pass None.[4]


Step 5. Parse the response body, which will contain the list of comments for that ticket. Each comment object will include the comment content, author details, and timestamps — use these fields to display or process the conversation thread as needed.[4]


Step 6. If you need to take action on a specific comment after listing — for example, editing its content — note that a separate PATCH endpoint exists at /api/v1/tickets/{ticketid}/comments/{commentid}, which accepts both the ticket ID and the comment ID as path parameters.[5] Similarly, adding a brand-new comment uses a POST to /api/v1/tickets/{ticket_id}/comments with a data payload.[2]


Common pitfalls


  • Missing or insufficient scopes. If your OAuth token was generated without Desk.tickets.READ (or Desk.tickets.ALL), the API will return an authorisation error. Double-check your scope configuration and regenerate the token if necessary.[3]

  • Wrong ticket ID format. The ticket_id must be passed as a string in the path. Passing an integer or a malformed value will cause the request to fail or return unexpected results.[4]

  • Confusing comments with replies. Zoho Desk distinguishes between public replies (visible to the customer) and internal comments (visible only to agents). The /comments endpoint targets the comments resource specifically — make sure this is the data you need rather than the replies endpoint.[2]

  • Pagination not handled. If a ticket has a large number of comments, the API may paginate results. Always check whether the response includes pagination metadata and use the p parameter to request subsequent pages.[4]

What to check


  • Scope verification: Confirm that Desk.tickets.READ or Desk.tickets.ALL is present in your active OAuth token's scope list before calling the endpoint.[3]
  • Correct endpoint and method: Verify you are issuing a GET to /api/v1/tickets/{ticket_id}/comments — not a POST (which adds a comment) or a PATCH (which updates one).[2][4][5]
  • Response completeness: After receiving the response, check whether all expected comments are present or whether pagination parameters need to be supplied to retrieve the full set.[4]

Sources cited

  1. [1] server.py: build_zoho_links
  2. [2] POST /api/v1/tickets/{ticket_id}/comments
  3. [3] config.py
  4. [4] GET /api/v1/tickets/{ticket_id}/comments
  5. [5] PATCH /api/v1/tickets/{ticket_id}/comments/{comment_id}
  6. [6] server.py: chat
  7. [7] server.py: chat_plan
List Ticket Comments | Beam Help — Beam Help