Stats

Use this API to get statistics about the current queue, your account, your agents, or their activity.

The timeframe of the data returned by all endpoints is the current day, from midnight in your account's timezone to the moment you make the request.

For example, if your account is set to Pacific Time (GMT-7) and you make a request at 07:02 a.m. in that timezone, then the timeframe of the data is as follows:

from: Mon, 11 Jun 2018 00:00:00 PDT -07:00
to:   Mon, 11 Jun 2018 07:02:43 PDT -07:00

Current Queue Activity

Current queue activity statistics are represented by a JSON object with the following properties:

Name Type Comment
agents_online integer The current number of agents online
calls_waiting integer The current number of callers in the queue waiting for the next available support agent
callbacks_waiting integer The current number of callers in the callback queue waiting for the next available support agent
average_wait_time integer The average wait time for all callers who are waiting for an available agent (in seconds)
longest_wait_time integer The longest wait time for any caller in the queue (in seconds)
embeddable_callbacks_waiting integer The current number of callback requests from Web Widget in the queue waiting for the next available support agent
Example
{
  "agents_online":     1,
  "calls_waiting":     1,
  "callbacks_waiting": 3,
  "average_wait_time": 5,
  "longest_wait_time": 10,
  "embeddable_callbacks_waiting": 1
}
Show Current Queue Activity

GET /api/v2/channels/voice/stats/current_queue_activity.json

Optionally, you can filter the results by phone numbers.

Available parameters
Name Type Required Comments
phone_number_ids array no Ids of phone numbers to filter results with

Accepts a comma-separated list of up to 100 phone number ids.

Allowed For
  • Agents
Using curl
curl https://{subdomain}.zendesk.com/api/v2/channels/voice/stats/current_queue_activity.json \
  -v -u {email_address}:{password}
curl https://{subdomain}.zendesk.com/api/v2/channels/voice/stats/current_queue_activity.json?phone_number_ids=1,2,3 \
  -v -u {email_address}:{password}
Example Response
Status: 200 OK

{
  "current_queue_activity": {
    "agents_online":     2,
    "calls_waiting":     1,
    "callbacks_waiting": 1,
    "average_wait_time": 5,
    "longest_wait_time": 10,
    "embeddable_callbacks_waiting": 1
  }
}

Account Overview

For the Talk Team plan and higher, account overview statistics are represented by a JSON object with the following properties:

Name Type Comment
average_call_duration integer Average time of call across all calls
average_queue_wait_time integer Average time caller spent in queue waiting to be routed to an agent
average_wrap_up_time integer Average wrap-up time across all calls
max_calls_waiting integer Maximum number of calls waiting for an agent in the queue, including caller on the line and callback requests
max_queue_wait_time integer Maximum time caller spent in queue waiting to be routed to an agent
total_call_duration integer Total duration of all calls
total_calls integer Total number of inbound and outbound calls
total_voicemails integer Total number of calls that went to voicemail for any reason
total_wrap_up_time integer Total wrap-up time across all calls
Example
{
  "average_call_duration":   33,
  "average_queue_wait_time": 1,
  "average_wrap_up_time":    1,
  "max_calls_waiting":       1,
  "max_queue_wait_time":     10,
  "total_call_duration":     41,
  "total_calls":             39,
  "total_voicemails":        12,
  "total_wrap_up_time":      11
}

For the Talk Professional and Enterprise plans, the JSON object has the following additional properties:

Name Type Comment
average_callback_wait_time integer Average callback time a customer has been waiting for an agent in the queue. Excludes Available agents greeting
average_hold_time integer Average time caller spent on hold per call
average_time_to_answer integer Average time between system answering a call and customer being connected with an agent. Includes greetings and other recordings played
total_callback_calls integer Total number of callback requests (successful or not)
total_calls_abandoned_in_queue integer Total number of calls where customer hung up while waiting in the queue
total_calls_outside_business_hours integer Total number of calls received outside business hours
total_calls_with_exceeded_queue_wait_time integer Total number of calls sent to voicemail after exceeding the max wait time in the queue
total_calls_with_requested_voicemail integer Total number of calls where customer requested to be put through to voicemail by dialing 1
total_hold_time integer Total hold time across all calls
total_inbound_calls integer Total number of inbound calls
total_outbound_calls integer Total number of outbound calls
total_textback_requests integer Total number of textback messages sent from IVR
total_embeddable_callback_calls integer Total number of callback calls requested via Web Widget (successful or not)
Example
{
  "average_call_duration":                     33,
  "average_queue_wait_time":                   1,
  "average_wrap_up_time":                      1,
  "max_calls_waiting":                         1,
  "max_queue_wait_time":                       10,
  "total_call_duration":                       41,
  "total_calls":                               39,
  "total_voicemails":                          12,
  "total_wrap_up_time":                        11,
  "average_callback_wait_time":                0,
  "average_hold_time":                         0,
  "average_time_to_answer":                    2,
  "total_callback_calls":                      0,
  "total_calls_abandoned_in_queue":            2,
  "total_calls_outside_business_hours":        0,
  "total_calls_with_exceeded_queue_wait_time": 0,
  "total_calls_with_requested_voicemail":      0,
  "total_hold_time":                           0,
  "total_inbound_calls":                       34,
  "total_outbound_calls":                      5,
  "total_textback_requests":                   0,
  "total_embeddable_callback_calls":           1,
}
Show Account Overview

GET /api/v2/channels/voice/stats/account_overview.json

Optionally, you can filter the results by phone numbers.

Available parameters
Name Type Required Comments
phone_number_ids array no Ids of phone numbers to filter results with

Accepts a comma-separated list of up to 100 phone number ids.

Allowed For
  • Agents
Using curl
curl https://{subdomain}.zendesk.com/api/v2/channels/voice/stats/account_overview.json \
  -v -u {email_address}:{password}
curl https://{subdomain}.zendesk.com/api/v2/channels/voice/stats/account_overview.json?phone_number_ids=1,2,3 \
  -v -u {email_address}:{password}
Example Response
Status: 200 OK

{
  "average_call_duration":                     33,
  "average_queue_wait_time":                   1,
  "average_wrap_up_time":                      1,
  "max_calls_waiting":                         1,
  "max_queue_wait_time":                       10,
  "total_call_duration":                       41,
  "total_calls":                               39,
  "total_voicemails":                          12,
  "total_wrap_up_time":                        11,
  "average_callback_wait_time":                0,
  "average_hold_time":                         0,
  "average_time_to_answer":                    2,
  "total_callback_calls":                      0,
  "total_calls_abandoned_in_queue":            2,
  "total_calls_outside_business_hours":        0,
  "total_calls_with_exceeded_queue_wait_time": 0,
  "total_calls_with_requested_voicemail":      0,
  "total_hold_time":                           0,
  "total_inbound_calls":                       34,
  "total_outbound_calls":                      5,
  "total_textback_requests":                   0,
  "total_embeddable_callback_calls":           0,
}

Agents Overview

For the Talk Team plan and higher, agents overview statistics are represented by a JSON object with the following properties:

Name Type Comment
average_wrap_up_time integer Average wrap-up time across all calls
total_calls_accepted integer Total number of calls agents answered
total_calls_denied integer Total number of calls agents denied
total_calls_missed integer Total number of calls agents missed
total_talk_time integer Total talk time across all calls (excludes hold time and consultation)
total_wrap_up_time integer Total wrap-up time across all calls

Note: Metrics like total_calls_accepted, total_calls_denied, total_calls_missed, and total_calls_put_on_hold can be greater than total_inbound_calls. Example: One inbound call is missed by two agents or denied by two agents.

Example
{
  "average_wrap_up_time":  120,
  "total_calls_accepted":  41,
  "total_calls_denied":    39,
  "total_calls_missed":    12,
  "total_talk_time":       31,
  "total_wrap_up_time":    13
}

For the Talk Professional and Enterprise plans, the JSON object has the following additional properties:

Name Type Comment
average_available_time integer Average time an agent was available to answer calls and set to "online". Does not include time on calls or in wrap-up mode
average_online_time integer Average time agent's status was set to "online" or "away"
average_away_time integer Average time agent's status was set to "away"
average_calls_accepted integer Average number of calls agents answered
average_calls_denied integer Average number of calls agents denied
average_calls_missed integer Average number of calls agents missed
average_calls_put_on_hold integer Average number of calls an agent placed on hold
average_hold_time integer Average time caller spent on hold per call
average_talk_time integer Average agent talk time across all calls (excludes hold time and consultation)
average_accepted_transfers integer Average number of transfers agents accepted
average_started_transfers integer Average number of transfers agents started
total_accepted_transfers integer Total number of transfers agents started
total_started_transfers integer Total number of transfers agents started
total_calls_put_on_hold integer Total number of calls agents placed on hold
total_hold_time integer Total hold time across all calls
Example
{
  "average_wrap_up_time":       120,
  "total_calls_accepted":       41,
  "total_calls_denied":         39,
  "total_calls_missed":         12,
  "total_talk_time":            31,
  "total_wrap_up_time":         13,
  "average_available_time":     2100,
  "average_online_time":        3600,
  "average_calls_accepted":     14,
  "average_calls_denied":       4,
  "average_calls_missed":       3,
  "average_calls_put_on_hold":  14,
  "average_hold_time":          35,
  "average_talk_time":          67,
  "average_accepted_transfers": 8,
  "average_started_transfers":  12,
  "total_accepted_transfers":   12,
  "total_started_transfers":    17,
  "total_calls_put_on_hold":    5,
  "total_hold_time":            120
}
Show Agents Overview

GET /api/v2/channels/voice/stats/agents_overview.json

Allowed For
  • Agents
Using curl
curl https://{subdomain}.zendesk.com/api/v2/channels/voice/stats/agents_overview.json \
  -v -u {email_address}:{password}
Example Response
Status: 200 OK

{
  "average_wrap_up_time":       120,
  "total_calls_accepted":       41,
  "total_calls_denied":         39,
  "total_calls_missed":         12,
  "total_talk_time":            31,
  "total_wrap_up_time":         13,
  "average_available_time":     2100,
  "average_online_time":        3600,
  "average_away_time":          210,
  "average_calls_accepted":     14,
  "average_calls_denied":       4,
  "average_calls_missed":       3,
  "average_calls_put_on_hold":  14,
  "average_hold_time":          35,
  "average_talk_time":          67,
  "average_accepted_transfers": 8,
  "average_started_transfers":  12,
  "total_accepted_transfers":   12,
  "total_started_transfers":    17,
  "total_calls_put_on_hold":    5,
  "total_hold_time":            120
}

Agents Activity

For the Talk Team plan and higher, agents activity is represented by a JSON object with the following properties:

Name Type Comment
name string The agent's name
agent_id integer The agent's id
status* string The agent's status. An agent can be in one of four states: Unavailable, Available, On Call, Wrap up
status_code* string The agent's status code. An agent can be in one of four states: not_available, available, on_call, wrap_up
agent_state string The agent's state. An agent can be in one of three states: "online", "offline", "away"
call_status string The agent's call status. The call can be in one of three states: "on_call", "wrap_up", null
via string The channel (client/phone) the agent is registered on
avatar_url string The URL to agent's avatar
forwarding_number string The forwarding number set up by the agent, or null if the agent has no forwarding number
calls_accepted integer The total number of phone calls the agent has accepted
calls_denied integer The total number of times the agent has declined an incoming call
calls_missed integer The total number of times an agent has not answered their phone and the call was routed to the next available agent
online_time integer Total time agent's status was set to "online" or "away"
available_time integer Total time agent was available to answer calls and set to "online". Does not include time on calls or in wrap-up mode
away_time integer Total time agent's status was set to "away"
total_call_duration integer Total time the agent was on call across all calls
total_talk_time integer Total talk time (excludes hold time and consultation)
total_wrap_up_time integer Total time spent in wrap-up across all calls

*This property will be deprecated soon.

Example
{
  "name":                 "Johnny Agent",
  "agent_id":             1,
  "agent_state":          "online",
  "call_status":          null,
  "via":                  "phone",
  "avatar_url":           "https://path_to_avatar.png",
  "forwarding_number":    "+1234567890",
  "calls_accepted":       5,
  "calls_denied":         1,
  "calls_missed":         1,
  "online_time":          5600,
  "available_time":       3600,
  "away_time":            250,
  "total_call_duration":  121,
  "total_talk_time":      87,
  "total_wrap_up_time":   68
}

For the Talk Professional and Enterprise plans, the JSON object has the following additional properties:

Name Type Comment
average_wrap_up_time integer Average wrap-up time across all calls
accepted_transfers integer Total numbers of transfers the agent accepted
started_transfers integer Total numbers of transfers the agent started
calls_put_on_hold integer Total number of calls the agent placed on hold
average_hold_time integer Average time the agent spent on hold per call
total_hold_time integer Total time the agent was on hold across all calls
average_talk_time integer Average talk time across all calls (excludes hold time and consultation)
Example
{
  "name":                 "Johnny Agent",
  "agent_id":             1,
  "via":                  "phone",
  "avatar_url":           "https://path_to_avatar.png",
  "forwarding_number":    "+1234567890",
  "calls_accepted":       5,
  "calls_denied":         1,
  "calls_missed":         1,
  "online_time":          5600,
  "available_time":       3600,
  "total_call_duration":  121,
  "total_talk_time":      87,
  "total_wrap_up_time":   68,
  "average_wrap_up_time": 39,
  "accepted_transfers":   5,
  "started_transfers":    2,
  "calls_put_on_hold":    8,
  "average_hold_time":    10,
  "total_hold_time":      27,
  "average_talk_time":    25
}
List Agents Activity Statistics

GET /api/v2/channels/voice/stats/agents_activity.json

Optionally, you can filter the results by groups.

Available parameters
Name Type Required Comments
group_ids array no Ids of groups to filter results with

Accepts a comma-separated list of up to 100 group ids.

Allowed For
  • Agents
Using curl
curl https://{subdomain}.zendesk.com/api/v2/channels/voice/stats/agents_activity.json \
  -v -u {email_address}:{password}
curl https://{subdomain}.zendesk.com/api/v2/channels/voice/stats/agents_activity.json?group_ids=1,2,3 \
  -v -u {email_address}:{password}
Example Response
Status: 200 OK

{
  "agents_activity": [
    {
      "name":                "Johnny Agent",
      "agent_id":            1,
      "via":                 "phone",
      "avatar_url":          "https://path_to_avatar.png",
      "forwarding_number":   "+1234567890",
      "calls_accepted":      5,
      "calls_denied":        1,
      "calls_missed":        1,
      "online_time":         5600,
      "available_time":      3600,
      "total_call_duration": 121,
      "total_talk_time":     87,
      "total_wrap_up_time":  68
    },
    {
      "name":     "Agent Johnny",
      "agent_id": 2,
      "agent_state":   "offline",
      "call_status":   null
      ...
    }
  ]
}