Zoho CRM Recycle Bin

To get, restore and delete Recycle Bin records. Published by Zoho in its first-party OpenAPI 3.1.0 repository github.com/zoho/crm-oas; 8 operation(s).

OpenAPI Specification

zoho-crm-recycle-bin-openapi.json Raw ↑
{
  "openapi": "3.1.0",
  "info": {
    "title": "Recycle Bin",
    "description": "To get, restore and delete Recycle Bin records",
    "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/recycle_bin": {
      "get": {
        "operationId": "getRecycleBinRecords",
        "summary": "List recycle bin records",
        "description": "Returns paginated recycle-bin entries. Use filters or ids to scope results.",
        "security": [
          {
            "iam-oauth2-schema": [
              "ZohoCRM.settings.recycle_bin.READ"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response with the requested data.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "recycle_bin": {
                      "type": "array",
                      "description": "List of recycle bin records.",
                      "maxItems": 200,
                      "items": {
                        "description": "Individual recycle bin record.",
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                          "display_name": {
                            "type": "string",
                            "maxLength": 500,
                            "description": "Display name of the deleted record."
                          },
                          "deleted_time": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Timestamp when the record was deleted."
                          },
                          "owner": {
                            "type": "object",
                            "description": "Owner of the deleted record.",
                            "additionalProperties": false,
                            "properties": {
                              "name": {
                                "type": "string",
                                "maxLength": 255,
                                "description": "Owner's name."
                              },
                              "id": {
                                "type": "string",
                                "maxLength": 100,
                                "description": "Owner's identifier."
                              }
                            },
                            "required": [
                              "name",
                              "id"
                            ]
                          },
                          "module": {
                            "type": "string",
                            "maxLength": 100,
                            "description": "Module name of the deleted record."
                          },
                          "deleted_by": {
                            "type": "object",
                            "description": "User who deleted the record.",
                            "additionalProperties": false,
                            "properties": {
                              "name": {
                                "type": "string",
                                "maxLength": 255,
                                "description": "Name of the user who deleted."
                              },
                              "id": {
                                "type": "string",
                                "maxLength": 100,
                                "description": "Identifier of the user who deleted."
                              }
                            },
                            "required": [
                              "name",
                              "id"
                            ]
                          },
                          "id": {
                            "type": "string",
                            "maxLength": 100,
                            "description": "Unique identifier of the recycle bin record."
                          }
                        },
                        "required": [
                          "display_name",
                          "deleted_time",
                          "owner",
                          "module",
                          "deleted_by",
                          "id"
                        ]
                      }
                    },
                    "info": {
                      "type": "object",
                      "description": "Pagination and count information.",
                      "additionalProperties": false,
                      "properties": {
                        "per_page": {
                          "type": "integer",
                          "format": "int32",
                          "description": "Number of records per page."
                        },
                        "count": {
                          "type": "integer",
                          "format": "int32",
                          "description": "Total number of records returned."
                        },
                        "page": {
                          "type": "integer",
                          "format": "int32",
                          "description": "Current page number."
                        },
                        "more_records": {
                          "type": "boolean",
                          "description": "Indicates if more records are available."
                        }
                      },
                      "required": [
                        "per_page",
                        "count",
                        "page",
                        "more_records"
                      ]
                    }
                  },
                  "required": [
                    "recycle_bin",
                    "info"
                  ],
                  "description": "Property value",
                  "additionalProperties": false
                }
              }
            }
          },
          "204": {
            "description": "No content: the request succeeded but there is no data to return."
          }
        }
      },
      "delete": {
        "operationId": "deleteRecycleBinRecords",
        "summary": "Delete multiple recycle bin records",
        "description": "Permanently deletes matching recycle-bin records. This is a destructive operation and may partially succeed for some items; check 207 responses for per-item results.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Filters"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response with per-item result(s).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultList"
                }
              }
            }
          },
          "207": {
            "description": "Multi-status: some items succeeded while others failed. Check per-item results in the response body.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "recycle_bin": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "maxLength": 100,
                            "description": "Record ID"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "success",
                              "error"
                            ],
                            "description": "Operation status for this item"
                          },
                          "code": {
                            "type": "string",
                            "maxLength": 100,
                            "description": "Result code (e.g., SUCCESS, CANNOT_DELETE, INVALID_DATA)"
                          },
                          "message": {
                            "type": "string",
                            "maxLength": 500,
                            "description": "Human-readable message"
                          },
                          "details": {
                            "type": "object",
                            "additionalProperties": true,
                            "description": "Additional details about the operation result"
                          }
                        },
                        "required": [
                          "id",
                          "status",
                          "code",
                          "message"
                        ],
                        "additionalProperties": false,
                        "description": "Result for individual delete operation"
                      },
                      "maxItems": 200,
                      "description": "Array of per-item results"
                    }
                  },
                  "required": [
                    "recycle_bin"
                  ],
                  "additionalProperties": false,
                  "description": "Multi-status response containing results for each deletion attempt"
                }
              }
            }
          },
          "400": {
            "description": "Bad request — invalid parameters or payload. See response body for error details.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ],
                      "description": "Status"
                    },
                    "code": {
                      "type": "string",
                      "description": "Error code",
                      "maxLength": 100
                    },
                    "message": {
                      "type": "string",
                      "maxLength": 500,
                      "description": "Error message"
                    },
                    "details": {
                      "type": "object",
                      "description": "Error details",
                      "additionalProperties": true
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "message",
                    "details"
                  ],
                  "description": "Error response",
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "iam-oauth2-schema": [
              "ZohoCRM.settings.recycle_bin.DELETE"
            ]
          }
        ]
      }
    },
    "/settings/recycle_bin/actions/restore": {
      "post": {
        "operationId": "restoreRecycleBinRecords",
        "summary": "Restore multiple recycle bin records",
        "description": "Restores multiple recycle-bin records based on provided criteria. You can specify records to restore using one of: `ids`, `filters`, or `restore_all_records`. Only one of these fields should be provided; supplying multiple will result in an error. When the number of records to restore (including child records) exceeds 1000, the operation is scheduled as a background job (202 status). For 1000 or fewer records, restoration happens immediately (200/207 status).",
        "security": [
          {
            "iam-oauth2-schema": [
              "ZohoCRM.settings.recycle_bin.UPDATE"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Request payload for restoring recycle bin records.",
                "additionalProperties": false,
                "properties": {
                  "ids": {
                    "type": "array",
                    "description": "Array of recycle bin record IDs to restore. Mutually exclusive with `filters` and `restore_all_records`.",
                    "maxItems": 200,
                    "items": {
                      "type": "string",
                      "maxLength": 100,
                      "description": "Recycle bin record identifier."
                    }
                  },
                  "filters": {
                    "type": "object",
                    "description": "Filter criteria to select records for restoration. Mutually exclusive with `ids` and `restore_all_records`. Only 'AND' group operator is supported.",
                    "additionalProperties": false,
                    "properties": {
                      "group_operator": {
                        "type": "string",
                        "enum": [
                          "AND"
                        ],
                        "description": "Logical operator for combining filter conditions. Only 'AND' is supported."
                      },
                      "group": {
                        "type": "array",
                        "description": "Array of filter conditions.",
                        "maxItems": 20,
                        "items": {
                          "type": "object",
                          "description": "Individual filter condition.",
                          "additionalProperties": false,
                          "properties": {
                            "field": {
                              "type": "object",
                              "description": "Field to filter on.",
                              "additionalProperties": false,
                              "properties": {
                                "api_name": {
                                  "type": "string",
                                  "maxLength": 100,
                                  "description": "API name of the field (e.g., 'display_name', 'module')."
                                }
                              },
                              "required": [
                                "api_name"
                              ]
                            },
                            "comparator": {
                              "type": "string",
                              "description": "Comparison operator (e.g., 'equal', 'contains').",
                              "maxLength": 50
                            },
                            "value": {
                              "description": "Value to compare against.",
                              "oneOf": [
                                {
                                  "type": "string",
                                  "description": "String value",
                                  "maxLength": 500
                                },
                                {
                                  "type": "number",
                                  "description": "Number value"
                                },
                                {
                                  "type": "boolean",
                                  "description": "Boolean value"
                                }
                              ]
                            }
                          },
                          "required": [
                            "field",
                            "comparator",
                            "value"
                          ]
                        }
                      }
                    },
                    "required": [
                      "group_operator",
                      "group"
                    ]
                  },
                  "restore_all_records": {
                    "type": "boolean",
                    "description": "If set to true, restores all records in the recycle bin. Mutually exclusive with `ids` and `filters`. If set to false, either `ids` or `filters` must be provided."
                  }
                },
                "oneOf": [
                  {
                    "required": [
                      "ids"
                    ],
                    "description": "Restore specific records by IDs."
                  },
                  {
                    "required": [
                      "filters"
                    ],
                    "description": "Restore records matching filter criteria."
                  },
                  {
                    "required": [
                      "restore_all_records"
                    ],
                    "description": "Restore all records in the recycle bin."
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response with per-item result(s). Returned when restoration completes immediately (1000 or fewer records including children).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultList"
                }
              }
            }
          },
          "202": {
            "description": "Accepted — restoration has been scheduled as a background job. Returned when the number of records (including child records) exceeds 1000.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultList"
                }
              }
            }
          },
          "207": {
            "description": "Multi-status: some items succeeded while others failed. Check per-item results in the response body.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "recycle_bin": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "maxLength": 100,
                            "description": "Record ID"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "success",
                              "error"
                            ],
                            "description": "Operation status for this item"
                          },
                          "code": {
                            "type": "string",
                            "maxLength": 100,
                            "description": "Result code (e.g., SUCCESS, INVALID_DATA, SCHEDULED)"
                          },
                          "message": {
                            "type": "string",
                            "maxLength": 500,
                            "description": "Human-readable message"
                          },
                          "details": {
                            "type": "object",
                            "additionalProperties": true,
                            "description": "Additional details about the operation result"
                          }
                        },
                        "required": [
                          "status",
                          "code",
                          "message"
                        ],
                        "additionalProperties": false,
                        "description": "Result for individual restore operation"
                      },
                      "maxItems": 200,
                      "description": "Array of per-item results"
                    }
                  },
                  "required": [
                    "recycle_bin"
                  ],
                  "additionalProperties": false,
                  "description": "Multi-status response containing results for each restoration attempt"
                }
              }
            }
          },
          "400": {
            "description": "Bad request — invalid request payload or ambiguous input. See response body for error details.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ],
                      "description": "Status"
                    },
                    "code": {
                      "type": "string",
                      "description": "Error code",
                      "maxLength": 100
                    },
                    "message": {
                      "type": "string",
                      "maxLength": 500,
                      "description": "Error message"
                    },
                    "details": {
                      "type": "object",
                      "description": "Error details",
                      "additionalProperties": true
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "message",
                    "details"
                  ],
                  "description": "Error response",
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/settings/recycle_bin/actions/count": {
      "get": {
        "operationId": "getRecycleBinCounts",
        "summary": "Get recycle bin counts",
        "description": "Returns the count of items in the recycle bin. Useful for monitoring or quick summaries.",
        "security": [
          {
            "iam-oauth2-schema": [
              "ZohoCRM.settings.recycle_bin.READ"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response containing the total count of recycle bin items.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer",
                      "format": "int32",
                      "description": "Property value"
                    }
                  },
                  "required": [
                    "count"
                  ],
                  "description": "Property value",
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/settings/recycle_bin/actions/empty": {
      "post": {
        "operationId": "emptyRecycleBin",
        "summary": "Empty the recycle bin",
        "description": "Permanently deletes all records from the Recycle Bin. This action is irreversible, as deleted records cannot be restored after this operation. When the number of records in the Recycle Bin exceeds 1000 (including child records), the deletion will be scheduled as a background job (202 status). If the count is 1000 or fewer, the records are deleted immediately (200 status). Only users with the Admin profile can empty the Recycle Bin.",
        "security": [
          {
            "iam-oauth2-schema": [
              "ZohoCRM.settings.recycle_bin.UPDATE"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response — recycle bin emptied immediately (1000 or fewer records).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "SUCCESS"
                      ],
                      "description": "Result code",
                      "maxLength": 100
                    },
                    "details": {
                      "type": "object",
                      "description": "Additional details",
                      "additionalProperties": true
                    },
                    "message": {
                      "type": "string",
                      "maxLength": 500,
                      "description": "Success message"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "success"
                      ],
                      "description": "Operation status"
                    }
                  },
                  "required": [
                    "code",
                    "details",
                    "message",
                    "status"
                  ],
                  "additionalProperties": false,
                  "description": "Success response for empty recycle bin operation"
                }
              }
            }
          },
          "202": {
            "description": "Accepted — emptying recycle bin has been scheduled as a background job (more than 1000 records including children).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "SCHEDULED"
                      ],
                      "description": "Result code",
                      "maxLength": 100
                    },
                    "details": {
                      "type": "object",
                      "description": "Additional details",
                      "additionalProperties": true
                    },
                    "message": {
                      "type": "string",
                      "maxLength": 500,
                      "description": "Message indicating scheduled operation"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "success"
                      ],
                      "description": "Operation status"
                    }
                  },
                  "required": [
                    "code",
                    "details",
                    "message",
                    "status"
                  ],
                  "additionalProperties": false,
                  "description": "Scheduled response for empty recycle bin operation"
                }
              }
            }
          },
          "400": {
            "description": "Bad request — invalid request method or non-admin user attempting the operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ],
                      "description": "Status"
                    },
                    "code": {
                      "type": "string",
                      "description": "Error code",
                      "maxLength": 100
                    },
                    "message": {
                      "type": "string",
                      "maxLength": 500,
                      "description": "Error message"
                    },
                    "details": {
                      "type": "object",
                      "description": "Error details",
                      "additionalProperties": true
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "message",
                    "details"
                  ],
                  "description": "Error response",
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — OAUTH scope mismatch.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ],
                      "description": "Status"
                    },
                    "code": {
                      "type": "string",
                      "description": "Error code",
                      "maxLength": 100
                    },
                    "message": {
                      "type": "string",
                      "maxLength": 500,
                      "description": "Error message"
                    },
                    "details": {
                      "type": "object",
                      "description": "Error details",
                      "additionalProperties": true
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "message",
                    "details"
                  ],
                  "description": "Error response",
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Not Found — invalid URL pattern.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ],
                      "description": "Status"
                    },
                    "code": {
                      "type": "string",
                      "description": "Error code",
                      "maxLength": 100
                    },
                    "message": {
                      "type": "string",
                      "maxLength": 500,
                      "description": "Error message"
                    },
                    "details": {
                      "type": "object",
                      "description": "Error details",
                      "additionalProperties": true
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "message",
                    "details"
                  ],
                  "description": "Error response",
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error — unexpected error.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ],
                      "description": "Status"
                    },
                    "code": {
                      "type": "string",
 

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