Zoho CRM Record Locking Configuration

Record locking configuration allows you to set up the configuration needed to lock the records in modules manually or automatically when certain conditions are met.

OpenAPI Specification

zoho-crm-record-locking-configurations-openapi.json Raw ↑
{
  "openapi": "3.1.0",
  "info": {
    "title": "Record Locking Configuration",
    "description": "Record locking configuration allows you to set up the configuration needed to lock the records in modules manually or automatically when certain conditions are met.",
    "version": "8"
  },
  "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": {
    "/settings/record_locking_configurations": {
      "post": {
        "operationId": "createRecordLockingConfiguration",
        "description": "To add record locking configuration for different modules.",
        "summary": "Create Record Locking Configuration",
        "parameters": [
          {
            "$ref": "#/components/parameters/Module"
          }
        ],
        "security": [
          {
            "iam-oauth2-schema": [
              "ZohoCRM.settings.record_locking_configurations.CREATE"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "description": "Request object for  creating of record locking configuration.",
                "properties": {
                  "record_locking_configurations": {
                    "type": "array",
                    "maxItems": 1,
                    "description": "details of record_locking_configurations",
                    "items": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "object for  creating of record locking configuration.",
                      "properties": {
                        "lock_type": {
                          "type": "string",
                          "enum": [
                            "automatic",
                            "manual",
                            "both"
                          ],
                          "description": "Lock type"
                        },
                        "locked_for": {
                          "type": "string",
                          "enum": [
                            "all_profiles",
                            "all_profiles_except_excluded_profiles"
                          ],
                          "description": "Lock for"
                        },
                        "restricted_actions": {
                          "type": "array",
                          "maxItems": 10,
                          "description": "List of restricted actions.",
                          "items": {
                            "type": "string",
                            "enum": [
                              "change_owner",
                              "update",
                              "delete",
                              "tags"
                            ],
                            "default": "update",
                            "description": "A restricted action."
                          }
                        },
                        "excluded_fields": {
                          "type": "array",
                          "maxItems": 15,
                          "description": "Fields excluded from locking.",
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "description": "Field descriptor to be excluded from locking.",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "Field id.",
                                "maxLength": 255
                              }
                            },
                            "required": [
                              "id"
                            ]
                          }
                        },
                        "feature_type": {
                          "type": "string",
                          "enum": [
                            "record_locking"
                          ],
                          "default": "record_locking",
                          "description": "Feature type identifier."
                        },
                        "locking_rules": {
                          "type": "array",
                          "maxItems": 5,
                          "description": "Locking rules for the configuration.",
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "description": "A locking rule object.",
                            "properties": {
                              "name": {
                                "type": "string",
                                "description": "Name of the locking rule.",
                                "maxLength": 256
                              },
                              "lock_existing_records": {
                                "type": "boolean",
                                "default": false,
                                "description": "Whether to lock existing records matching criteria."
                              },
                              "criteria": {
                                "type": "object",
                                "additionalProperties": true,
                                "description": "Criteria object used to match records."
                              }
                            },
                            "required": [
                              "name",
                              "criteria"
                            ]
                          }
                        },
                        "restricted_communications": {
                          "type": "array",
                          "maxItems": 10,
                          "items": {
                            "type": "string",
                            "enum": [
                              "send_mail"
                            ],
                            "description": "A restricted communication action."
                          },
                          "description": "List of restricted communications."
                        },
                        "restricted_custom_buttons": {
                          "type": "array",
                          "maxItems": 30,
                          "description": "List of restricted custom buttons.",
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "description": "Restricted custom button descriptor.",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "Identifier of the custom button.",
                                "maxLength": 255
                              }
                            },
                            "required": [
                              "id"
                            ]
                          }
                        },
                        "lock_excluded_profiles": {
                          "type": "array",
                          "maxItems": 15,
                          "description": "Profiles excluded from locking.",
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "description": "Profile descriptor excluded from locking.",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "Profile id.",
                                "maxLength": 255
                              }
                            },
                            "required": [
                              "id"
                            ]
                          }
                        },
                        "lock_for_portal_users": {
                          "type": "boolean",
                          "default": true,
                          "description": "Whether portal users are affected by the lock."
                        }
                      },
                      "required": [
                        "lock_type"
                      ]
                    }
                  }
                },
                "required": [
                  "record_locking_configurations"
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "When the record locking configuration is successfully created for the module, this response will be returned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "description": "Response object for successful creation of record locking configuration.",
                  "properties": {
                    "record_locking_configurations": {
                      "type": "array",
                      "description": "An array containing details of the created record locking configuration.",
                      "maxItems": 1,
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "description": "An object containing the details of the record locking configuration created for the module.",
                        "properties": {
                          "status": {
                            "type": "string",
                            "enum": [
                              "success"
                            ],
                            "description": "Indicates that the configuration creation operation was successful."
                          },
                          "code": {
                            "type": "string",
                            "enum": [
                              "SUCCESS"
                            ],
                            "description": "A code representing the successful configuration creation operation."
                          },
                          "message": {
                            "type": "string",
                            "description": "A message that provides additional information about the creation operation.",
                            "maxLength": 255
                          },
                          "details": {
                            "type": "object",
                            "additionalProperties": false,
                            "description": "Object containing identifiers and details for the created record locking configuration.",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "The unique identifier of the created record locking configuration.",
                                "maxLength": 255
                              }
                            },
                            "required": [
                              "id"
                            ]
                          }
                        },
                        "required": [
                          "status",
                          "code",
                          "message",
                          "details"
                        ]
                      }
                    }
                  },
                  "required": [
                    "record_locking_configurations"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — The server could not process the request due to invalid syntax, missing/invalid parameters, or invalid data.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "oneOf": [
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "description": "Simple error envelope used for parameter/module/permission errors.",
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Error code representing the failure reason.",
                          "maxLength": 256,
                          "enum": [
                            "INVALID_MODULE",
                            "REQUIRED_PARAM_MISSING",
                            "INVALID_DATA",
                            "FEATURE_NOT_SUPPORTED",
                            "NO_PERMISSION",
                            "NOT_SUPPORTED",
                            "LIMIT_EXCEEDED",
                            "MANDATORY_NOT_FOUND",
                            "DEPENDENT_FIELD_MISSING",
                            "DUPLICATE_DATA"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable error message.",
                          "maxLength": 256
                        },
                        "status": {
                          "type": "string",
                          "description": "Error status indicator.",
                          "enum": [
                            "error"
                          ]
                        },
                        "details": {
                          "description": "Additional information related to the error (varies by code).",
                          "oneOf": [
                            {
                              "type": "object",
                              "additionalProperties": false,
                              "description": "Missing parameter detail.",
                              "properties": {
                                "param_name": {
                                  "type": "string",
                                  "description": "Name of the missing parameter.",
                                  "maxLength": 256
                                }
                              },
                              "required": [
                                "param_name"
                              ]
                            },
                            {
                              "type": "object",
                              "additionalProperties": false,
                              "description": "Resource path index detail.",
                              "properties": {
                                "resource_path_index": {
                                  "type": "integer",
                                  "format": "int32",
                                  "description": "Index of the invalid path element."
                                }
                              },
                              "required": [
                                "resource_path_index"
                              ]
                            },
                            {
                              "type": "object",
                              "additionalProperties": false,
                              "description": "Permission detail (single-item array as requested).",
                              "properties": {
                                "permissions": {
                                  "type": "array",
                                  "description": "List of permissions required to perform the operation.",
                                  "maxItems": 1,
                                  "items": {
                                    "type": "string",
                                    "maxLength": 256,
                                    "description": "List of permissions required to perform the operation."
                                  }
                                }
                              },
                              "required": [
                                "permissions"
                              ]
                            },
                            {
                              "type": "object",
                              "additionalProperties": false,
                              "description": "Limit exceeded detail.",
                              "properties": {
                                "limit": {
                                  "type": "integer",
                                  "description": "Configured limit value.",
                                  "format": "int32"
                                },
                                "available_limit": {
                                  "type": "integer",
                                  "description": "Remaining available limit (if present).",
                                  "format": "int32"
                                },
                                "param_name": {
                                  "type": "string",
                                  "maxLength": 256,
                                  "description": "Parameter name involved in limit (e.g., module)."
                                }
                              },
                              "required": [
                                "limit"
                              ]
                            },
                            {
                              "type": "object",
                              "additionalProperties": false,
                              "description": "Empty details object (used by some error codes)."
                            }
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "status",
                        "details"
                      ]
                    },
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "description": "Record-locking-configurations-style error envelope (array of one error item).",
                      "properties": {
                        "record_locking_configurations": {
                          "type": "array",
                          "maxItems": 1,
                          "description": "Array containing a single error object related to record locking configuration.",
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "description": "Error code of the 400 Response",
                            "properties": {
                              "code": {
                                "type": "string",
                                "description": "Error code for the specific locking configuration item.",
                                "maxLength": 256,
                                "enum": [
                                  "INVALID_DATA",
                                  "NOT_SUPPORTED",
                                  "LIMIT_EXCEEDED",
                                  "DEPENDENT_FIELD_MISSING",
                                  "MANDATORY_NOT_FOUND",
                                  "EXPECTED_FIELD_MISSING",
                                  "AMBIGUITY_DURING_PROCESSING",
                                  "DUPLICATE_DATA"
                                ]
                              },
                              "details": {
                                "description": "Detailed metadata for the configuration error; many possible shapes supported.",
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "description": "API-name + json_path detail for a single field.",
                                    "properties": {
                                      "api_name": {
                                        "type": "string",
                                        "maxLength": 256,
                                        "description": "API name of the field involved."
                                      },
                                      "json_path": {
                                        "type": "string",
                                        "maxLength": 256,
                                        "description": "JSON path to the failing element."
                                      }
                                    },
                                    "required": [
                                      "api_name",
                                      "json_path"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "description": "Supported values + json_path detail for invalid value lists.",
                                    "properties": {
                                      "supported_values": {
                                        "type": "array",
                                        "description": "List of supported values for the field.",
                                        "maxItems": 15,
                                        "items": {
                                          "type": "string",
                                          "maxLength": 256,
                                          "description": "Error Response"
                                        }
                                      },
                                      "api_name": {
                                        "type": "string",
                                        "maxLength": 256,
                                        "description": "API name of the expected field."
                                      },
                                      "json_path": {
                                        "type": "string",
                                        "maxLength": 256,
                                        "description": "JSON path of the expected field."
                                      }
                                    },
                                    "required": [
                                      "supported_values",
                                      "api_name",
                                      "json_path"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "description": "Limit exceeded detail for nested arrays (lock rules, excluded fields, custom buttons, etc.).",
                                    "properties": {
                                      "limit": {
                                        "type": "integer",
                                        "description": "Maximum allowed value.",
                                        "format": "int32"
                                      },
                                      "available_limit": {
                                        "type": "integer",
                                        "description": "Remaining allowed value when > 0.",
                                        "format": "int32"
                                      },
                                      "api_name": {
                                        "type": "string",
                                        "maxLength": 256,
                                        "description": "Limit exceeded details"
                                      },
                                      "json_path": {
                                        "type": "string",
                                        "maxLength": 256,
                                        "description": "JSON path indicating where the error occurred."
                                      }
                                    },
                                    "required": [
                                      "limit",
                                      "api_name",
                                      "json_path"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "description": "Dependee / dependent-field-missing detail.",
                                    "properties": {
                                      "dependee": {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "description": "Dependee / dependent-field-missing detail.",
                                        "properties": {
                                          "api_name": {
                                            "type": "string",
                                            "maxLength": 256,
                                            "description": "API name of the dependee field."
                                          },
                                          "json_path": {
                                            "type": "string",
                                            "maxLength": 256,
                                            "description": "API name of the dependee field."
                                          }
                                        },
                                        "required": [
                                          "api_name",
                                          "json_path"
                                        ]
                                      },
                                      "api_name": {
                                        "type": "string",
                                        "maxLength": 256,
                                        "description": "API name of the dependee field."
                                      },
                                      "json_path": {
                                        "type": "string",
                                        "maxLength": 256,
                                        "description": "JSON path of the dependee field."
                                      }
                                    },
                                    "required": [
                                      "dependee",
                                      "api_name",
                                      "json_path"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "description": "expected_fields list used when both id and api_name missing.",
                                    "properties": {
                                      "expected_fields": {
                                        "type": "array",
                                        "maxItems": 15,
                                        "description": "List of expected field descriptors.",
                                        "items": {
                                          "type": "object",
                                          "additionalProperties": false,
                                          "description": "expected_fields list used when both id and api_name missing.",
                                          "properties": {
                                            "json_path": {
                                              "type": "string",
                                              "maxLength": 256,
                                              "description": "JSON path of the expected field."
                                            },
                                            "api_name": {
                                              "type": "string",
                                              "maxLength": 256,
                                              "description": "API name of the expected field."
                                            }
                                          },
                                          "required": [
                                            "json_path",
                                            "api_name"
                                          ]
                                        }
                                      }
                                    },
                                    "required": [
                                      "expected_fields"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "description": "ambiguity_due_to list when id and api_name map to different fields.",
                                    "properties": {
                                      "ambiguity_due_to": {
                                        "type": "array",
                                        "maxItems": 15,
                                        "description": "ambiguity_due_to list when id and api_name map to different fields.",
                                        "items": {
                                          "type": "object",
                                          "additionalProperties": false,
                                          "description": "ambiguity_due_to list when id and api_name map to different fields.",
                                          "properties": {
                                            "json_path": {
                                              "type": "string",
                                              "maxLength": 256,
                                              "description": "JSON path of the ambiguous field."
                                            },
                                            "api_name": {
                                              "type": "string",
                                              "maxLength": 256,
                                              "description": "API name of the ambiguous field."
                                            }
                                          },
                                          "required": [
                                            "json_path",
                                            "api_name"
                                          ]
                                        }
                                      }
                                    },
                                    "required": [
                                      "ambiguity_due_to"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "description": "Minimal details object with api_name + json_path omitted (fall

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