ZohoVoice REST API
Authorization
HeaderKey | Description |
Authorization * | Zoho-oauthtoken<space><ACCESS_TOKEN> |
Accept * | Set to application/json. |
OAuth Doc
GET AGENT'S ONLINE STATUS AUDIT
This API fetches the status details of an agent during a given time period.
Scope : ZohoVoice.agents.READ
Method : GET
URL : https://voice.zoho.com/rest/json/zv/metrics/statusaudit/list
Params:
Key | Type | Description |
from | number | from size |
size | number | number of logs |
fromEpoch* | long | timestamp in epoch millis |
toEpoch* | long | timestamp in epoch millis |
agentIds* | String | agent ID |
sortField | String | status by which to sort - either On Call, Offline, On Break, Available, Busy or Working Time |
sortMetric | String | metric by which to sort - either avg, sum, min or max |
sortOrder | String | asc, desc |
tz* | String | timezone |
excludeDays | String | list of weekdays to exclude where 1 denotes Monday, 7 denotes Sunday, without any separator eg: to exclude weekends, use 67 |
excludeStatus | String | list of statuses to exclude separated by comma eg: to exclude Offline & Break, use On Break,Offline |
Response :
- {
- "code": "200",
- "list": {
- "agentStatus": [
- {
- "previousResult": {
- "agent_id": "3029000000002015",
- "previous_action_time": 1728976200110,
- "agentEmail": "janice@zylker.com",
- "current_action_time": 1728977814592,
- "agentName": "Jan",
- "triggered_by_username": "Jan",
- "triggered_by": "User",
- "duration": 1614482,
- "triggered_by_medium": "Web",
- "triggered_by_zuid": "67560001",
- "current_status": "Available",
- "zsoid": "67560292",
- "triggered_reason": "",
- "previous_status": "Offline"
- },
- "agent_id": "3029000000002015",
- "agentEmail": "janice@zylker.com",
- "agentName": "Jan",
- "dates": [
- {
- "hits": [
- {
- "agent_id": "3029000000002015",
- "previous_action_time": 1728977814592,
- "agentEmail": "janice@zylker.com",
- "triggered_reason_desc": "Automatic Check In",
- "current_action_time": 1729056300109,
- "agentName": "Jan",
- "triggered_by": "Zoho Voice",
- "duration": 78485517,
- "triggered_by_medium": "",
- "triggered_by_zuid": "",
- "current_status": "Available",
- "logid": "6prJk5IB_xciauz1XOy0",
- "zsoid": "67560292",
- "triggered_reason": "Agent Schedule",
- "previous_status": "Available"
- },
- {
- "agent_id": "3029000000002015",
- "previous_action_time": 1729056300109,
- "agentEmail": "janice@zylker.com",
- "current_action_time": 1729061808945,
- "agentName": "Jan",
- "triggered_by_username": "Jan",
- "triggered_by": "User",
- "duration": 5508836,
- "triggered_by_medium": "Web",
- "triggered_by_zuid": "67560001",
- "current_status": "Offline",
- "logid": "b6MdlJIBm7rVk3YNaz3l",
- "zsoid": "67560292",
- "triggered_reason": "",
- "previous_status": "Available"
- },
- ...
- ],
- "start_timestamp": 1729036800000,
- "index": 0
- },
- { "hits": [...], "start_timestamp": 1729123200000, "index": 1 },
- { "hits": [...],"start_timestamp": 1729209600000,"index": 2 },
- { "hits": [...],"start_timestamp": 1729296000000,"index": 3 },
- { "hits": [...],"start_timestamp": 1729382400000,"index": 4 },
- { "hits": [...],"start_timestamp": 1729468800000,"index": 5 },
- { "hits": [...],"start_timestamp": 1729555200000,"index": 6 }
- ]
- }
- ]
- },
- "status": "SUCCESS"
- }
GET A CALL LOG'S STATUS ACTIVITY
This API fetches the status info of all agents in a queue's call log. This can be used to correlate the agents' availability against missed or answered queue calls.
Note: This api is only available for incoming queue call logs. Status correlation is unavailable for other call types, but can still be fetched using 'statusaudit/list' api if the list of agents, startTime & endTime of the call log are known.
Scope: ZohoVoice.agents.READ
Method : GET
URL : https://voice.zoho.com/rest/json/zv/metrics/statusaudit/list/log
Params:
Key | Type | Description |
fromEpoch* | long | timestamp in epoch millis |
toEpoch* | long | timestamp in epoch millis |
logId* | uuid | uuid of call log |
queueIds | String | queueIds of queues involved in the call log |
tz* | String | timezone to display the results in |
Response:
{- "code": "200",
- "log": {
- "response": [
- {
- "ringingOrder": [
- {
- "agentId": "3029000003904005",
- "rings": [
- {
- "start_time": 1729251588000,
- "queueName": "All in One",
- "agent_name": "aravindan.e5",
- "agent_number": 3029000003904005,
- "ringing_time": 0,
- "is_answered": false,
- "strategy": "ring-all",
- "hangup_cause": {
- "hangup_cause_description": "The user you are trying to reach is not available.",
- "hangupcause": "UNALLOCATED_NUMBER",
- "hangup_cause_displayname": "User unreachable"
- }
- }
- ]
- },
- {
- "agentId": "3029000004016005",
- "rings": [..]
- },
- {
- "agentId": "3029000000002015",
- "rings": [..]
- }
- ],
- "answeredAgent": {},
- "queueDetails": {
- "_queueId": 3029000004016033,
- "ringtime_in_queue": 60,
- "queueName": "All in One",
- "customer_entry_time": 1729251587000,
- "strategy": "ring-all",
- "customer_exit_time": 1729251647000
- },
- "agentStatus": [
- {
- "hits": [..],
- "agent_id": "3029000003904005",
- "agentName": "aravindan.e5"
- },
- {
- "hits": [..],
- "agent_id": "3029000004016005",
- "agentName": "aravindan.e3"
- },
- {
- "hits": [..],
- "agent_id": "3029000000002015",
- "agentName": "AravindaN1"
- },
- {
- "hits": [..],
- "agent_id": "3029000000003003",
- "agentName": "aravindan2"
- },
- {
- "hits": [..],
- "agent_id": "3029000000005013",
- "agentName": "aravindan.e4"
- }
- ]
- }
- ]
- },
- "status": "SUCCESS"
- }
GET AGENTS' AGGREGATED STATUS METRICS (OVER THE COMPLETE PERIOD)
This API returns aggregated status data for a given set of agents or queues
Scope: ZohoVoice.agents.READ
Method: GET
URL: https://voice.zoho.com/rest/json/zv/metrics/statusaudit/overview
Params:
| | |
| | |
| | |
| | timestamp in epoch millis |
| | timestamp in epoch millis |
| | list of agent IDs separated by comma |
| | list of queue IDs separated by comma(When both agentIds and queueIds are given, only queueIds are used to filter results) |
| | status by which to sort - either On Call, Offline, On Break, Available, Busy or Working Time |
| | metric by which to sort - either avg, sum, min or max |
| | |
| | |
| | list of weekdays to exclude where 1 denotes Monday, 7 denotes Sunday, without any separator eg: to exclude weekends, use 67 |
| | list of statuses to exclude separated by comma eg: to exclude Offline & Break, use On Break,Offline |
Response:
{- "overview": {
- "agentmetrics": {
- "overallAggregation": {
- "Working Time": {
- "avg": 140780500.4,
- "max": 162421466,
- "onlineStatus": "Working Time",
- "sum": 703902502,
- "daily_peragent_avg": 35195125.1
- },
- "Offline": {..},
- "Available": {..},
- "On Call": {..},
- "agentCount": 4,
- "daysCount": 5
- },
- "maxTimeAgents": {
- "On Break": {
- "duration": "--",
- "agentName": "--",
- "previous_status": "On Break"
- },
- "Busy": {
- "duration": "--",
- "agentName": "--",
- "previous_status": "Busy"
- }
- },
- "individualAggregation": [
- {
- "agent_id": "600000000039003",
- "agentEmail": "jacques@zylker.com",
- "agentName": "Jack",
- "Working Time": {
- "avg": 40426688,
- "max": 161471551,
- "onlineStatus": "Working Time",
- "sum": 2.0213344E+8
- },
- "On Break": {
- "avg": "--",
- "peragent_avg": "--",
- "max": "--",
- "onlineStatus": "On Break",
- "sum": "0",
- "daily_peragent_avg": "--"
- },
- "Busy": {
- "avg": "--",
- "peragent_avg": "--",
- "max": "--",
- "onlineStatus": "Busy",
- "sum": "0",
- "daily_peragent_avg": "--"
- },
- "Offline": {
- "avg": "--",
- "peragent_avg": "--",
- "max": "--",
- "onlineStatus": "Offline",
- "sum": "0",
- "daily_peragent_avg": "--"
- },
- "Available": {
- "avg": 40265253.8,
- "max": 161471551,
- "onlineStatus": "Available",
- "sum": 201326269
- },
- "On Call": {
- "avg": 161434.2,
- "max": 311311,
- "onlineStatus": "On Call",
- "sum": 807171
- }
- },
- {..},
- {..},
- {..}
- ]
- }
- },
- "code": "200",
- "status": "SUCCESS"
- }
GET AGENTS' AGGREGATED STATUS METRICS(BY DAY)
This API returns aggregated status data for a given set of agents or queues
Scope: ZohoVoice.agents.READ
Method: GET
URL: https://voice.zoho.com/rest/json/zv/metrics/statusaudit/calendarSummary
Params:
| | |
| | |
| | |
| | timestamp in epoch millis |
| | timestamp in epoch millis |
| | list of agent IDs separated by comma |
| | list of queue IDs separated by comma(When both agentIds and queueIds are given, only queueIds are used to filter results) |
| | |
| | list of weekdays to exclude where 1 denotes Monday, 7 denotes Sunday, without any separator eg: to exclude weekends, use 67 |
| | list of statuses to exclude separated by comma eg: to exclude Offline & Break, use On Break,Offline |
{- "calendarSummary": {
- "histogramAggregation": [
- {
- "totalRow": {
- "agent_id": "600000000039003",
- "agentEmail": "jacques@zylker.com",
- "agentName": "Jack",
- "Working Time": {
- "avg": 40426688,
- "max": 161471551,
- "onlineStatus": "Working Time",
- "sum": 2.0213344E+8
- },
- "On Break": {
- "avg": "--",
- "peragent_avg": "--",
- "max": "--",
- "onlineStatus": "On Break",
- "sum": "0",
- "daily_peragent_avg": "--"
- },
- "Busy": {..},
- "Offline": {..},
- "Available": {..},
- "On Call": {..}
- },
- "intervalsData": {
- "2024-10-18": {
- "interval": "2024-10-18",
- "previous_status": {
- "Working Time": {
- "avg": 5866688,
- "max": 2.606828E+7,
- "sum": 2.933344E+7,
- "previous_status": "Working Time"
- },
- "On Break": {
- "avg": 0,
- "max": 0,
- "sum": 0,
- "previous_status": "On Break"
- },
- "Busy": {
- "avg": 0,
- "max": 0,
- "sum": 0,
- "previous_status": "Busy"
- },
- "Offline": {
- "avg": 0,
- "max": 0,
- "sum": 0,
- "previous_status": "Offline"
- },
- "Available": {
- "avg": 5732255,
- "max": 2.606828E+7,
- "sum": 28661275,
- "previous_status": "Available"
- },
- "On Call": {
- "avg": 134433,
- "max": 311311,
- "sum": 672165,
- "previous_status": "On Call"
- }
- }
- },
- "2024-10-16": {..},
- "2024-10-17": {..},
- "2024-10-21": {..},
- "2024-10-22": {..}
- },
- "intervalsList": [
- "2024-10-16",
- "2024-10-17",
- "2024-10-18",
- "2024-10-21",
- "2024-10-22"
- ]
- }
- ],
- "individualAggregation": [
- {
- "agent_id": "600000000039003",
- "agentEmail": "jacques@zylker.com",
- "agentName": "Jack",
- "Working Time": {
- "avg": 40426688,
- "max": 161471551,
- "onlineStatus": "Working Time",
- "sum": 2.0213344E+8
- },
- "On Break": {
- "avg": "--",
- "peragent_avg": "--",
- "max": "--",
- "onlineStatus": "On Break",
- "sum": "0",
- "daily_peragent_avg": "--"
- },
- "Busy": {..},
- "Offline": {..},
- "Available": {..},
- "On Call": {..}
- }
- ]
- },
- "code": "200",
- "status": "SUCCESS"
- }