GET - Get all users

 

Purpose

Use this API to fetch all the users in your organization.
 

Authorization

HeaderKeyDescription
Authorization*

Zoho-oauthtoken<space><ACCESS_TOKEN>

Accept*Set to application/json.

Request URL 

Method: GET

https://voice.zoho.com/rest/json/zv/api/users

Scope: ZohoVoice.agents.READ

Parameters: 

Param Name

Data Type

Description

userid

Long

Represents the unique ID assigned to a user.

agentId

Long

Represents the unique ID assigned to a agent.

searchKey

String

Represents the keyword used to search users by:

  • Name

  • Email ID

  • Department Name

sortBy

String

Represents the field used to sort the users by:

  • Name

  • Email ID

  • Role ID

  • Department ID

  • Created Time

  • Online Status

  • Status

status

Integer

Represents the status of users to be retrieved.


Possible values:

  • 1 - Active

  • 2 - Inactive

  • 3 - Pending

agentStatus

Integer

Represents the current availability status of agents.


Possible values:

  • 0 - Available

  • 2 - On break

  • 3 - Offline

  • 4 - On call

  • 5 - Busy

role

Integer

Represents the role of users to be retrieved.


Possible values:

  • 0 - Super Admin

  • 1 - Admin

  • 2 - Technician

  • 3 - Supervisor

  • 4 - Supervisor Plus

  • 5 - Telephony Agent

from

Integer

Represents the starting index for retrieving records.

offset

Integer

Represents the number of records to be returned.

Maximum value: 50 records per API request.

 

Sample Request

Copiedcurl "https://voice.zoho.com/rest/json/zv/api/users?from=1&offset=50" 
-X GET \
-H "Authorization: Zoho-oauthtoken *****"

Sample Response - Success

Copied{
    "code": "200",
    "meta": {
        "total": 1
    },
    "users": [
        {
            "extension": 65676,
            "agentId": "96000000224015",
            "timezone": "IST",
            "onlineStatus": "Offline",
            "departmentId": "96000000325001",
            "userid": "96000000015027",
            "zvtRole": 1,
            "countryCode": 93,
            "lang": "en",
            "departmentName": "Product Engineering",
            "lastActiveTime": 1734692977138,
            "commServerStatus": "Completed",
            "emailid": "john@zylker.com",
            "agentNumber": "6333202_93000000224015",
            "zuid": 698331952,
            "zvtRoleName": "ADMIN",
            "name": "John",
            "status": 1,
            "reportTime": "17:35"
        }
    ],
    "status": "SUCCESS"
} 

Sample Response - Error

Copied{
 "status": "ERROR",
 "code": "500",
 "message": "Invalid agent."
}