Get - Get multiple agents' online status
Purpose
Use this API to fetch online status of multiple agents.
Note
- This API will query details for agents based on the role of the querying user.
- Example: If an admin uses this API, they can fetch the status of all agents in the Zoho Voice organisation. However, a supervisor will be able only to fetch the status of their supervised agents.
Authorization
HeaderKey | Description |
Authorization* | Zoho-oauthtoken<space><ACCESS_TOKEN> |
Accept* | Set to application/json. |
Request URL
Method: GET
https://voice.zoho.com/rest/json/zv/api/v2/agents/onlineStatus |
Scope: ZohoVoice.agents.READ
Parameters:
Param Name | Data Type | Description |
agentIds* | String | Represents a single or multiple agent IDs separated by commas. |
zuids | String | Represents single or multiple ZUIDs separated by commas. The zuids parameter can be provided instead of agentIds. |
Sample Request
Copiedcurl "https://voice.zoho.com/rest/json/zv/api/agents/onlineStatus?agentIds=96000000016003,96000000016005" \
-X GET \
-H "Authorization:Zoho-oauthtoken *****"Sample Response - Success
Copied{
"code": "200",
"onlineStatus": [
{
"agentId": "96000000016003",
"onlineStatus": "Available"
},
{
"agentId": "96000000016005",
"onlineStatus": "Busy"
}
],
"status": "SUCCESS"
}Sample Response - Error
Copied{
"code": "200",
"onlineStatus": [
{
"agentId": "97685746000",
"error": "Invalid agent."
}
],
"status": "SUCCESS"
}