Zoho CRM Workflow Rules

WorkflowRule v8 OAS. Published by Zoho in its first-party OpenAPI 3.1.0 repository github.com/zoho/crm-oas; 12 operation(s).

OpenAPI Specification

zoho-crm-workflow-rules-openapi.json Raw ↑
{
  "openapi": "3.1.0",
  "info": {
    "title": "Workflow Rules",
    "description": "WorkflowRule v8 OAS",
    "version": "8"
  },
  "servers": [
    {
      "url": "https://zohoapis.{dc}/crm/{version}",
      "description": "Zoho API Base URL",
      "variables": {
        "dc": {
          "enum": [
            "com",
            "eu",
            "in",
            "ca",
            "au",
            "sa",
            "ae"
          ],
          "default": "com"
        },
        "version": {
          "description": "API version identifier for endpoint routing",
          "default": "v8"
        }
      }
    }
  ],
  "paths": {
    "/settings/automation/workflow_rules": {
      "post": {
        "summary": "Configure a Workflow rule",
        "description": "To configure a Workflow rule",
        "operationId": "postWorkflowRule",
        "security": [
          {
            "iam-oauth2-schema": [
              "ZohoCRM.settings.workflow_rules.CREATE"
            ]
          }
        ],
        "requestBody": {
          "description": "Request body",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostWorkflowRuleSchema"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Workflow Rule created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowSuccessSchema"
                }
              }
            }
          },
          "400": {
            "description": "Auto-generated from ApiDefinition for INVALID_DATA",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "description": "Wrapped error response with workflow_rules",
                      "properties": {
                        "workflow_rules": {
                          "type": "array",
                          "description": "Array of error objects",
                          "items": {
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/DependentFieldMissingSchema"
                              },
                              {
                                "$ref": "#/components/schemas/ExpectedFieldMissingSchema"
                              },
                              {
                                "$ref": "#/components/schemas/AmbiguityDuringProcessingSchema"
                              },
                              {
                                "$ref": "#/components/schemas/LimitExceededSchema"
                              },
                              {
                                "$ref": "#/components/schemas/DependentMisMatchSchema"
                              },
                              {
                                "$ref": "#/components/schemas/AlreadyUsedSchema"
                              }
                            ]
                          },
                          "maxItems": 25
                        }
                      },
                      "required": [
                        "workflow_rules"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NoPermissionSchema"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "updateWorkflowRule",
        "summary": "Update Workflow Rule For the Given ID in Body",
        "description": "Updates an existing workflow rule with partial data.",
        "security": [
          {
            "iam-oauth2-schema": [
              "ZohoCRM.settings.workflow_rules.UPDATE"
            ]
          }
        ],
        "requestBody": {
          "description": "Request body",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWorkflowRuleSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Workflow Rule updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowSuccessSchema"
                }
              }
            }
          },
          "400": {
            "description": "Auto-generated from ApiDefinition for INVALID_DATA",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "description": "Wrapped error response with workflow_rules",
                      "properties": {
                        "workflow_rules": {
                          "type": "array",
                          "description": "Array of error objects",
                          "items": {
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/DependentFieldMissingSchema"
                              },
                              {
                                "$ref": "#/components/schemas/AlreadyUsedSchema"
                              },
                              {
                                "$ref": "#/components/schemas/ExpectedFieldMissingSchema"
                              },
                              {
                                "$ref": "#/components/schemas/AmbiguityDuringProcessingSchema"
                              },
                              {
                                "$ref": "#/components/schemas/LimitExceededSchema"
                              }
                            ]
                          },
                          "maxItems": 25
                        }
                      },
                      "required": [
                        "workflow_rules"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NoPermissionSchema"
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "Get All WorkflowRules",
        "description": "To retrieve the list of Workflow rules",
        "operationId": "getWorkflowRules",
        "security": [
          {
            "iam-oauth2-schema": [
              "ZohoCRM.settings.workflow_rules.READ"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ParamQueryPageSchema"
          },
          {
            "$ref": "#/components/parameters/ParamQueryPerPageSchema"
          },
          {
            "$ref": "#/components/parameters/ParamQueryModuleSchema"
          },
          {
            "$ref": "#/components/parameters/ParamQueryStatusActiveSchema"
          },
          {
            "$ref": "#/components/parameters/ParamQueryExecuteOnSchema"
          },
          {
            "$ref": "#/components/parameters/ParamQuerySortOrderSchema"
          },
          {
            "$ref": "#/components/parameters/ParamQuerySortBySchema"
          },
          {
            "$ref": "#/components/parameters/ParamQueryIncludeInnerDetailsSchema"
          },
          {
            "$ref": "#/components/parameters/ParamQueryFilterSchema"
          }
        ],
        "responses": {
          "200": {
            "description": "OK - Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowRulesGetResponseSchema"
                }
              }
            }
          },
          "400": {
            "description": "Auto-generated from ApiDefinition for INVALID_DATA",
            "content": {
              "application/json": {
                "schema": {
                  "x-zs-$id": "WorkflowRuleGetAllErrorResponses",
                  "$ref": "#/components/schemas/InvalidDataNoApiNameAndPathSchema"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NoPermissionSchema"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteWorkflowRules",
        "security": [
          {
            "iam-oauth2-schema": [
              "ZohoCRM.settings.workflow_rules.DELETE"
            ]
          }
        ],
        "summary": "Delete Multiple Workflow Rules",
        "description": "Delete Multiple Workflow Rules",
        "parameters": [
          {
            "$ref": "#/components/parameters/ParamQueryIdsSchema"
          }
        ],
        "responses": {
          "200": {
            "description": "Workflow Rule deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowSuccessSchema"
                }
              }
            }
          },
          "207": {
            "description": "Multi Status Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "description": "Wrapped error response with workflow_rules",
                  "properties": {
                    "workflow_rules": {
                      "type": "array",
                      "description": "Array of error objects",
                      "items": {
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/InvalidDataNoApiNameAndPathSchema"
                          },
                          {
                            "$ref": "#/components/schemas/SuccessResponseNestedSchema"
                          }
                        ]
                      },
                      "maxItems": 10
                    }
                  },
                  "required": [
                    "workflow_rules"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/InvalidDataNoApiNameAndPathSchema"
                    },
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "description": "Wrapped error response with workflow_rules",
                      "properties": {
                        "workflow_rules": {
                          "type": "array",
                          "description": "Array of error objects",
                          "items": {
                            "$ref": "#/components/schemas/InvalidDataNoApiNameAndPathSchema"
                          },
                          "maxItems": 10
                        }
                      },
                      "required": [
                        "workflow_rules"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NoPermissionSchema"
                }
              }
            }
          }
        }
      }
    },
    "/settings/automation/workflow_rules/{id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ParamQueryIdSchema"
        }
      ],
      "put": {
        "operationId": "updateWorkflowRuleById",
        "summary": "Update Workflow Rule By ID",
        "security": [
          {
            "iam-oauth2-schema": [
              "ZohoCRM.settings.workflow_rules.UPDATE"
            ]
          }
        ],
        "description": "Updates an existing workflow rule with partial data.",
        "requestBody": {
          "description": "Request body",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWorkflowRuleSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Workflow Rule updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowSuccessSchema"
                }
              }
            }
          },
          "400": {
            "description": "Auto-generated from ApiDefinition for INVALID_DATA",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/UrlIdMissingSchema"
                    },
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "description": "Wrapped error response with workflow_rules",
                      "properties": {
                        "workflow_rules": {
                          "type": "array",
                          "description": "Array of error objects",
                          "items": {
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/DependentFieldMissingSchema"
                              },
                              {
                                "$ref": "#/components/schemas/AlreadyUsedSchema"
                              },
                              {
                                "$ref": "#/components/schemas/ExpectedFieldMissingSchema"
                              },
                              {
                                "$ref": "#/components/schemas/AmbiguityDuringProcessingSchema"
                              },
                              {
                                "$ref": "#/components/schemas/LimitExceededSchema"
                              }
                            ]
                          },
                          "maxItems": 25
                        }
                      },
                      "required": [
                        "workflow_rules"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NoPermissionSchema"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "getWorkflowRuleById",
        "security": [
          {
            "iam-oauth2-schema": [
              "ZohoCRM.settings.workflow_rules.READ"
            ]
          }
        ],
        "summary": "Retrieve a single workflow",
        "description": "To retrieve the details of a specific Workflow rule in your Zoho CRM account.",
        "responses": {
          "200": {
            "description": "OK - Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowRuleSingleGetResponseSchema"
                }
              }
            }
          },
          "204": {
            "description": "No Content - Successful response with no body"
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NoPermissionSchema"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteWorkflowRuleById",
        "summary": "Delete Workflow Rule By ID",
        "security": [
          {
            "iam-oauth2-schema": [
              "ZohoCRM.settings.workflow_rules.DELETE"
            ]
          }
        ],
        "description": "Deletes an existing workflow rule by its ID.",
        "responses": {
          "200": {
            "description": "Workflow Rule deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowSuccessSchema"
                }
              }
            }
          },
          "400": {
            "description": "Auto-generated from ApiDefinition for INVALID_DATA",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UrlIdMissingSchema"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NoPermissionSchema"
                }
              }
            }
          }
        }
      }
    },
    "/settings/automation/workflow_rules/actions/actions_count": {
      "get": {
        "summary": "Get Workflow Rule actions count",
        "description": "To retrieve the total number of actions configured in the specified Workflow rules, including both instant and scheduled actions. The response includes a count of actions, categorized by action type.",
        "operationId": "getActionsCount",
        "security": [
          {
            "iam-oauth2-schema": [
              "ZohoCRM.settings.workflow_rules.READ"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ParamQueryIdsSchema"
          }
        ],
        "responses": {
          "200": {
            "description": "OK - Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowActionCountsResponseSchema"
                }
              }
            }
          },
          "204": {
            "description": "No Content - Successful response with no body"
          },
          "400": {
            "description": "Bad Request - The request cannot be processed due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvalidDataNoApiNameAndPathSchema"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NoPermissionSchema"
                }
              }
            }
          }
        }
      }
    },
    "/settings/automation/workflow_rules/actions/module_specific_count": {
      "get": {
        "summary": "Get Workflow Rule actions count for each module",
        "description": "Get Workflow Rule actions count for each module",
        "operationId": "getModuleSpecificActionsCount",
        "security": [
          {
            "iam-oauth2-schema": [
              "ZohoCRM.settings.workflow_rules.READ"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ParamQueryModuleSchema"
          }
        ],
        "responses": {
          "200": {
            "description": "Success for specific module",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModuleSpecificCountsResponseAllSchema"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - The request cannot be processed due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvalidDataNoApiNameAndPathSchema"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NoPermissionSchema"
                }
              }
            }
          }
        }
      }
    },
    "/settings/automation/workflow_rules/actions/rules_count": {
      "get": {
        "summary": "Get Workflow Rules count",
        "description": "To fetch the limit and usage details of workflow rules and actions in your Zoho CRM account. Use this API to track how many rules and actions are configured and how many more you can create.",
        "security": [
          {
            "iam-oauth2-schema": [
              "ZohoCRM.settings.workflow_rules.READ"
            ]
          }
        ],
        "operationId": "getRulesCount",
        "responses": {
          "200": {
            "description": "OK - Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowRulesCountResponseSchema"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NoPermissionSchema"
                }
              }
            }
          }
        }
      }
    },
    "/settings/automation/workflow_rules/{workflowRuleId}/actions/usage": {
      "get": {
        "summary": "To retrieve Workflow Rule usage",
        "description": "To retrieve the usage report of a specific Workflow Rule in your Zoho CRM organization. It provides a count of how many times the workflow was triggered and the success or failure metrics for each associated action within a specified date range.",
        "operationId": "getUsage",
        "security": [
          {
            "iam-oauth2-schema": [
              "ZohoCRM.settings.workflow_rules.READ"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ParamQueryExecutedFrom"
          },
          {
            "$ref": "#/components/parameters/ParamQueryExecutedTill"
          },
          {
            "$ref": "#/components/parameters/ParamPathWorkflowRuleId"
          }
        ],
        "responses": {
          "200": {
            "description": "OK - Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowRuleUsageResponseSchema"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - The request cannot be processed due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvalidDataNoApiNameAndPathSchema"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Authentication is required but authentication is missing or is not valid.",
            "content": {
              "application/json": {
                "schema": {
                  "x-zs-$id": "UnAuthorizedErrorResponseSchema",
                  "$ref": "#/components/schemas/InvalidDataNoApiNameAndPathSchema"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NoPermissionSchema"
                }
              }
            }
          }
        }
      }
    },
    "/settings/automation/workflow_rules/actions/reorder": {
      "put": {
        "summary": "To reorder workflow rules",
        "description": "To update the execution order of Workflow rules in a specific module in Zoho CRM. By default, workflow rules are executed in the order in which they are created.",
        "operationId": "putReorder",
        "security": [
          {
            "iam-oauth2-schema": [
              "ZohoCRM.settings.workflow_rules.UPDATE"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ParamQueryModuleSchema"
          }
        ],
        "requestBody": {
          "description": "Request body",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReorderWorkflowRulesRequestSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK - Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReOrderSuccessResponseSchema"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - The request cannot be processed due to invalid syntax.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/InvalidDataNoApiNameAndPathSchema"
                    },
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "description": "Wrapped error response with reorder",
                      "properties": {
                        "reorder": {
                          "type": "array",
                          "description": "Array of error objects",
                          "maxItems": 10
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NoPermissionSchema"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "WorkflowSuccessSchema": {
        "type": "object",
        "additionalProperties": false,
        "description": "Workflow Rule created successfully",
        "properties": {
          "workflow_rules": {
            "type": "array",
            "description": "Field: workflow_rules",
            "items": {
              "$ref": "#/components/schemas/SuccessResponseNestedSchema"
            },
            "maxItems": 200
          }
        }
      },
      "ReOrderSuccessResponseSchema": {
        "type": "object",
        "additionalProperties": false,
        "description": "Workflow Rule created successfully",
        "properties": {
          "reorder": {
            "type": "array",
            "description": "Field: workflow_rules",
            "items": {
              "$ref": "#/components/schemas/SuccessResponseNestedSchema"
            },
            "maxItems": 125
          }
        }
      },
      "NoPermissionSchema": {
        "type": "object",
        "additionalProperties": false,
        "description": "No permission to access the feature/module",
        "properties": {
          "code": {
            "type": "string",
            "description": "Error code",
            "enum": [
              "NO_PERMISSION"
            ]
          },
          "message": {
            "type": "string",
            "description": "Error message",
            "enum": [
              "feature not available in this edition"
            ]
          },
          "status": {
            "type": "string",
            "description": "Error status",
            "enum": [
              "error"
            ]
          },
          "details": {
            "type": "object",
            "additionalProperties": false,
            "description": "List of permissions needed to access the feature",
            "properties": {
              "permissions": {
                "type": "array",
                "maxItems": 10,
                "items": {
                  "type": "string",
                  "maxLength": 255,
                  "description": "Required permission name"
                },
                "description": "List of Permissions needed"
              }
            },
            "required": [
              "permissions"
            ]
          }
        },
        "required": [
          "code",
          "message",
          "status",
          "details"
        ],
        "title": "Error Response Core"
      },
      "SuccessResponseNestedSchema": {
        "type": "object",
        "additionalProperties": false,
        "description": "Nested schema for workflow_rules",
        "properties": {
          "code": {
            "type": "string",
            "description": "Field: code",
            "maxLength": 255
          },
          "details": {
            "$ref": "#/components/schemas/SuccessResponseDetailsSchema"
          },
          "message": {
            "type": "string",
            "description": "Field: message",
            "enum": [
              "workflow created",
              "workflow updated",
              "workflow deleted",
              "WorkFlow Rule deleted successfully",
              "rules reordered successfully",
              "Workflow cloned successfully"
            ]
          },
          "status": {
            "type": "string",
            "description": "Field: status",
            "maxLength": 7
          }
        }
      },
      "SuccessResponseDetailsSchema": {
        "type": "object",
        "additionalProperties": false,
        "description": "Nested schema for details",
        "properties": {
          "id": {
            "type": "string",
            "description": "Field: id",
            "maxLength": 255
          }
        }
      },
      "DependentFieldMissingSchema": {
        "type": "object",
        "additionalProperties": false,
        "description": "Action details are missing",
        "properties": {
          "code": {
            "type": "string",
            "description": "Error code",
            "enum": [
              "DEPENDENT_FIELD_MISSING"
            ]
          },
          "details": {
            "type": "object",
            "additionalProperties": false,
            "description": "Error details with validation information",
            "properties": {
              "dependee": {
                "type": "object",
                "additionalProperties": false,
                "description": "Detail field: dependee",
                "properties": {
                  "api_name": {
                    "type": "string",
                    "description": "Nested detail field: api_name",
                    "maxLength": 255
                  },
                  "json_path": {
                    "type": "string",
                    "description": "Nested detail field: json_path",
                    "maxLength": 1000
                  }
                }
              },
              "api_name": {
                "type": "string",
                "description": "Detail field: api_name",
     

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