Beam Help
Get help now

How-to · Zoho DESK

How to list tasks by ticket in Zoho Desk

Retrieve all tasks associated with a specific ticket.

Listing tasks associated with a specific ticket in Zoho Desk is straightforward once you know the correct API endpoint and have the right OAuth scopes in place. This article walks you through the process step by step.


---


*Beam Help — independent expert support for Zoho. We are not official Zoho support.*


---


Why this matters


When managing support workflows, tasks are often attached directly to tickets to track follow-up actions, internal assignments, or escalation steps. Being able to programmatically retrieve all tasks for a given ticket lets you build dashboards, automate reminders, or audit workloads without manually clicking through the Zoho Desk UI. If you are integrating Zoho Desk into a broader toolchain, this is one of the most commonly needed read operations.


---


Step-by-step


Step 1. Confirm your OAuth token includes the correct Desk scopes before making any request. At minimum, your token must cover Desk.tasks.READ — though broader coverage such as Desk.tasks.ALL is also acceptable. You will also need Desk.tickets.READ to access the parent ticket context. [3]


Step 2. Identify the ticket_id for the ticket whose tasks you want to retrieve. This is the numeric identifier Zoho Desk assigns to each ticket record. You can find it in the ticket's URL inside the Desk agent portal, which follows the pattern https://desk.zoho.{dc}/agent/{portal}/tickets/details/{TicketId}. [4]


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


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

This operation is identified internally as listtasksbyticket. The endpoint accepts two parameters: ticketid (required, the ticket's unique identifier) and p (optional, a dictionary for pagination or additional query parameters). [2]


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


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

Pass the ticket ID as a string, and supply any pagination or filter options via the p dictionary. If you do not need extra parameters, passing None is fine. [2]


Step 5. Parse the response. The API will return a list of task objects associated with that ticket. Present the key fields — such as task subject, assignee, due date, and status — to whoever or whatever is consuming the data. [8]


---


Common pitfalls


  • Missing task scopes. If your OAuth token was generated without Desk.tasks.READ or Desk.tasks.ALL, the API will return an authorisation error. Double-check your registered scopes in the Zoho API Console and regenerate the token if needed. [3]

  • Wrong ticket ID format. The ticket_id parameter must be passed as a string, not an integer. Passing a raw integer may cause the request to fail or return unexpected results. [2]

  • Unresolved org or portal. The Desk API resolves requests against a specific organisation. If your connection has not yet discovered or stored a deskorgid, requests may fail silently or route to the wrong portal. Ensure your connection record has a valid deskorgid populated before calling ticket-related endpoints. [7]

  • Pagination not handled. If a ticket has many tasks, results may be paginated. Use the p parameter to pass page tokens or offset values so you retrieve the full set rather than just the first page. [2]

---


What to check


  • Scopes are present: Verify that Desk.tasks.READ (or Desk.tasks.ALL) and Desk.tickets.READ appear in your active OAuth token's scope list. [3]
  • Correct endpoint path: Confirm the request URL resolves to /api/v1/tickets/{ticket_id}/tasks with a real, numeric ticket ID substituted in. [2]
  • Response contains task records: The returned payload should include a list of task objects; an empty list may mean the ticket genuinely has no tasks, while an error response points to a scope or ID issue. [2]

Sources cited

  1. [1] server.py: build_zoho_links
  2. [2] GET /api/v1/tickets/{ticket_id}/tasks
  3. [3] config.py
  4. [4] server.py: chat_stream
  5. [5] run_llm_routing_suite.py
  6. [6] server.py: get_zoho_api
  7. [7] planner.py
List Tasks by Ticket | Beam Help