PUT - Verify Domain

Purpose

The API tries to verify the domain added to the organization, in one of the predefined verification methods. Internally, the domain is verified only if the required verification criteria are successful.

OAuth Scope

Use the scope

ZohoMail.organization.domains.ALL (or) ZohoMail.organization.domains.UPDATE

to generate the Authtoken.

ALL - Grants full access to domains.

UPDATE - Grants update access to domains.

Request URL

Method: PUT

https://mail.zoho.com/api/organization/{zoid}/domains/{domainName}/verifyDomain

Path Parameters

  • zoid* long
    • This parameter specifies the unique Zoho Organization Identifier for the organization.
    • This parameter can be fetched from Get Organization Details API.
  • domainName* string
    • This parameter specifies the name of the domain that needs to be verified.

Request Body(JSON Object)

  • mode* string
    • This parameter represents the type of operation that is to be performed.
    • Allowed values :
      • verifyDomainByTXT -To verify the Domain via TXT Record added in DNS Manager.
      • verifyDomainByCName -To verify the Domain via CNAME Record added in DNS Manager.
      • verifyDomainByHTML -To verify the Domain by HTML method.

 

* - Mandatory parameter

Response Codes

Refer here for the response codes and their meaning.

Sample Request

Copiedcurl "https://mail.zoho.com/api/organization/1234567890/domains/zylkernew.com/verifyDomain" \
-X PUT \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization:Zoho-oauthtoken *****" \
-d '{
   "mode": "verifyDomainByCName"
}'

Sample Success Response

Copied{
   "status": {
       "code": 200,
       "description": "success"
   },
   "data": {
       "status": true
   }
}

Sample Failure Response (For mode = verifyDomainByTXT)

Copied{
   "status": {
       "code": 200,
       "description": "success"
   },
   "data": {
       "message": "Verification failed due to host not found",
       "error": "TXT_RECORD_HOST_UNKNOWN",
       "txtRecord": [],
       "status": false
   }
}

Sample Failure Response (For mode = verifyDomainByCName)

Copied{
   "status": {
       "code": 200,
       "description": "success"
   },
   "data": {
       "cnameRecord": [],
       "message": "Verification failed due to host not found",
       "error": "CNAME_HOST_UNKNOWN",
       "status": false
   }
}

Sample Failure Response (For mode = verifyDomainByHTML)

Copied{
   "status": {
       "code": 200,
       "description": "success"
   },
   "data": {
       "message": "500: Internal Server Error. Unable to verify the domain via HTML. Learn more, Go to: https://www.zoho.com/mail/help/adminconsole/domain-verification.html#alink3",
       "error": "HTML_VCODE_FAILURE_WITH_ERRORCODE_AND_DESC",
       "status": false
   }
}