Get a Specific Assignment Rule

Purpose

To retrieve a specific Assignment Rule.

Use the Get Assignment Rules API to retrieve the rule ID.

Endpoints

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

Request Details

Request URL

{api-domain}/crm/{version}/settings/automation/assignment_rules/{assignment_rule_ID}

Supported modules

Leads, Accounts, Contacts, Deals, Tasks, Cases, Teams module, and Custom module.

Header

Authorization: Zoho-oauthtoken <access_token>

Scope

scope=ZohoCRM.settings.assignment_rules.READ

Parameters
  • modulestring, mandatory

    Specify the API name of the module from which you want to retrieve the Assignment Rule. Supported modules are Leads, Contacts, Accounts, Deals, Tasks, Cases, Teams module, and Custom module. Use the Get Modules Metadata API to retrieve module API names.

Response JSON

The assignment_rules JSON array lists the details of the specified 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 defines the conditions and assignee 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 conditions used to determine whether a record matches the rule entry.

      • comparatorstring

        Represents the comparison operator used to evaluate the record field.

      • fieldJSON object

        Represents the record field used to evaluate the rule entry criteria.

        • api_namestring

          Represents the API name of the record field.

        • idstring

          Represents the unique ID of the record field.

      • typestring

        Represents the type of value used in the rule entry criteria.

      • valuestring

        Represents the value used to evaluate the record field.

    • assign_toJSON object

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

      • resourceJSON object

        Represents the user, role, group, or profile to which the matching record is assigned.

        • namestring

          Represents the name of the user, role, group, or profile.

        • idstring

          Represents the unique ID of the user, role, group, or profile.

      • criteriaJSON object

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

        • comparatorstring

          Represents the comparison operator used to evaluate the assignee criteria.

        • fieldJSON object

          Represents the Users module field used to evaluate the assignee criteria.

          • api_namestring

            Represents the API name of the Users module field.

          • idstring

            Represents the unique ID of the Users module field.

        • typestring

          Represents the type of value used in the assignee criteria.

        • valuestring

          Represents the value used to determine the assignee.

      • typestring

        Represents the type of assignee configured for the rule entry. Possible values include users, role, group, profile, criteria, and 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.

      • resourcesJSON array

        Represents the task templates configured as follow-up actions.

        • namestring

          Represents the name of the task template.

        • idstring

          Represents the unique ID of the task template.

      • typestring

        Represents the type of follow-up action. The value is tasks when task creation is configured as the follow-up action.

    • 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.

    • resourceJSON object

      Represents the user configured as the default assignee.

      • api_namestring

        Represents the API name of the default assignee.

      • namestring

        Represents the name of the default assignee.

    • namestring

      Represents the name of the default assignee.

    • idstring

      Represents the unique ID of the default assignee.

    • typestring

      Represents the type of default assignee.

  • moduleJSON object

    Represents the module to which the Assignment Rule belongs.

    • api_namestring

      Represents the API name of the module.

    • namestring

      Represents the name of the module.

    • idstring

      Represents the unique ID of the module.

  • namestring

    Represents the name of the Assignment Rule.

  • modified_byJSON object

    Represents the user who last modified the Assignment Rule.

    • namestring

      Represents the name of the user who last modified the Assignment Rule.

    • idstring

      Represents the unique ID of 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.

    • namestring

      Represents the name of the user who created the Assignment Rule.

    • idstring

      Represents the unique ID of the user who created the Assignment Rule.

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.READ.
    Resolution: Create a token with the scope ZohoCRM.settings.READ.

  • 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

Copiedcurl "https://www.zohoapis.com/crm/v8/settings/aautomation/assignment_rules/5276164000003551117"
-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": "5276164000000000563"
                        },
                        "type": "value",
                        "value": "zohocrm@mail.com"
                    },
                    "assign_to": {
                        "resource": {
                            "name": "CEO",
                            "id": "5276164000000015966"
                        },
                        "type": "role"
                    },
                    "user_availability_based_on": [
                        "online_status"
                    ],
                    "followup_actions": [
                        {
                            "resources": [
                                {
                                    "name": "Follow up - ${Leads.Last Name} for ${Leads.Company}",
                                    "id": "5725767000000416363"
                                }
                            ],
                            "type": "tasks"
                        }
                    ],
                    "id": "5276164000003551119"
                }
            ],
            "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": "5276164000000000125"
            },
            "name": "Lead Rule with type role",
            "modified_by": {
                "name": "Patricia Boyle",
                "id": "5276164000000471001"
            },
            "description": "Assigning all Lead records",
            "id": "5276164000003551117",
            "created_by": {
                "name": "Patricia Boyle",
                "id": "5276164000000471001"
            }
        }
    ]
}