Adding a sending domain

Create and add sending domains to send emails to your recipients.

Request Type

  • POST

Request URL

https://campaigns.zoho.com/emailapi/v1/settings/domain

Content-Type

application/json

List of Request Body Attributes

Parameters

Data Type

Description

domain*

String

Name of the domain from which emails will be sent. It will be displayed in the "From" header of the email.

List of Response Body Attributes

ParametersData TypeDescription
domain_nameStringName of the sender domain.
responseJSON ObjectContains the response details of the API.
codeIntegerSuccess or failure code.
messageStringSuccess or failure message returned by the API.
sending_domainJSON ObjectContains details of sending domain like host name, value.
dns_host_nameStringHost name of the sending domain.
dns_record_typeStringRecord type of the sending domain.
dns_valueStringValue or key of the sending domain.
bounce_domainJSON ObjectContains details of the bounced domain like host name, value.
is_verifiedBooleanReturns a true or false value depending on if the domain has been authenticated or not.
errorsJSON ArrayContains the error details of the API such as 'code' and 'message'.

Possible Errors

Error Codes

Description

400101

Domain name not provided

400102

Invalid domain name

400103

Domain already exists

400106Domain already verified in another org
400109Bounce domain already exists

 

Sample Request Payload

Copied{
 "domain": "zylker.in"
}

Sample Response - Success

Copied{
   "domain_name": "zylker.in",
   "response": {
       "code": 200102,
       "message": "Domain added successfully"
   },
   "sending_domain": {
       "dns_host_name": "14159._domainkey.zylker.in",
       "dns_record_type": "TXT",
       "dns_value": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDgaEwT6Vxy2+bpGMk01cwHrt0mlP1yux2v1gWcqXQ2ZNy94ANfjgPDxAZMkgbsWAJvNSy4l19sLuQAECcJXK0nUH2NUmylyD5bMJlEBB0F17umuK5XtVL6drHdECu2CRowQD4A0Me7SjUyieS4YJ1gH5Oha3VxY8iyuWxyzhpAlwIDAQAB", 
       "is_verified": false
   },
   "bounce_domain": {
       "dns_host_name": "bounce.zylker.in",
       "dns_record_type": "CNAME",
       "dns_value": "74665059.sender1.testdomain.com",
       "is_verified": false
   }
}

Sample Response - Failure

Copied{
   "errors": [
       {
           "code": 400102,
           "message": "Invalid domain name"
       }
   ]
}