Zoho CRM Unblock Email

Unblock Email. Published by Zoho in its first-party OpenAPI 3.1.0 repository github.com/zoho/crm-oas; 2 operation(s).

OpenAPI Specification

zoho-crm-unblock-email-openapi.json Raw ↑
{
  "openapi": "3.1.0",
  "info": {
    "title": "Unblock Email",
    "description": "Unblock Email",
    "version": "8"
  },
  "servers": [
    {
      "url": "https://zohoapis.{dc}/crm/{version}",
      "description": "API Server URL",
      "variables": {
        "dc": {
          "enum": [
            "com",
            "eu",
            "in",
            "cn",
            "au",
            "ca",
            "jp"
          ],
          "default": "com",
          "description": "API Server URL TLD"
        },
        "version": {
          "description": "API Version",
          "default": "v8"
        }
      }
    }
  ],
  "security": [
    {
      "iam-oauth2-schema": [
        "ZohoCRM.settings.emails.ALL"
      ]
    }
  ],
  "paths": {
    "/{module}/actions/unblock_email": {
      "post": {
        "operationId": "unblockEmailByModule",
        "summary": "Unblock bulk emails in a module",
        "description": "Unblock emails for multiple records in a module.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Module"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Request body for unblocking emails in bulk",
                "additionalProperties": false,
                "properties": {
                  "ids": {
                    "type": "array",
                    "description": "List of record IDs to unblock emails for",
                    "maxItems": 100,
                    "items": {
                      "type": "string",
                      "description": "Record ID",
                      "maxLength": 50
                    }
                  },
                  "unblock_fields": {
                    "type": "array",
                    "description": "Fields to unblock",
                    "maxItems": 2,
                    "items": {
                      "type": "string",
                      "description": "Field name to unblock",
                      "enum": [
                        "Email"
                      ]
                    }
                  }
                },
                "required": [
                  "ids",
                  "unblock_fields"
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful response when emails are unblocked",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Response object containing unblock email results",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "array",
                      "description": "Array of unblock operation results",
                      "maxItems": 100,
                      "items": {
                        "type": "object",
                        "description": "Individual record unblock result",
                        "additionalProperties": false,
                        "properties": {
                          "code": {
                            "type": "string",
                            "description": "Status code of the operation",
                            "enum": [
                              "SUCCESS"
                            ]
                          },
                          "details": {
                            "type": "object",
                            "description": "Details of the unblocked record",
                            "additionalProperties": false,
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "ID of the unblocked record",
                                "maxLength": 50
                              }
                            },
                            "required": [
                              "id"
                            ]
                          },
                          "message": {
                            "type": "string",
                            "description": "Response message",
                            "maxLength": 255
                          },
                          "status": {
                            "type": "string",
                            "description": "Status of the operation",
                            "maxLength": 50
                          }
                        },
                        "required": [
                          "code",
                          "details",
                          "message",
                          "status"
                        ]
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request - invalid parameters or data",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "description": "Error response for authentication or validation issues",
                      "additionalProperties": false,
                      "properties": {
                        "status": {
                          "type": "string",
                          "description": "Error status",
                          "enum": [
                            "error"
                          ]
                        },
                        "code": {
                          "type": "string",
                          "description": "Error code",
                          "enum": [
                            "INVALID_URL_PATTERN",
                            "INVALID_DATA",
                            "INVALID_REQUEST_METHOD",
                            "INVALID_TOKEN"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "description": "Error message",
                          "enum": [
                            "invalid oauth token"
                          ]
                        },
                        "details": {
                          "type": "object",
                          "description": "Additional error details",
                          "additionalProperties": true
                        }
                      },
                      "required": [
                        "status",
                        "code",
                        "message",
                        "details"
                      ]
                    },
                    {
                      "type": "object",
                      "description": "Error response for module or request issues",
                      "additionalProperties": false,
                      "properties": {
                        "status": {
                          "type": "string",
                          "description": "Error status",
                          "enum": [
                            "error"
                          ]
                        },
                        "code": {
                          "type": "string",
                          "description": "Error code",
                          "enum": [
                            "INVALID_URL_PATTERN",
                            "INVALID_DATA",
                            "INVALID_REQUEST_METHOD",
                            "INVALID_MODULE"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "description": "Error message",
                          "enum": [
                            "invalid oauth token",
                            "Invalid record provided",
                            "the module name given seems to be invalid"
                          ]
                        },
                        "details": {
                          "type": "object",
                          "description": "Additional error details with resource path index",
                          "additionalProperties": false,
                          "properties": {
                            "resource_path_index": {
                              "type": "integer",
                              "description": "Index of the resource in the path",
                              "format": "int32"
                            }
                          }
                        }
                      },
                      "required": [
                        "status",
                        "code",
                        "message",
                        "details"
                      ]
                    },
                    {
                      "type": "object",
                      "description": "Error response for data validation or mandatory field issues",
                      "additionalProperties": false,
                      "properties": {
                        "status": {
                          "type": "string",
                          "description": "Error status",
                          "enum": [
                            "error"
                          ]
                        },
                        "code": {
                          "type": "string",
                          "description": "Error code",
                          "enum": [
                            "INVALID_DATA",
                            "INVALID_MODULE",
                            "MANDATORY_NOT_FOUND"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "description": "Error message",
                          "maxLength": 500
                        },
                        "details": {
                          "oneOf": [
                            {
                              "type": "object",
                              "description": "Details with expected data type information",
                              "additionalProperties": false,
                              "properties": {
                                "expected_data_type": {
                                  "type": "string",
                                  "description": "Expected data type",
                                  "maxLength": 50
                                },
                                "api_name": {
                                  "type": "string",
                                  "description": "API name of the field",
                                  "maxLength": 255
                                },
                                "json_path": {
                                  "type": "string",
                                  "description": "JSON path to the field",
                                  "maxLength": 1000
                                }
                              }
                            },
                            {
                              "type": "object",
                              "description": "Details without expected data type",
                              "additionalProperties": false,
                              "properties": {
                                "api_name": {
                                  "type": "string",
                                  "description": "API name of the field",
                                  "maxLength": 255
                                },
                                "json_path": {
                                  "type": "string",
                                  "description": "JSON path to the field",
                                  "maxLength": 1000
                                }
                              }
                            }
                          ]
                        }
                      },
                      "required": [
                        "status",
                        "code",
                        "message",
                        "details"
                      ]
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "iam-oauth2-schema": [
              "ZohoCRM.settings.emails.CREATE"
            ]
          }
        ]
      }
    },
    "/{module}/{id}/actions/unblock_email": {
      "post": {
        "operationId": "unblockEmailById",
        "summary": "Unblock single email",
        "description": "Unblock email for a single record in a module.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Module"
          },
          {
            "$ref": "#/components/parameters/Id"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Request body for unblocking email for a single record",
                "additionalProperties": false,
                "properties": {
                  "unblock_fields": {
                    "type": "array",
                    "description": "Fields to unblock",
                    "maxItems": 1,
                    "items": {
                      "type": "string",
                      "description": "Field name to unblock",
                      "enum": [
                        "Email"
                      ]
                    }
                  }
                },
                "required": [
                  "unblock_fields"
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful response when email is unblocked",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Response object for single record email unblock",
                  "additionalProperties": false,
                  "properties": {
                    "code": {
                      "type": "string",
                      "description": "Status code of the operation",
                      "enum": [
                        "SUCCESS"
                      ]
                    },
                    "details": {
                      "type": "object",
                      "description": "Details of the unblocked record",
                      "additionalProperties": false,
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "ID of the unblocked record",
                          "maxLength": 50
                        }
                      },
                      "required": [
                        "id"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Response message",
                      "maxLength": 255
                    },
                    "status": {
                      "type": "string",
                      "description": "Status of the operation",
                      "maxLength": 255
                    }
                  },
                  "required": [
                    "code",
                    "details",
                    "message",
                    "status"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request - invalid parameters or data",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "description": "Error response for authentication or validation issues",
                      "additionalProperties": false,
                      "properties": {
                        "status": {
                          "type": "string",
                          "description": "Error status",
                          "enum": [
                            "error"
                          ]
                        },
                        "code": {
                          "type": "string",
                          "description": "Error code",
                          "enum": [
                            "INVALID_URL_PATTERN",
                            "INVALID_DATA",
                            "INVALID_REQUEST_METHOD",
                            "INVALID_TOKEN"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "description": "Error message",
                          "enum": [
                            "invalid oauth token"
                          ]
                        },
                        "details": {
                          "type": "object",
                          "description": "Additional error details",
                          "additionalProperties": true
                        }
                      },
                      "required": [
                        "status",
                        "code",
                        "message",
                        "details"
                      ]
                    },
                    {
                      "type": "object",
                      "description": "Error response for module or request issues",
                      "additionalProperties": false,
                      "properties": {
                        "status": {
                          "type": "string",
                          "description": "Error status",
                          "enum": [
                            "error"
                          ]
                        },
                        "code": {
                          "type": "string",
                          "description": "Error code",
                          "enum": [
                            "INVALID_URL_PATTERN",
                            "INVALID_DATA",
                            "INVALID_REQUEST_METHOD",
                            "INVALID_MODULE"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "description": "Error message",
                          "enum": [
                            "invalid oauth token",
                            "Invalid record provided",
                            "the module name given seems to be invalid"
                          ]
                        },
                        "details": {
                          "type": "object",
                          "description": "Additional error details with resource path index",
                          "additionalProperties": false,
                          "properties": {
                            "resource_path_index": {
                              "type": "integer",
                              "description": "Index of the resource in the path",
                              "format": "int32"
                            }
                          }
                        }
                      },
                      "required": [
                        "status",
                        "code",
                        "message",
                        "details"
                      ]
                    },
                    {
                      "type": "object",
                      "description": "Error response for data validation or mandatory field issues",
                      "additionalProperties": false,
                      "properties": {
                        "status": {
                          "type": "string",
                          "description": "Error status",
                          "enum": [
                            "error"
                          ]
                        },
                        "code": {
                          "type": "string",
                          "description": "Error code",
                          "enum": [
                            "INVALID_DATA",
                            "INVALID_MODULE",
                            "MANDATORY_NOT_FOUND"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "description": "Error message",
                          "maxLength": 500
                        },
                        "details": {
                          "oneOf": [
                            {
                              "type": "object",
                              "description": "Details with expected data type information",
                              "additionalProperties": false,
                              "properties": {
                                "expected_data_type": {
                                  "type": "string",
                                  "description": "Expected data type",
                                  "maxLength": 255
                                },
                                "api_name": {
                                  "type": "string",
                                  "description": "API name of the field",
                                  "maxLength": 255
                                },
                                "json_path": {
                                  "type": "string",
                                  "description": "JSON path to the field",
                                  "maxLength": 1000
                                }
                              }
                            },
                            {
                              "type": "object",
                              "description": "Details without expected data type",
                              "additionalProperties": false,
                              "properties": {
                                "api_name": {
                                  "type": "string",
                                  "description": "API name of the field",
                                  "maxLength": 255
                                },
                                "json_path": {
                                  "type": "string",
                                  "description": "JSON path to the field",
                                  "maxLength": 1000
                                }
                              }
                            }
                          ]
                        }
                      },
                      "required": [
                        "status",
                        "code",
                        "message",
                        "details"
                      ]
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "iam-oauth2-schema": [
              "ZohoCRM.settings.emails.CREATE"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "parameters": {
      "Module": {
        "name": "module",
        "in": "path",
        "description": "The module name (e.g., Leads)",
        "required": true,
        "schema": {
          "type": "string",
          "enum": [
            "Leads"
          ]
        }
      },
      "Id": {
        "name": "id",
        "in": "path",
        "description": "The record ID",
        "required": true,
        "schema": {
          "type": "string",
          "maxLength": 50
        }
      }
    },
    "securitySchemes": {
      "iam-oauth2-schema": {
        "type": "oauth2",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://accounts.zoho.com/oauth/v2/auth",
            "tokenUrl": "https://accounts.zoho.com/oauth/v2/token",
            "refreshUrl": "https://accounts.zoho.com/oauth/v2/token",
            "scopes": {
              "ZohoCRM.settings.emails.ALL": "Access emails settings in Zoho CRM",
              "ZohoCRM.settings.emails.READ": "Access read-only emails settings in Zoho CRM",
              "ZohoCRM.settings.emails.UPDATE": "Access update emails settings in Zoho CRM",
              "ZohoCRM.settings.emails.DELETE": "Access delete emails settings in Zoho CRM",
              "ZohoCRM.settings.emails.CREATE": "Access create emails settings in Zoho CRM"
            }
          }
        }
      }
    }
  }
}