PUT - Add Domain Alias

Purpose

The API adds the specified domain as an alias to another domain. The alias domain that we are giving as input should be a verified domain. Learn more about Domain Aliasing here.

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}

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, to which the alias domain should be pointed to.

 

Request Body(JSON Object)

  • mode* string
    • This parameter represents the type of operation that is to be performed.
    • Provide the value as makeDomainAsAlias.
  • domainAlias* string
    • This parameter specifies the name of the domain, which should be added as an alias to the specified domain.

 

* - Mandatory parameter

Response Codes

Refer here for the response codes and their meaning.

Sample Request

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

Sample Response

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