Time tracking data via the API | Community
Skip to main content

Time tracking data via the API

  • September 29, 2025
  • 2 replies
  • 0 views

Josh22

Does anyone know which endpoint(s) I need to use to access time tracking data?

 

We report on number of touches and time spent, and in Explore can access this data via the “Support: Updates history" report type and the "Update handling time” metric.

 

According to the example response on this page - https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_audits/ - this data looks like it should come out as “time_spent” when using the ticket_audits endpoint, but I can't find any more details about what this metric actually relates to, and it doesn't appear when I make calls to that endpoint in our account.

2 replies

Ruben14
  • October 6, 2025

You’re right to look at ticket audits, but “Update handling time” is an Explore-only metric derived from update events; it isn’t a first-class field in the Support API.

 

That’s why you don’t see a time_spent key in your audits response, it's only present if something writes it explicitly, not because Zendesk exposes that metric via the API.

 

If you’re using Zendesk’s Time Tracking app, it writes two custom ticket fields (“Time spent last update” and “Total time spent”). Those values are retrievable through the normal Tickets API as custom fields, or at scale via Incremental Exports, and will match what you build in Explore later (Setting up the Time Tracking app).

 

For large pulls or per-update reconstruction, use Incremental Ticket Events and compute durations on your side from the event timestamps and agent changes (Incremental Exports). If you specifically need Explore’s “Update handling time” as-is via API, that isn’t exposed today; replicating Explore’s logic is the path that works.


Josh22
  • Author
  • October 17, 2025

“For large pulls or per-update reconstruction, use Incremental Ticket Events and compute durations on your side from the event timestamps and agent changes (Incremental Exports). If you specifically need Explore’s “Update handling time” as-is via API, that isn’t exposed today; replicating Explore’s logic is the path that works.”

 

Could you elaborate on this, please? I can see “created_at” timestamps via the Incremental Ticket Events endpoint, but not a corresponding “started_at” or “finished_at” timestampt to use to calculate the duration of the update.

 

“replicating Explore’s logic is the path that works.”

 

Are there any details about Explore's logic documented anywhere?