User Groups

User Groups

In Zoho CRM, you can create different types of groups (set of users) to manage a set of common records. Every group can consist of members that are grouped based on the users, roles, roles and subordinates, territories and sub-territories. These combinations allow you to share common records through data sharinf rules. For more details, refer to Users and Groups.

Get User Groups

Purpose

To get the details of the user groups created for your organization.

Request Details

Request URL

Get all user groups - {api-domain}/crm/{version}/settings/user_groups
Get a specific user group - {api-domain}/crm/{version}settings/user_groups/{user_group_id}

Header

Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52

Scope

scope=ZohoCRM.settings.user_groups.READ

Parameters

  • includeoptional

    This parameter takes the value sources_count that renders the number of other groups(roles, territories etc) that this group is also a part of.

  • nameoptional

    Use this parameter when you want to filter out a user group by its name.

  • pageoptional

    To get the list of records from the respective pages. Default value for page is 1. Possible values: Positive integer values only.

  • per_pageoptional

    To get the list of records available per page. The default and the maximum possible value is 200. Possible values: Positive integer values only.

Sample Request with "include=sources_count"

Copiedcurl "https://www.zohoapis.com/crm/v6/settings/user_groups?include=sources_count"
-X GET
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"

Sample Response

Copied{
    "user_groups": [
        {
            "created_time": "2022-11-21T12:33:12+05:30",
            "sources_count": {
                "territories": 1,
                "roles": 2,
                "users": 2
            },
            "modified_time": "2022-11-21T13:21:46+05:30",
            "name": "group 1",
            "modified_by": {
                "name": "Patricia Boyle",
                "id": "3652397000000186017"
            },
            "description": "groups API",
            "id": "3652397000009949005",
            "created_by": {
                "name": "Patricia Boyle",
                "id": "3652397000000186017"
            }
        },
        {
            "created_time": "2022-11-23T9:59:12+05:30",
            "sources_count": {
                "users": 2
            },
            "modified_time": null,
            "name": "group test",
            "modified_by": null,
            "description": null,
            "id": "3652397000009952001",
            "created_by": {
                "name": "Patricia Boyle",
                "id": "3652397000000186017"
            }
        }
    ],
    "info": {
        "per_page": 200,
        "count": 2,
        "page": 1,
        "more_records": false
    }
}

Possible Errors

  • NO_CONTENTHTTP 204

    There are no user groups created for your org.
    Resolution: Create user groups under Setup > Users & Control > Users > Groups > Create New Group.

  • NO_PERMISSIONHTTP 403

    You do not have permission to view the user groups.
    Resolution: Contact your system administrator.

Sample Request with "name"

Copiedcurl "https://www.zohoapis.com/crm/v6/settings/user_groups?name=group 1"
-X GET
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"

Sample Response

Copied{
    "user_groups": [
        {
            "created_time": "2022-11-21T12:33:12+05:30",
            "sources_count": {
                "territories": 1,
                "roles": 2,
                "users": 2
            },
            "modified_time": "2022-11-21T13:21:46+05:30",
            "name": "group 1",
            "modified_by": {
                "name": "Patricia Boyle",
                "id": "3652397000000186017"
            },
            "description": "groups API",
            "id": "3652397000009949005",
            "created_by": {
                "name": "Patricia Boyle",
                "id": "3652397000000186017"
            }
        }
],
    "info": {
        "per_page": 200,
        "count": 1,
        "page": 1,
        "more_records": false
    }
}