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:00to:   Mon, 11 Jun 2018 07:02:43 PDT -07:00

Show Account Overview

  • GET /api/v2/channels/voice/stats/account_overview

Optionally, you can filter the results by phone numbers.

Allowed For

  • Agents

JSON Format

Account overview statistics are represented by a JSON object with the following properties:

Name Type Description
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}

JSON Format (Professional plan and above)

On the Professional plan and above, the JSON object has the following additional properties:

Name Type Description
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,}

Parameters

Name Type In Required Description
phone_number_ids array Query false Ids of phone numbers to filter results with. Accepts a comma-separated list of up to 100 phone number ids.

Using curl

curl https://{subdomain}.zendesk.com/api/v2/channels/voice/stats/account_overview.json \  -v -u {email_address}:{password}

Using curl

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
{  "account_overview": {    "average_call_duration": 33,    "average_callback_wait_time": 0,    "average_hold_time": 0,    "average_queue_wait_time": 1,    "average_time_to_answer": 2,    "average_wrap_up_time": 1,    "max_calls_waiting": 1,    "max_queue_wait_time": 10,    "total_call_duration": 41,    "total_callback_calls": 0,    "total_calls": 39,    "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_embeddable_callback_calls": 0,    "total_hold_time": 0,    "total_inbound_calls": 34,    "total_outbound_calls": 5,    "total_textback_requests": 0,    "total_voicemails": 12,    "total_wrap_up_time": 11  }}

List Agents Activity

  • GET /api/v2/channels/voice/stats/agents_activity

Allowed For:

  • Agents

Agents activity is represented by a JSON object with the following properties:

Name Type Description
agent_id string The agent's id
agent_state string The agent's state. Allowed values are "online", "offline", "away", or "transfers_only"
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
avatar_url string The URL to agent's avatar
away_time integer Total time agent's status was set to "away"
call_status string The agent's call status. Allowed values are "on_call", "wrap_up", or "null"
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
forwarding_number string The forwarding number set up by the agent, or null if the agent has no forwarding number
name string The agent's name
online_time integer Total time agent's status was set to "online", "away", or "transfers_only"
transfers_only_time integer Total time agent's status was set to "transfers_only"
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
via string The channel (client/phone) the agent is registered on

Example

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

On the Professional plan and above, the JSON object has the following additional properties:

Name Type Description
accepted_third_party_conferences integer The average number of conference calls accepted, the number accepted by the selected agent, and the percentage difference between the two
accepted_transfers integer Total numbers of transfers the agent accepted
average_hold_time integer Average time the agent spent on hold per call
average_talk_time integer Average talk time across all calls (excludes hold time and consultation)
average_wrap_up_time integer Average wrap-up time across all calls
calls_put_on_hold integer Total number of calls the agent placed on hold
started_third_party_conferences integer The average number of conference calls initiated, the number initiated by the selected agent, and the percentage difference between the two
started_transfers integer Total numbers of transfers the agent started
total_hold_time integer Total time the agent was on hold across all calls

Example

{  "accepted_third_party_conferences":  0,  "accepted_transfers":                5,  "agent_id":                          1,  "available_time":                    3600,  "avatar_url":                        "https://path_to_avatar.png",  "average_hold_time":                 10,  "average_talk_time":                 25,  "average_wrap_up_time":              39,  "calls_accepted":                    5,  "calls_denied":                      1,  "calls_missed":                      1,  "calls_put_on_hold":                 8,  "forwarding_number":                 "+1234567890",  "name":                              "Johnny Agent",  "online_time":                       5600,  "transfers_only_time":               123,  "started_third_party_conferences":   0,  "started_transfers":                 2,  "total_call_duration":               121,  "total_hold_time":                   27,  "total_talk_time":                   87,  "total_wrap_up_time":                68,  "via":                              "phone"}

Parameters

Name Type In Required Description
group_ids array Query false The ids of groups to filter results with. Accepts a comma-separated list of up to 100 group ids.

Using curl

curl https://{subdomain}.zendesk.com/api/v2/channels/voice/stats/agents_activity.json \  -v -u {email_address}:{password}

Using curl

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": [    {      "agent_id": 1,      "available_time": 3600,      "avatar_url": "https://path_to_avatar.png",      "calls_accepted": 5,      "calls_denied": 1,      "calls_missed": 1,      "forwarding_number": "+1234567890",      "name": "Johnny Agent",      "online_time": 5600,      "total_call_duration": 121,      "total_talk_time": 87,      "total_wrap_up_time": 68,      "transfers_only_time": 123,      "via": "phone"    }  ],  "count": 1,  "next_page": null,  "previous_page": null}

Show Agents Overview

  • GET /api/v2/channels/voice/stats/agents_overview

Allowed For:

  • Agents

Agents overview statistics are represented by a JSON object with the following properties:

Name Type Description
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}

On the Professional plan and above, the JSON object has the following additional properties:

Name Type Description
average_accepted_transfers integer Average number of transfers agents accepted
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_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_online_time integer Average time agent's status was set to "online", "away", or "transfers_only"
average_transfers_only_time integer Average time agent's status was set to "transfers only"
average_started_transfers integer Average number of transfers agents started
average_talk_time integer Average agent talk time across all calls (excludes hold time and consultation)
total_accepted_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
total_started_transfers integer Total number of transfers agents started

Example

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

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
{  "agents_overview": {    "average_accepted_transfers": 8,    "average_available_time": 2100,    "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_online_time": 3600,    "average_started_transfers": 12,    "average_talk_time": 67,    "average_transfers_only_time": 123,    "average_wrap_up_time": 120,    "total_accepted_transfers": 12,    "total_calls_accepted": 41,    "total_calls_denied": 39,    "total_calls_missed": 12,    "total_calls_put_on_hold": 5,    "total_hold_time": 120,    "total_started_transfers": 17,    "total_talk_time": 31,    "total_wrap_up_time": 13  }}

Show Current Queue Activity

  • GET /api/v2/channels/voice/stats/current_queue_activity

Optionally or if you notice inconsistencies with the returned values, you can filter the results by phone numbers.

Allowed For

  • Agents

Rate Limit

You can make up to 2,500 requests every 5 minutes to this endpoint.

Name Type Description
agents_online integer The current number of agents online or away, including those on call and on wrap up
average_wait_time integer The average wait time for all callers who are waiting for an available agent (in seconds)
callbacks_waiting integer The current number of callers in the callback queue waiting for the next available support agent
calls_waiting integer The current number of callers in the queue waiting for the next available support agent
embeddable_callbacks_waiting integer The current number of callback requests from Web Widget in the queue waiting for the next available support agent
longest_wait_time integer The longest wait time for any caller in the queue (in seconds)

Example

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

Parameters

Name Type In Required Description
phone_number_ids array Query false Ids of phone numbers to filter results with. Accepts a comma-separated list of up to 100 phone number ids.

Using curl

curl https://{subdomain}.zendesk.com/api/v2/channels/voice/stats/current_queue_activity.json \  -v -u {email_address}:{password}

Using curl

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,    "average_wait_time": 5,    "callbacks_waiting": 1,    "calls_waiting": 1,    "embeddable_callbacks_waiting": 1,    "longest_wait_time": 10  }}