---
title: "8x8 Contact Center Statistics Reporting API"
slug: "8x8-contact-center-statistics-reporting-api"
updated: 2026-05-11T09:16:27Z
published: 2026-05-21T21:25:23Z
canonical: "help.8x8.com/8x8-contact-center-statistics-reporting-api"
---
> ## Documentation Index
> Fetch the complete documentation index at: https://help.8x8.com/llms.txt
> Use this file to discover all available pages before exploring further.
# 8x8 Contact Center Statistics Reporting API
## Overview
> [!NOTE]
> Note:
>
> **All future API enhancements will be on the APIs listed in the** [**8x8 Developer site**](http://developer.8x8.com/) **and within Analytics for Contact Center**.
>
> Analytics for Contact Center offers a full suite of [Summary](https://developer.8x8.com/analytics/docs/cc-historical-analytics-summary-report), [Detailed](https://developer.8x8.com/analytics/docs/cc-historical-analytics-detailed-report) and [Realtime](https://developer.8x8.com/analytics/docs/cc-realtime-statistics) APIs. These newer APIs directly match the capabilities of Analytics for Contact Center and provide the same extensive range of metrics and dimensions. While there is no current end of service for the APIs below, it is strongly advised to leverage the Analytics for Contact Center APIs for any new projects and consider adopting them in existing projects.
The 8x8 Contact Center statistics reporting API is composed of a set of URIs that identify and request statistical data from the Historical Reporting database. This style of API makes it very easy to compose and send a query, which is always done using an HTTP GET request.
The Historical Reporting database contains data about agents and their interactions, statuses, status stats and outbound calls, and queues and their interactions.
The Historical Reporting database contains two types of data; event and aggregated. Some queries will return unique event records, but most will return data that has been aggregated into 30 minute periods.
> [!NOTE]
> Note:
>
> There would be instances where when querying the API data, 25 columns will not have values; destinationorignal, destinationtranslated, directiontransaction, interactiontype, agentid, agentname, accepttimestamp, processtime, postprocess, totaltime, recordingfilename, maxhold, holdcount, totalhold, leg1postdial, leg2postdial, leg1answertime, leg2answertime, leg1sipid, leg2sipid, campaignname, recordid, recordstatus, dispositioncode, agentaccepttime. This is due to the API query being run less than one hour before the calls were accepted by agents.
All API requests are authenticated using a token that is issued to a valid Virtual Contact Center tenant. Responses are sent in either XML,CSV or JSON format. A sample Java program is available, which demonstrates how to issue a request and work with the response.
For security reasons, the Statistics API only accepts request using HTTPS, so that request headers and response data are encrypted.
The API allows you to fetch data on agents' skills. You can pass an API request to fetch:
- Skill levels of an agent for all the queues he is a member of
- Skill levels of all agents for a given queue
The response to the request will display agents' skill levels with the status. [Click here for sample requests](/support/docs/8x8-contact-center-statistics-reporting-api#click-here-for-sample-requests).
The NA/EU server numbers used in the URLs in this document are only an example. If copying and pasting the code, edit the code to the appropriate server number, this can be seen in the URL when logging in to 8x8 Contact Center. For an example, if on na2, the code should read,
```plaintext
http://vcc-na2.8x8.com/api/stats/agents/fred.xm
```
Revise your query URL to include the login URL of your tenant. Refer to the Platform URL Guide to retrieve your login URL.
## Testing Using A Browser
The Statistics API makes it easy to submit a query, for experimentation, testing or debugging purposes. From a web browser, simply enter the URL. You will be prompted to enter a username and password. Enter your tenant name as the username, and your [authentication token](/support/docs/8x8-contact-center-statistics-reporting-api#authentication-token) as the password. Then, the query result will be displayed in your browser.
**For example:**
```plaintext
http://vcc-na4.8x8.com/api/stats/agents/fred.xml
```
will return information about fred, in XML format.
The NA server numbers above are only an example. If copying and pasting the code, edit the code to the appropriate NA server number. For an example, if on na2, the code should read:
```plaintext
http://vcc-na2.8x8.com/api/stats/agents/fred.xml
```
Revise your query URL to include the login URL of your tenant. Refer to the Platform URL Guide to retrieve your login URL.
## Testing Using Curl
In a Linux environment, the curl utility will submit an HTTP request, and allow you to view the result.
```plaintext
curl -u acme:ac12343934687a839cf http://vcc-na4.8x8.com/api/stats/groups.csv
```
will return a list of groups, in CSV format. The -u argument identifies the username and password; use your tenant name as the username, and your [authentication token](/support/docs/8x8-contact-center-statistics-reporting-api#authentication-token) as the password.
## Groups
### List groups
```plaintext
/groups
```
Returns a list of all groups.
```plaintext
122
Support
No
123
East Coast Sales
Yes
...
```
## Agents
### List all agents
```plaintext
/agents?n={offset}
```
Returns a list of details for all agents.
### List agents in a group
```plaintext
/groups/{group-id}/agents?n={offset}
```
Returns a list of details for all agents for a named group.
### Show a named agent
```plaintext
/agents/{agent-id}
```
Shows details of a single agent.
```plaintext
fred
148
2008-03-23
no
fred@acme.com
Y
Fred
Fred Bloggs
Bloggs
PSTN
007
agent
no
...
```
## Activities
### List activities for a named agent
```plaintext
/agents/{agent-id}/activities?d={date range}&n={offset}
```
Returns a list of activities for a named agent.
### List activities for all agents in a group
```plaintext
/groups/{group-id}/activities?d={date range}&n={offset}
```
Returns a list of activities for all agents in a named group.
```plaintext
fred
Fred Bloggs
122
Sales
Phone
62
5030001
tenantp1~~queue~~phone~~102
phoneq1
133
4245567232
N/A
2009-06-03T23:09:04-07:00
8
7
15
1
1
c1
transcode1
S20090604/R200906040609030100.wav
```
## Agent Interactions
Interaction reports only include Queued interactions.
### List interactions for a named agent
```plaintext
/agents/{agent-id}/interactions?d={date range}&n={offset}&{query vars}
```
Returns a list of interactions for a named agent.
### List interactions for all agents in a group
```plaintext
/groups/{group-id}/interactions?d={date range}&n={offset}&{query vars}
```
Returns a list of interactions for all agents in a named group.
```plaintext
1428
fred
Fred Bloggs
132
Support
2008-03-09T09:13:02-07:00
104
70
2008-03-09T09:23:09-07:00
...
```
## Queue Interactions
### List interactions
```plaintext
/interactions/?d={date range}&n={offset}&{query vars}
```
Returns a list of interactions.
### List interactions for a queue
```plaintext
/queues/{queue-id}/interactions?d={date range}&n={offset}&{query vars}
```
Returns a list of interactions for a queue.
### List interactions for a channel
```plaintext
/channels/{channel-id}/interactions?d={date range}&n={offset}&{query vars}
```
Returns a list of interactions for a channel.
**There are several supported media types:**
- **T** = Telephone
- **V** = Voice Mail
- **C** = Chat
- **Z** = Email
```plaintext
463
Support
12
T
2008-02-09T14:13:32-07:00
0
0
Y
Y
Y
10
0
0
0
2
2
0
0
088e926d2f05a78e23f568557699891d
1b82fe39718634c548d04cfd373c5a8c
6a4e7e2-1f1bee-4b433660@192
```
## Campaign Interactions
### List interactions for a campaign
```plaintext
/campaigns/{campaign-id}/interactions?d={date range}&n={offset}&{query vars}
```
Returns a list of interactions for a campaign.
**There are several predefined record status:**
- **0** = New
- **1** = Queued
- **2** = Accepted
- **3** = Completed
- **4** = Scheduled
- **5** = API Scheduled - scheduled via API
- **6** = Deleted
- **7** = Sent to Interaction Router (cached to dial)
**and server predefined disposition code:**
- **1000** = None
- **1001** = Try Again
- **1002** = Scheduled Call Back
process-time and post-process-time are in seconds.
total-process-time = process-time + post-process-time.
> [!NOTE]
> Note:
>
> We can only delete records from campaigns in VCC when their status is **0**, **4** or **5**. In VCC *v9.10.6.1* onwards, there was an improvement to enable record deletion in the following statuses: **0**, **1**, **4** and **5**.
```plaintext
Sales Campaign
555
Fred Bloggs
Sales Queue
2011-02-28T18:52:55-08:00
1
0015000000WIBJrAAP
188
retry
Try Again Later
1001
5551234
[AccountName|John Smith]
125
60
185
S20110228/R20110228175312223.wav
...
```
## All Interactions
This also includes non queued interactions such as agent to agent or direct to agent calls.
### List all interactions
```plaintext
/allinteractions/?d={date range}&n={offset}&{query vars}
```
Returns a list of all interactions. Those include agent/queue/campaign interactions, but also abandoned/direct agent access/Forward to external number transactions.
media-type can be either Phone, Chat, Email or Voice Mail.
interaction-direction can be empty, or set to either inbound or outbound.
**interaction-type can be empty, or set to one of the following values:**
- Web Callback
- DAA
- Fwd to Ext. Number
- Campaign
- Consult
For possible values for record-status and disposition-code, see the previous paragraph (Campaign Interactions).
```plaintext
Phone
9691000
Engineering Phone Queue
7
pma
N/A, N/A
2011-09-22T18:35:10-07:00
2011-09-22T18:35:30-07:00
2
0
0
0
0
0
0
0
MTM2MjZkNDdiMzU3ZmQ3OTQ1OWM3MmI0M2E4ZGI
N/A
N/A
```
## Interaction Statistics
### List statistics for an agent
```plaintext
/agents/{agent-id}/statistics?d={date range}&n={offset}&{query vars}
```
Returns a list of interaction statistics for an agent, reported in 30 minute periods.
### List statistics for a queue
```plaintext
/queues/{queue-id}/statistics?d={date range}&n={offset}&{query vars}
```
Returns a list of interaction statistics for a queue, reported in 30 minute periods.
### List statistics for a channel
```plaintext
/channels/{channel-id}/statistics?d={date range}&n={offset}&{query vars}
```
Returns a list of interaction statistics for a channel, reported in 30 minute periods.
```plaintext
Support
23
2008-02-22T13:30:00-07:00
T
24
21
18
1
2
2
0
845
512
142
56
110
56
```
## SLAs
SLAs are data about the number of interactions accepted or abandoned, split by time period. The SLA response differs, depending on whether the queue being queried is an "on line" (telephony, chat), or an "off line" (emails, voice mails) queue.
### List on-line SLAs for a queue
```plaintext
/queues/{queue-id}/online_slas?d={date range}&n={offset}&{query vars}
```
Returns a list of SLA stats for an online (telephony, chat) queue, reported in 30 minute periods.
### List online SLAs for a channel
```plaintext
/channels/{channel-id}/online_slas?d={date range}&n={offset}&{query vars}
```
Returns a list of SLA stats for an online (telephony, chat) channel, reported in 30 minute periods.
```plaintext
Support
23
2008-02-22T13:30:00-07:00
T
24
21
18
8
5
2
3
2
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
```
### List off-line SLAs for a queue
```plaintext
/queues/{queue-id}/offline_slas?d={date range}&n={offset}&{query vars}
```
Returns a list of SLA stats for an offline (email, voicemail) queue, reported in 30 minute periods.
```plaintext
/channels/{channel-id}/offline_slas?d={date range}&n={offset}&{query vars}
```
Returns a list of SLA stats for an offline (email, voicemail) channel, reported in 30 minute periods.
```plaintext
32
Support
18
2008-02-22T13:30:00-07:00
E
12
8
8
4
4
2
1
0
1
```
## Agent Statuses
### List statuses for a named agent
```plaintext
/agents/{agent-id}/statuses?d={date range}&n={offset}
```
Returns a list of statues for a named agent.
### List statuses for all agents in a group
```plaintext
/groups/{group-id}/statuses?d={date range}&n={offset}
```
Returns a list of statuses for all agents in a named group.
```plaintext
fred
Fred Bloggs
12
grp2
On Break
2009-05-21T14:23:05-07:00
Scheduled break
Scheduled break
1000
```
## Agent Statuses Statistics
### List statuses statistics for a named agent
```plaintext
/agents/{agent-id}/statuses/statistics?d={date range}&n={offset}
```
Returns a named agent’s aggregated data about her statuses.
```plaintext
2015-07-08T14:30:00-07:00
2015-07-08T15:00:00-07:00
pma
Agent Smith
101
DEV
0
0
0
0
0
1696
1696
```
## Agent / Queue Skills
### List skills by agent id
```plaintext
/agents/{agent-id}/skills
```
Returns a list of skills for a named agent. This API does not support any query parameters.
```plaintext
Y
102
kol
high
N
103
kol
medium
```
### List skills by queue id
```plaintext
/queues/{queue-id}/skills
```
Returns a list of agent skills for a given queue. This API does not support any query parameters.
```plaintext
Y
phegde
102
high
N
kol
102
medium
```
## Outbound Calls
### List outbound calls for a named agent
```plaintext
/agents/{agent-id}/outboundcalls?d={date range}&n={offset}
```
Returns a list of outbound calls for a named agent.
### List outbound calls for all agents in a group
```plaintext
/groups/{group-id}/outboundcalls?d={date range}&n={offset}
```
Returns a list of outbound calls for all agents in a named group.
```plaintext
fred
Fred Bloggs
12
123
14155524562
2009-05-26T17:53:55-07:00
14
1
1
c1
report text 1
2
3
ttt
ttt
S20090526/R20090526175312223.wav
0
0
0
2
2
0
0
088e926d2f05a78e23f568557699891d
1b82fe39718634c548d04cfd373c5a8c
```
## Queues
### List all queues
```plaintext
/queues?n={offset}
```
Returns a list of details for all queues
### List a single queue
```plaintext
/queues/{queue-id}
```
Show details for a single queue.
**There are several supported media types:**
- **T** = Telephone
- **V** = Voice Mail
- **C** = Chat
- **Z** = Email
```plaintext
121
Support
First tier support
T
Y
N
0
```
## Channels
### List all channels
```plaintext
/channels?n={offset}
```
Returns a list of details for all channels
```plaintext
52
sales@acme.com
Sales Email
```
## Campaigns
### List all campaigns
```plaintext
/campaigns?n={offset}
```
Returns a list of details for all campaigns
### List a single campaign
```plaintext
/campaigns/{campaign-id}
```
Show details for a single campaign.
**There are several predefined campaign status:**
- **0** = New
- **1** = Manual Started
- **2** = Schedule Started
- **3** = Manual Running
- **4** = Schedule Running
- **5** = Manual Stopped
- **6** = Completed
- **7** = Scheduled Stopped
- 8 = Manual Paused
- 9 = Schedule Paused
- 10 = Manual Purged
- 11 = Schedule Purged
retry-interval is in minutes.
daily-start-time and daily-end-time are integer values of minutes from beginning of the day.
```plaintext
Sales Campaign
123
Y
6
100
5551234
2011-02-01T10:00:00-08:00
2011-02-28T17:30:00-08:00
2011-02-01T10:00:30-08:00
2011-02-23T12:09:36-08:00
600
1110
90
3
```
## Campaign Records
### List all records of a single campaign
```plaintext
/campaigns/{campaign-id}/records?n={offset}
```
Show details for all records of s campaign.
**There are several predefined record status:**
- **0** = New
- **1** = Queued
- **2** = Accepted
- **3** = Completed
- **4** = Scheduled
**, status code:**
- **0** = Default
- **1** = Max Attempt Reached
- **2** = Skipped
- **3** = No Phone Number
- **4** = Invalid Phone Number
**and disposition code:**
- **1000** = None
- **1001** = Try Again
- **1002** = Scheduled Call Back
```plaintext
Sales Campaign
123
0015000000WIBJrAAP
Phone|(650)555-1234
3
0
[AccountName|John Smith]
1000
...
```
## Transaction Code List
### List all transaction codes
```plaintext
/tcls?n={offset}
```
Returns a list of details for all transaction codes
```plaintext
1
ag-trans-code
agent transaction code
Y
N
Y
groups
Y
Y
Y
1
0
Y
Y
140823322222
en_US
code 1
code 1
c1
```
## Status Code List
### List all status codes
```plaintext
/scls?n={offset}
```
Returns a list of details for all status codes
```plaintext
1
ag-status-code
agent status code
Y
N
Y
1
0
Y
Y
en_US
code 1
code 1
c1
```
## Authentication
In order to make an API request, you must first obtain an authentication token that has been issued for your tenant. This token combines username and password into a single long string.
**To get your authentication token:**
1. Log in to Configuration Manager.
2. Select Integration.
3. Select the API Token tab.
4. Next to Data Request Token, select New Token.
This generates a new private token for your tenant. You will use this token in all requests to the Statistics API. You may generate a new token at any time.
## Dates
Date formats in queries adhere to the ISO 8601 standard. The {date range} argument can take one of two forms. To specify records from a given day, specify the date, with an optional time zone parameter:
```plaintext
http://vcc-na4.8x8.com/api/stats/agents/{agentId}/interactions?d=2007-08-05&tz=America/New_York
```
Note that if no time is given, a day begins at midnight (00:00:00), and if no time zone is specified, the time defaults to the tenant time zone. A list of valid time zones can be found here (TZ column): [List of valid time zones](http://en.wikipedia.org/wiki/List_of_zoneinfo_time_zones). To specify a date range, separate the dates with a comma (",")
```plaintext
http://vcc-na4.8x8.com/api/stats/agents/fred/interactions?d=2007-08-05,2007-08-07
```
You can include times in date ranges as well, separated with a space ("%20″ in the URI):
```plaintext
http://vcc-na4.8x8.com/api/stats/queues/Sales/interactions?d=2007-08-05 13:15Z,2007-08-07 14:30Z
```
"Z" is the time zone designator, signifying that the time is in UTC (Coordinated Universal Time). Dates may also be formatted as a single string, with no separators, and a capital "T" separating date and time:
```plaintext
http://vcc-na4.8x8.com/api/stats/queues/Sales/interactions?d=20070805T1315Z,20070807T1430Z
```
**There are several date constants available to represent relative dates:**
### today
- the current date, at the start of the day (midnight)
### today-1d
- yesterday, at the start of the day (midnight)
### today-7d
- seven days ago, at the start of the day (midnight)
**To see yesterday's status changes for Sally:**
```plaintext
http://vcc-na4.8x8.com/api/stats/agents/sally/statuses?d=today-1d,today&tz=America/Denver
```
Dates in responses also adhere to the ISO 8601 standard.
**They take the form:**
```plaintext
2008-02-14T10:12:13-08:00
```
where "-08:00″ represents the offset with the UTC timezone (Coordinated Universal Time). A negative offset typically represents timezones west UTC.
## Pagination
Requests that would return a large number of records will respond with 50 records per request. You can iterate through these response sets by setting the {offset} argument. In this example, we are asking for agent interactions, starting with the 101st record.
```plaintext
http://vcc-na4.8x8.com/api/stats/agents/{agentId}/interactions?n=101
```
> [!NOTE]
> Note:
>
> VCC APIs have a max return of 50 entries. To get the next 50 entries, the API request will have to be modified to return rows starting at 51.
For example: **https://vcc-eu2.8x8.com/api/stats/queues?n=51**
## Query Variables
Queries that return interaction data may be further constrained by supplying query variables. These take the form of field=value where field is any field normally returned by the query.
**For example, to return only the set of telephone interactions (as opposed to chat or email, say):**
```plaintext
http://vcc-na4.8x8.com/api/stats/agents/{agentId}/interactions?media-type=T
```
**For telephone interactions for a single queue:**
```plaintext
http://vcc-na4.8x8.com/api/stats/agents/{agentId}/interactions?media-type=T&queue-id=102
```
## Responses
Each resource may be returned in either XML, CSV, or JSON format.
**To specify, add ".xml", ".csv" or ".json" to the URL:**
```plaintext
http://vcc-na4.8x8.com/api/stats/agents/{agentId}.csv
```
The default is XML.
## Response Codes
| Code | Error | Description |
| --- | --- | --- |
| 200 | OK | Request was successful |
| 400 | Bad request | The syntax of the request was wrong |
| 403 | Forbidden | The request was not allowed, usually due to incorrect authentication |
| 404 | Not found | The requested resource was not found |
| 500 | Internal error | The server encountered an unexpected condition which prevented it from fulfilling the request |
| 503 | Server busy | The server is currently unable to handle the request due to temporary overloading |
## Examples
These examples are to be used as a guide only. For testing the API, use either a Browser, cURL or Postman.
### List interactions using the Python Requests Module
> [!NOTE]
> Note:
>
> This will return the first page of 50 results only.
| `01` | `import` `requests` |
| --- | --- |
| `02` | |
| --- | --- |
| `03` | `url =` `f"https://vcc-na4.8x8.com/api/stats/interactions.json"` |
| --- | --- |
| `04` | |
| --- | --- |
| `05` | `headers =` `{` |
| --- | --- |
| `06` | ` 'Authorization': "Basic {yourCredentials}"` |
| --- | --- |
| `07` | `}` |
| --- | --- |
| `08` | |
| --- | --- |
| `09` | `response =` `requests.request("GET", url, headers=headers)` |
| --- | --- |
| `10` | |
| --- | --- |
| `11` | `print(response.text)` |
| --- | --- |