Zoho CRM Users API

Users CRUD operations. Published by Zoho in its first-party OpenAPI 3.1.0 repository github.com/zoho/crm-oas; 6 operation(s).

OpenAPI Specification

zoho-crm-users-openapi.json Raw ↑
{
  "openapi": "3.1.0",
  "info": {
    "title": "Users API",
    "description": "Users CRUD operations",
    "version": "8.0"
  },
  "servers": [
    {
      "url": "https://zohoapis.{dc}/crm/{version}",
      "description": "API Server URL",
      "variables": {
        "dc": {
          "enum": [
            "com",
            "eu",
            "in",
            "cn",
            "au"
          ],
          "default": "com",
          "description": "API Server URL TLD"
        },
        "version": {
          "default": "v8",
          "description": "API Version"
        }
      }
    }
  ],
  "paths": {
    "/users": {
      "get": {
        "operationId": "getUsers",
        "summary": "Get users",
        "description": "To get all users based on the provided parameters.",
        "security": [
          {
            "iam-oauth2-schema": [
              "ZohoCRM.users.READ"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Type"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "name": "type__s",
            "in": "query",
            "style": "form",
            "explode": false,
            "description": "type",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "Regular User",
                "Sandbox Developer User",
                "Team User"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "All users details based on the provided parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "List of users found based on the provided parameters.",
                  "properties": {
                    "users": {
                      "maxItems": 200,
                      "type": "array",
                      "description": "List of users",
                      "items": {
                        "$ref": "#/components/schemas/UserDetails"
                      }
                    },
                    "info": {
                      "$ref": "#/components/schemas/Info"
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "204": {
            "description": "No users found based on the provided parameters."
          }
        }
      },
      "post": {
        "operationId": "createUser",
        "description": "Create a new user in the organization. API exposed to customers",
        "summary": "Create User",
        "security": [
          {
            "iam-oauth2-schema": [
              "ZohoCRM.users.CREATE"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "List of user details",
                "properties": {
                  "users": {
                    "maxItems": 1,
                    "type": "array",
                    "description": "List of users",
                    "items": {
                      "$ref": "#/components/schemas/UserDetails"
                    }
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "User created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Create User Success Response",
                  "type": "object",
                  "properties": {
                    "users": {
                      "type": "array",
                      "maxItems": 1,
                      "description": "User creation success response",
                      "items": {
                        "description": "User creation response object",
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string",
                            "description": "Response code",
                            "enum": [
                              "SUCCESS"
                            ]
                          },
                          "details": {
                            "type": "object",
                            "description": "Details of the created user",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "ID of the created user",
                                "maxLength": 20
                              }
                            },
                            "required": [
                              "id"
                            ],
                            "additionalProperties": false
                          },
                          "message": {
                            "type": "string",
                            "description": "Response message",
                            "enum": [
                              "User added"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "description": "Response status",
                            "enum": [
                              "success"
                            ]
                          }
                        },
                        "additionalProperties": false
                      }
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Create User Bad Request Response",
                  "type": "object",
                  "properties": {
                    "users": {
                      "type": "array",
                      "maxItems": 1,
                      "description": "User creation error response",
                      "items": {
                        "description": "User creation error response object",
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string",
                            "description": "Error code",
                            "enum": [
                              "INVALID_DATA",
                              "DEPENDENT_FIELD_MISSING",
                              "UNAPPROVABLE",
                              "NOT_ALLOWED",
                              "NOT_SUPPORTED",
                              "MANDATORY_NOT_FOUND",
                              "LICENSE_LIMIT_EXCEEDED",
                              "DUPLICATE_DATA",
                              "INVALID_REQUEST",
                              "FEATURE_NOT_ENABLED",
                              "REQUIRED_DATA_NOT_FOUND",
                              "MAPPING_MISMATCH"
                            ]
                          },
                          "details": {
                            "type": "object",
                            "description": "Details about the error",
                            "properties": {
                              "api_name": {
                                "type": "string",
                                "description": "API name of the field related to the error",
                                "maxLength": 100
                              },
                              "json_path": {
                                "type": "string",
                                "description": "JSON path of the field related to the error",
                                "maxLength": 200
                              },
                              "maximum_length": {
                                "type": "integer",
                                "description": "Maximum length allowed",
                                "format": "int32"
                              },
                              "expected_data_type": {
                                "type": "string",
                                "description": "Expected data type",
                                "maxLength": 100
                              },
                              "dependee": {
                                "type": "object",
                                "description": "Details of the dependee field",
                                "properties": {
                                  "api_name": {
                                    "type": "string",
                                    "description": "API name of the dependee field",
                                    "maxLength": 100
                                  },
                                  "json_path": {
                                    "type": "string",
                                    "description": "JSON path of the dependee field",
                                    "maxLength": 200
                                  }
                                },
                                "additionalProperties": false
                              },
                              "resource_path_index": {
                                "type": "integer",
                                "description": "Index of the resource path in case of array",
                                "format": "int32"
                              }
                            },
                            "additionalProperties": true
                          },
                          "message": {
                            "type": "string",
                            "description": "Error message",
                            "enum": [
                              "invalid data",
                              "INVALID_DATA",
                              "Give a proper time zone value",
                              "Need shift_effective_from property to update users.",
                              "Cannot add user for ZohoOne account from CRM. Kindly add user through ZohoOne",
                              "Cannot add user for CRMPlus account from CRM. Kindly add user through CRMPlus",
                              "ReportingTo Feature is not enabled",
                              "You cannot create user in a sandbox org",
                              "type__s is cannot be updated by api",
                              "Company Name is required",
                              "Support user cannot be added",
                              "Unclosed Script tags found in signature",
                              "Request exceeds your license limit. Need to upgrade in order to add a user",
                              "Request exceeds your license limit. Need to upgrade in order to add a team user",
                              "Failed to add user since same email id is already present",
                              "User cannot be added as the user has already reached the maximum invitation limit",
                              "Invalid current shift id",
                              "Invalid next shift id",
                              "This email address is already registered with another datacenter and cannot be registered with this account's data centre US",
                              "Invalid Email Id. Please choose a different email id",
                              "Email Id should not contain @zoho.com. Please choose a different email id",
                              "Special Characters Found",
                              "Pattern not matched",
                              "current shift and next shift should not be same",
                              "Dependent Field value should not be null",
                              "the required current shift id value is not found",
                              "Create operation cannot be performed for $next_shift and $shift_effective_from fields",
                              "Create operation cannot be performed for $shift_effective_from field",
                              "Create operation cannot be performed for $next_shift field",
                              "Shift effective from date should be greater than Current Shift date",
                              "Please update the current shift to update next shift",
                              "the id given seems to be already deleted",
                              "the number separator and decimal separator values should not be same",
                              "Invalid data. Valid values are Comma/Period/Space (Not case-sensitive)",
                              "Invalid data. Valid values are Comma/Period (Not case-sensitive)",
                              "Created by & Modified by fields cannot be updated by api",
                              "System user cannot be added",
                              "Cannot update the sort_order_preference__s of another User",
                              "Valid date format should be given"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "description": "Response status",
                            "enum": [
                              "error"
                            ]
                          }
                        },
                        "additionalProperties": false
                      }
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "403": {
            "description": "permission denied",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Permission Denied Response",
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "description": "Error code",
                      "enum": [
                        "NO_PERMISSION",
                        "PERMISSION_DENIED"
                      ]
                    },
                    "details": {
                      "type": "object",
                      "description": "Details about the error",
                      "properties": {
                        "permissions": {
                          "description": "List of missing permissions",
                          "maxItems": 1,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "description": "Missing permission",
                            "enum": [
                              "Crm_Implied_Manage_Users"
                            ]
                          }
                        }
                      },
                      "additionalProperties": false
                    },
                    "message": {
                      "description": "Error message",
                      "type": "string",
                      "enum": [
                        "permission denied"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "description": "Response status",
                      "enum": [
                        "error"
                      ]
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "updateUser",
        "description": "Update multiple users. API exposed to customers",
        "summary": "Update User",
        "security": [
          {
            "iam-oauth2-schema": [
              "ZohoCRM.users.UPDATE"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "List of user details",
                "properties": {
                  "users": {
                    "maxItems": 10,
                    "type": "array",
                    "description": "List of users",
                    "items": {
                      "$ref": "#/components/schemas/UserDetails"
                    }
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "User updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Update User Success Response",
                  "type": "object",
                  "properties": {
                    "users": {
                      "type": "array",
                      "maxItems": 10,
                      "description": "User update success response",
                      "items": {
                        "description": "User update response object",
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string",
                            "description": "Response code",
                            "enum": [
                              "SUCCESS"
                            ]
                          },
                          "details": {
                            "type": "object",
                            "description": "Details of the updated user",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "ID of the updated user",
                                "maxLength": 20
                              }
                            },
                            "required": [
                              "id"
                            ],
                            "additionalProperties": false
                          },
                          "message": {
                            "type": "string",
                            "description": "Response message",
                            "enum": [
                              "User updated"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "description": "Response status",
                            "enum": [
                              "success"
                            ]
                          }
                        },
                        "additionalProperties": false
                      }
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Update User Bad Request Response",
                  "type": "object",
                  "properties": {
                    "users": {
                      "type": "array",
                      "maxItems": 1,
                      "description": "User update error response",
                      "items": {
                        "description": "User update error response object",
                        "type": "object",
                        "required": [
                          "code",
                          "message",
                          "status"
                        ],
                        "properties": {
                          "code": {
                            "type": "string",
                            "description": "Error code",
                            "enum": [
                              "INVALID_DATA",
                              "NOT_ALLOWED",
                              "MANDATORY_NOT_FOUND",
                              "CANNOT_UPDATE_DELETED_USER",
                              "EMAIL_UPDATE_NOT_ALOWED",
                              "INVALID_REQUEST",
                              "DUPLICATE_DATA",
                              "ID_ALREADY_DEACTIVATED",
                              "NOT_SUPPORTED",
                              "UNAPPROVABLE",
                              "LICENSE_LIMIT_EXCEEDED",
                              "AUTHORIZATION_FAILED",
                              "FEATURE_NOT_AVAILABLE",
                              "CONFLICTING_DATA_FOUND",
                              "REQUIRED_DATA_NOT_FOUND",
                              "ID_ALREADY_ACTIVE",
                              "MAPPING_MISMATCH",
                              "FEATURE_NOT_ENABLED"
                            ]
                          },
                          "details": {
                            "type": "object",
                            "description": "Details about the error",
                            "properties": {
                              "api_name": {
                                "type": "string",
                                "description": "API name of the field related to the error",
                                "maxLength": 100
                              },
                              "json_path": {
                                "type": "string",
                                "description": "JSON path of the field related to the error",
                                "maxLength": 200
                              },
                              "maximum_length": {
                                "type": "integer",
                                "description": "Maximum length allowed",
                                "format": "int32"
                              },
                              "expected_data_type": {
                                "type": "string",
                                "description": "Expected data type",
                                "maxLength": 100
                              },
                              "dependee": {
                                "type": "object",
                                "description": "Details of the dependee field",
                                "properties": {
                                  "api_name": {
                                    "type": "string",
                                    "description": "API name of the dependee field",
                                    "maxLength": 100
                                  },
                                  "json_path": {
                                    "type": "string",
                                    "description": "JSON path of the dependee field",
                                    "maxLength": 200
                                  }
                                },
                                "additionalProperties": false
                              },
                              "resource_path_index": {
                                "type": "integer",
                                "description": "Index of the resource path in case of array",
                                "format": "int32"
                              }
                            },
                            "additionalProperties": true
                          },
                          "message": {
                            "type": "string",
                            "description": "Error message",
                            "enum": [
                              "invalid data",
                              "required field not found",
                              "the id given seems to be invalid",
                              "the user must be updated with new eligible reporting manager because of changing user role",
                              "the user must be updated with new eligible reporting manager and the subordinates  who are going to  report to a user in a role below them, because of new role change are need to transfer to new eligible reporting manager",
                              "Need shift_effective_from property to update users.",
                              "Special Characters Found",
                              "Pattern not matched",
                              "Cannot add user for ZohoOne account from CRM. Kindly add user through ZohoOne",
                              "Cannot add user for CRMPlus account from CRM. Kindly add user through CRMPlus",
                              "You cannot update user in a sandbox org",
                              "type__s is cannot be updated by api",
                              "Company Name is required",
                              "Support user cannot be added",
                              "Unclosed Script tags found in signature",
                              "You are trying to activate more mail addon which exceeds your license limit. If you want to activate mail addon for additional users, please upgrade your license",
                              "Either trial is expired or user does not have sufficient previlege to perform this action",
                              "You can't perform this action over logged in user",
                              "invalid request",
                              "current shift and next shift should not be same",
                              "the required current shift id value is not found",
                              "Dependent Field value should not be null",
                              "Shift effective from date should be greater than Current Shift date",
                              "Please update the current shift to update next shift",
                              "Support user cannot be activated",
                              "System user cannot be activated",
                              "Created by & Modified by fields cannot be updated by api",
                              "Support user cannot be deactivated",
                              "System user cannot be deactivated",
                              "Cannot update the user details of support user",
                              "System Profile cannot be assigned to other users",
                              "Deleted user cannot be updated",
                              "Crm Plus account is not allowed to edit the email while updating the user info",
                              "Reinvite is not allowed for a confirmed user",
                              "Cannot update email of a confirmed CRM User",
                              "User with same email id is already in CRM Plus",
                              "User is already deactivated",
                              "You are not allowed to perform this operation.",
                              "Share among Subordinates Feature is not available",
                              "invalid id in reporting to or roles provided",
                              "INVALID_DATA",
                              "the number separator and decimal separator values should not be same",
                              "Invalid data. Valid values are Comma/Period/Space (Not case-sensitive)",
                              "Invalid data. Valid values are Comma/Period (Not case-sensitive)",
                              "Give a proper time zone value",
                              "Primary Contact cannot be deactivated",
                              "Reporting manager should be from parent roles or from the same role to which the current user belongs",
                              "User is already active",
                              "License Limit is Exceeded",
                              "Valid name format should be given",
                              "Valid sort order preference should be given",
                              "Cannot update the name_format__s of another User",
                              "Give a proper language code",
                              "ReportingTo Feature is not enabled",
                              "Email already exists",
                              "Either trial is expired or user does not have sufficiet previlege to perform this action",
                              "Cannot update the signature of another User",
                              "Non subordinate users cannot be updated",
                              "You can't perform this action over a closed/deleted user",
                              "the reporting manager must be superior in reporting hierarchy",
                              "Invalid current shift id",
                              "Cannot update the sort_order_preference__s of another User",
                              "Cannot update the user details of System User",
                              "User is not confirmed so customization info can't be updated"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "description": "Response status",
                            "enum": [
                              "error"
                            ]
                          }
                        },
                        "additionalProperties": false
                      }
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "403": {
            "description": "permission denied",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Permission Denied Response",
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "description": "Error code",
                      "enum": [
                        "NO_PERMISSION",
                        "PERMISSION_DENIED"
                      ]
                    },
                    "details": {
                      "type": "object",
                      "description": "Details about the error",
                      "properties": {
                        "permissions": {
                          "description": "List of missing permissions",
                          "maxItems": 1,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "description": "Missing permission",
                            "enum": [
                              "Crm_Implied_Manage_Users"
                            ]
                          }
                        }
                      },
                      "additionalProperties": false
                    },
                    "message": {
                      "description": "Error message",
                      "type": "string",
                      "enum": [
                        "permission denied"
                      ]
                    },
                    "status": {
                      "description": "Status of the response",
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/users/{user}": {
      "get": {
        "operationId": "getSingleUser",
        "summary": "Get user",
        "description": "To get a single user based on the provided user ID.",
        "parameters": [
          {
            "$ref": "#/components/parameters/User"
          }
        ],
        "security": [
          {
            "iam-oauth2-schema": [
              "ZohoCRM.users.READ"
            ]
          }
        ],
        "respon

# --- truncated at 32 KB (96 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/zoho-crm/refs/heads/main/openapi/zoho-crm-users-openapi.json