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. |
bounce_domain | String | If provided, this will be used as the bounce domain, else, a default bounce domain will be used. |
List of Response Body Attributes
Parameters | Data Type | Description |
domain_name | String | Name of the sender domain. |
response | JSON Object | Contains the response details of the API. |
code | Integer | Success or failure code. |
message | String | Success or failure message returned by the API. |
sending_domain | JSON Object | Contains details of sending domain like host name, value. |
dns_host_name | String | Host name of the sending domain. |
dns_record_type | String | Record type of the sending domain. |
dns_value | String | Value or key of the sending domain. |
bounce_domain | JSON Object | Contains details of the bounced domain like host name, value. |
is_verified | Boolean | Returns a true or false value depending on if the domain has been authenticated or not. |
errors | JSON Array | Contains 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 |
400106 | Domain already verified in another org |
400109 | Bounce domain already exists |
400108 | Invalid bounce domain |
Sample Request Payload
Copied{
"domain": "zylker.in"
"bounce_domain": "bounce.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"
}
]
}