Unblock Email Address API
In certain scenarios, a mail you sent gets bounced in Zoho CRM due to reasons such as invalid email address, full mailbox, blocked domain, email server down, large email, and so on.
There are two types of bounces:
- Soft Bounces  - An email cannot be delivered to a recipient's email address temporarily.
 Example: Email Server is down.
- Hard Bounces - An email id permanently undeliverable. 
 Example: Invalid email address.
You can now unblock the soft bounced emails using Unblock Email API.
For more details, refer to Avoiding email bounces to know more about email bounce management in Zoho CRM. 
 
Purpose
To unblock the soft bounced emails.
Endpoints
- POST /{module_api_name}/{record_id}/actions/unblock_email
- POST /{module_api_name}/actions/unblock_email
Request Details
Request URLs
To unblock emails in a single record:
{api-domain}/crm/{version}/{module_api_name}/{record_id}/actions/unblock_email
To unblock emails from multiple records:
{api-domain}/crm/{version}/{module_api_name}/actions/unblock_email
Header
Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52
Scope
scope=ZohoCRM.send_mail.{module_API_name}.CREATE
Possible Module Names
leads, accounts, contacts, deals, quotes, salesorders, purchaseorders, invoices, cases, and custom
Possible Operation Types
CREATE - Perform unblock email actions
Supported Modules
Leads, Contacts, Deals, Accounts, Sales Orders, Purchase Orders, Invoices, Quotes, Cases, and Custom.
Input JSON
- unblock_fieldsarray of strings, mandatoryTo unblock emails, specify one or both of the system-defined fields : Email and Secondary_Email 
- idsarray of strings, mandatory if you do not specify the id in the request URLTo unblock emails for more than one record, specify the record IDs. You can specify up to 500 record IDs. 
Notes
- The permanently blocked emails cannot be unblocked.
- A temporarily blocked email can be unblocked up to 5 times.
- A custom email field cannot be unblocked.
- You cannot merge records that are locked or in an Approval Process/Review Process.
Sample request to unblock emails associated with a single record
Copiedcurl "https://www.zohoapis.com/crm/v8/Leads/2423488000000483001/actions/unblock_email"
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
-d "@input.json"
-X POST
Sample Input
Copied{
    "unblock_fields": [
        "Email",
        "Secondary_Email"
    ]
}Possible Errors
- NOT_ALLOWEDHTTP 400unknown field provided 
 Resolution: You have specified unknown fields. Please specify the supported fields, i.e., Emails and/or Secondary_Email.
- INVALID_DATAHTTP 400Invalid record provided 
 Resolution: You have specified one or more invalid record IDs. Please specify valid record IDs.
- NOT_ALLOWEDHTTP 400EMAIL, SECONDARY_EMAIL field not available for module 
 Resolution: The provided fields are not available in the specified module. Please specify a valid field.
- NOT_ALLOWEDHTTP 400Cannot unblock, email has been unblocked 5 times already 
 Resolution: You cannot unblock the same email more than 5 times.
- NOT_ALLOWEDHTTP 400Cannot unblock, Email is blocked permanently 
 Resolution: You can unblock a temporarily blocked email, but not a permanently blocked email.
- NOT_ALLOWEDHTTP 400Email is already unblocked 
 Resolution: The provided email is already unblocked.
- MANDATORY_NOT_FOUNDHTTP 400required field not found 
 Resolution: The input body cannot be empty. Please provide the required fields to unblock emails.
- INVALID_REQUEST_METHODHTTP 400The http request method type is not a valid one 
 Resolution: You have specified an invalid HTTP method to access the API URL.
 Specify a valid request method. Refer to the endpoints section above.
- INVALID_MODULEHTTP 400The module name given seems to be invalid 
 Resolution: You have specified an invalid module name.
 Specify a valid module name.
- OAUTH_SCOPE_MISMATCHHTTP 401Unauthorized 
 Resolution: Client does not have ZohoCRM.modules.{module_name}.UPDATE scope.
 Create a new token with valid scope. Refer to scope section above.
- AUTHENTICATION_FAILUREHTTP 401Authentication failed 
 Resolution: Pass the access token in the request header of the API call.
- INVALID_URL_PATTERNHTTP 404Please check if the URL trying to access is a correct one 
 Resolution: The request URL specified is incorrect. Specify a valid request URL.Refer to the request URL section above. 
- INTERNAL_ERRORHTTP 500Internal Server Error 
 Resolution: Unexpected and unhandled exception in the server. Contact support team.
Sample Response
Copied{
    "data": [
        {
            "code": "SUCCESS",
            "details": {
                "id": "2423488000000569001"
            },
            "message": "Unblocked successfully",
            "status": "success"
        }
    ]
}Sample Request to unblock bulk emails
Copiedcurl "https://www.zohoapis.com/crm/v8/Leads/actions/unblock_email"
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
-d "@input.json"
-X POST
Sample Input
Copied{
    "unblock_fields": [
        "Email",
        "Secondary_Email"
    ],
    "ids": [
        "2423488000000575001",
        "2423488000000569124",
        "2423488000000569119"
    ]
}Sample Response
Copied{
    "data": [
        {
            "code": "SUCCESS",
            "details": {
                "id": "2423488000000575001"
            },
            "message": "Unblocked successfully",
            "status": "success"
        },
        {
            "code": "SUCCESS",
            "details": {
                "id": "2423488000000569124"
            },
            "message": "Unblocked successfully",
            "status": "success"
        },
        {
            "code": "SUCCESS",
            "details": {
                "id": "2423488000000569119"
            },
            "message": "Unblocked successfully",
            "status": "success"
        }
    ]
}