Retrieving the active timer for a Zoho Desk ticket is straightforward: send a single authenticated GET request to the activeTimer endpoint, passing the ticket's ID as a path parameter.
Why this matters
When agents log time against support tickets, you may need to programmatically check whether a timer is currently running — for example, to enforce billing rules, build dashboards, or trigger automations when time tracking is active. The dedicated activeTimer endpoint returns only the in-progress timer, keeping your integration logic clean and avoiding the need to filter a full timer list.
Step-by-step
Step 1. Ensure your OAuth token includes the correct Zoho Desk scopes. At minimum you need Desk.tickets.READ (and ideally Desk.tickets.ALL) authorised for your connected app. These scopes must be present when the token is generated or refreshed. [8]
Step 2. Obtain a valid access token for the target user. If the token has expired, your integration should call the token refresh flow using the stored refreshtoken, your clientid, and your clientsecret to receive a fresh accesstoken before proceeding. [6]
Step 3. Identify the ticketId for the ticket whose active timer you want to inspect. This is the unique numeric or alphanumeric identifier Zoho Desk assigns to each ticket record. [1]
Step 4. Make a GET request to the following endpoint, substituting the real ticket ID into the path:
GET /api/v1/tickets/{ticketId}/activeTimer
The request accepts an optional query-parameter dictionary (p) if you need to pass additional filters or pagination hints. [1]
Step 5. In Python, using the Zoho Desk API wrapper, the call looks like this:
# Assuming `api` is an initialised ZohoDeskApi instance
response = api.get_active_timer_for_a(ticketId="1234567890")
print(response)
Pass a p dict as the second argument if you need extra query parameters; otherwise it defaults to None. [1]
Step 6. Parse the response. A successful call returns the details of the currently running timer for that ticket. If no timer is active, the API will typically return an empty result or a relevant status indicator — handle both cases in your code. [1]
Step 7. If you also need the full timer record (not just the active one), use the companion endpoint instead:
GET /api/v1/tickets/{ticketId}/timer
This retrieves the general ticket timer data regardless of whether it is currently running. [3]
Step 8. To modify the timer after retrieving it, use the PATCH endpoint:
PATCH /api/v1/tickets/{ticketId}/timer
Pass your changes as a data dictionary in the request body. [2]
Step 9. If you need to start a new timer from scratch, use the dedicated start endpoint:
POST /api/v1/tickets/{ticketId}/timer/start
Supply any required fields in the data body parameter. [5]
Common pitfalls
- Missing or expired access token. If the
access_tokenis absent or stale, every API call will fail with an authentication error. Always verify the token is refreshed before making timer requests. [6] - Wrong or missing
orgid. Zoho Desk API calls require the organisation ID to be set on the client. Ifdeskorg_idis not stored, the client must auto-discover it by calling the organisations endpoint first; without it, requests may return permission or routing errors. [7] - Insufficient OAuth scopes. Timer endpoints fall under ticket permissions. If
Desk.tickets.READorDesk.tickets.ALLwas not included when the OAuth connection was authorised, the call will be rejected even with a valid token. [8] - No active timer exists. The
activeTimerendpoint is specific to in-progress timers. If no timer is currently running on the ticket, do not assume an error — check the response body before treating it as a failure. [1]
What to check
- Confirm your OAuth token carries at least
Desk.tickets.READscope and has not expired before making the request. [8] - Verify that the
ticketIdyou are passing is correct and belongs to the same Zoho Desk organisation your client is authenticated against. [^1, ^7] - If the response is empty, cross-check using
GET /api/v1/tickets/{ticketId}/timerto confirm whether any timer record exists at all for that ticket. [3]
---
*Beam Help is an independent expert support resource for Zoho products and is not official Zoho support.*