Get Assignment Rules

Purpose

To fetch the assignment rules in your org.

Endpoints

  • GET /settings/automation/assignment_rules
  • GET /settings/automation/assignment_rules/{rule_id}

Request Details

Request URL

All - {api-domain}/crm/{version}/settings/automation/assignment_rules
Specific - {api-domain}/crm/{version}/settings/automation/assignment_rules/{rule_id}

Supported modules

Leads, Accounts, Contacts, Deals, Tasks, Cases, and Custom

Header

Authorization: Zoho-oauthtoken <access_token>

Scope

scope=ZohoCRM.settings.assignment_rules.{{operation-type}}

Possible operation types

ALL - Full access to data
READ - Get data from the module

Parameters
  • modulestring, mandatory (mandatory when you fetch a specific assignment rule)

    The API name of the module you want to fetch the assignment rule from. Supported modules are Leads, Contacts, Accounts, Deals, and Custom. Use the Get Modules Metadata API to retrieve module API names.

Sample Request

Copiedcurl "https://www.zohoapis.com/crm/v8/settings/automation/assignment_rules"
-X GET
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"

Response JSON

  • assignment_rulesJSON array

    Returns the list of Assignment Rules configured for the module. Each object in the array represents one Assignment Rule.

    • created_timestring

      Represents the date and time when the Assignment Rule was created.

    • rule_entriesJSON array

      Returns the list of rule entries configured for the Assignment Rule. Each rule entry represents a condition used to assign record ownership.

      • sequence_numberinteger

        Represents the order in which the rule entry is evaluated. Rule entries are evaluated from the lowest sequence number to the highest.

      • criteriaJSON object

        Represents the condition that determines when this rule entry is applied.

        • comparatorstring

          Represents the comparison operator used in the rule condition.

        • fieldJSON object

          Represents the field used to evaluate the rule condition.

          • api_namestring

            Represents the API name of the field.

          • idstring

            Represents the unique ID of the field.

        • typestring

          Represents the type of comparison used in the rule condition.

        • valuestring

          Represents the value used to evaluate the condition.

      • assign_toJSON object

        Represents how the record is assigned when the rule entry criteria match.

        • criteriaJSON object

          Represents the condition used to determine the assignee when assign_to.type is set to criteria.

          • comparatorstring

            Represents the comparison operator used to determine the assignee.

          • fieldJSON object

            Represents the Users module field used to determine the assignee.

            • api_namestring

              Represents the API name of the field.

            • idstring

              Represents the unique ID of the field.

          • typestring

            Represents the type of comparison used in the assignment condition.

          • valuestring

            Represents the value used to determine the assignee.

        • typestring

          Represents the assignment type used for the rule entry. Example: criteria, users, role, group, or zia_suggested_users.

      • user_availability_based_onJSON array

        Represents the availability conditions checked before assigning the record.

        User availability is evaluated based on:

        • online_status: Assigns records only to users who are currently online.
        • shift_timing: Assigns records only to users who are within their configured working hours.
      • followup_actionsJSON array 

        Represents the follow-up actions configured for the rule entry. A value of null indicates that no follow-up actions are configured.

      • idstring

        Represents the unique ID of the rule entry.

    • modified_timestring

      Represents the date and time when the Assignment Rule was last modified.

    • api_namestring

      Represents the system-generated API name of the Assignment Rule.

    • default_assigneeJSON object

      Represents the default user to whom the record is assigned when no rule entry criteria match.

    • moduleJSON object

      Represents the module to which the Assignment Rule belongs.

    • namestring

      Represents the name of the Assignment Rule.

    • modified_byJSON object

      Represents the user who last modified the Assignment Rule.

    • descriptionstring

      Represents the description of the Assignment Rule.

    • idstring

      Represents the unique ID of the Assignment Rule.

    • created_byJSON object

      Represents the user who created the Assignment Rule.

Sample Response to retrieve all the Assignment Rules

Copied{
    "assignment_rules": [
        {
            "created_time": "2026-01-20T00:00:00+05:30",
            "modified_time": "2026-01-20T00:00:00+05:30",
            "api_name": "Basic_Rule",
            "default_assignee": {
                "resource": {
                    "api_name": "${CURRENTUSER}",
                    "name": "Logged in User"
                },
                "name": "Logged in User",
                "id": "${CURRENTUSER}",
                "type": "user"
            },
            "module": {
                "api_name": "Leads",
                "name": "Leads",
                "id": "2276164000000000125"
            },
            "name": "Basic Rule",
            "modified_by": {
                "name": "Patricia Boyle",
                "id": "2276164000000471001"
            },
            "description": "Assigning all Lead records",
            "id": "2276164000003551073",
            "created_by": {
                "name": "Patricia Boyle",
                "id": "2276164000000471001"
            }
        },
        
        .
        .
        .
    ]
}

Possible Errors

  • INVALID_REQUEST_METHODHTTP 400

    The request method specified is invalid.
    Resolution: Specify the request method as GET.

  • REQUIRED_PARAM_MISSINGHTTP 400

    One of the expected parameter is missing
    Resolution: Include the module parameter in the request when you fetch a specific assignment rule.

  • OAUTH_SCOPE_MISMATCHHTTP 401

    The token does not have the scope ZohoCRM.settings.ALL.
    Resolution: Create a token with the scope ZohoCRM.settings.ALL.

  • NO_PERMISSIONHTTP 403

    You do not have the permission to read the assignment rules.
    Resolution: Contact your administrator.

  • INVALID_URL_PATTERNHTTP 404

    The request URL has syntactical errors.
    Resolution: Correct the syntactical errors in the request URL.

Sample request to retrieve a specific Assignment Rule

Copiedcurl "https://www.zohoapis.com/crm/v8/settings/automation/assignment_rules/2276164000003551117"
-X GET
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"

Sample response

Copied{
    "assignment_rules": [
        {
            "created_time": "2026-01-21T00:00:00+05:30",
            "rule_entries": [
                {
                    "sequence_number": 1,
                    "criteria": {
                        "comparator": "contains",
                        "field": {
                            "api_name": "Email",
                            "id": "2276164000000000563"
                        },
                        "type": "value",
                        "value": "zohocrm@mail.com"
                    },
                    "assign_to": {
                        "resource": {
                            "name": "CEO",
                            "id": "2276164000000015966"
                        },
                        "type": "role"
                    },
                    "user_availability_based_on": [
                        "online_status"
                    ],
                    "followup_actions": null,
                    "id": "2276164000003551119"
                }
            ],
            "modified_time": "2026-01-21T00:00:00+05:30",
            "api_name": "Lead_Rule_with_type_role",
            "default_assignee": {
                "resource": {
                    "api_name": "${CURRENTUSER}",
                    "name": "Logged in User"
                },
                "name": "Logged in User",
                "id": "${CURRENTUSER}",
                "type": "user"
            },
            "module": {
                "api_name": "Leads",
                "name": "Leads",
                "id": "2276164000000000125"
            },
            "name": "Lead Rule with type role",
            "modified_by": {
                "name": "Patricia Boyle",
                "id": "2276164000000471001"
            },
            "description": "Assigning all Lead records",
            "id": "2276164000003551117",
            "created_by": {
                "name": "Patricia Boyle",
                "id": "2276164000000471001"
            }
        }
    ]
}