Manage Domain Aliases in Zoho Mail via API

Skip to main content
Table of Contents
< All Topics
Print

How to Manage Domain Aliases in Zoho Mail Using the API

Prerequisites for API Access

Before managing domain aliases in Zoho Mail via the API, ensure the following prerequisites are met:

  1. A valid Zoho Mail API access token with the ZohoMail.organization.domains.UPDATE scope.
  2. The unique organization ID (zoid) for the Zoho organization.
  3. The domain name for which the alias is being added or removed.
  4. Access to the Zoho Mail API documentation for reference.

Understanding Domain Aliases in Zoho Mail

A domain alias in Zoho Mail allows an organization to route emails sent to an alternate domain to the primary email domain. This feature is useful for branding, email forwarding, or managing multiple domains under a single organization. The API provides endpoints to add, remove, and verify domain aliases, ensuring seamless integration with DNS records (MX, SPF, DKIM).

API Endpoints for Domain Alias Management

The Zoho Mail API provides the following endpoints for managing domain aliases:

  • Add Domain Alias: PUT /api/organization/{zoid}/domains/{domainname} with the UPDATE method.
  • Remove Domain Alias: PUT /api/organization/{zoid}/domains/{domainname} with the UPDATE method.
  • Delete Domain: DELETE /api/organization/{zoid}/domains/{domainname} to remove a domain from the organization.
  • Verify MX/SPF Records: PUT /api/organization/{zoid}/domains/{domainname} with the UPDATE method.

Practical Steps to Add and Remove Domain Aliases

  1. Add a Domain Alias: Use the PUT method to send a JSON payload to /api/organization/{zoid}/domains/{domainname} with the UPDATE operation. Include the domain alias in the request body.
  2. Remove a Domain Alias: Send a PUT request to the same endpoint with the UPDATE method, specifying the domain alias to be removed.
  3. Verify Domain Settings: Check the Zoho Mail admin console to confirm the alias is listed under the domain settings.
  4. Test Email Functionality: Send a test email from the alias to ensure it is functioning correctly and verify DNS records (MX, SPF, DKIM) are properly configured.

Verification of Domain Alias Changes

After making changes to domain aliases, follow these steps to verify the updates:

  1. Check Admin Console: Log in to the Zoho Mail admin console and navigate to the domain settings to confirm the alias is listed.
  2. Send Test Emails: Send an email from the alias to ensure it is processed correctly by the Zoho Mail system.
  3. Validate DNS Records: Use tools like dig or nslookup to verify that MX, SPF, and DKIM records are correctly configured for the domain alias.

Troubleshooting Common Issues

If domain alias operations fail, follow these troubleshooting steps:

  1. Check API Syntax: Ensure the API request is formatted correctly and includes all required parameters (zoid, domainname, and the alias).
  2. Verify OAuth Scope: Confirm the access token has the ZohoMail.organization.domains.UPDATE scope for domain alias operations.
  3. Confirm Domain Format: Ensure the domain name is correctly formatted and matches the exact domain in the Zoho organization.
  4. Review API Response: Check the Zoho Mail API response for error codes or messages that indicate the cause of the issue.

Limitations of Domain Alias Management

While the Zoho Mail API provides robust tools for managing domain aliases, the following limitations apply:

  • Domain alias operations are limited to the organization’s configured domains and cannot be applied to external domains.
  • The API does not support bulk operations for domain aliases; each alias must be managed individually.
  • Domain alias changes may take up to 24 hours to propagate across DNS servers.
  • The API does not provide a direct way to list all domain aliases for an organization; this must be done through the admin console.

Escalation for Advanced Configuration

For advanced configurations or if the API does not meet specific needs, consider the following steps:

  1. Contact Zoho Support: Reach out to Zoho Mail support for assistance with complex domain alias configurations.
  2. Refer to API Documentation: Consult the Zoho Mail API documentation for detailed information on domain alias management.
  3. Use Admin Console: Verify domain alias settings in the Zoho Mail admin console to ensure they are correctly configured.

FAQs on Domain Alias Management

Can I add multiple domain aliases to a single domain?

Yes, you can add multiple domain aliases to a single domain using the Zoho Mail API. Each alias must be managed individually through the API endpoints.

What happens if I delete a domain alias?

Deleting a domain alias removes it from the organization’s domain settings. Emails sent from that alias will no longer be processed, and the alias will no longer be recognized by the Zoho Mail system.

How long does it take for a domain alias to propagate?

Domain alias changes may take up to 24 hours to propagate across DNS servers. Ensure DNS records (MX, SPF, DKIM) are correctly configured and validated after making changes.

Can I use the same domain alias for multiple organizations?

No, domain aliases are specific to a single Zoho organization and cannot be shared across multiple organizations. Each organization must manage its own domain aliases independently.

What should I do if the API returns an error when adding a domain alias?

If the API returns an error, check the request for syntax errors, ensure the OAuth token has the correct scope (ZohoMail.organization.domains.UPDATE), and verify that the domain name is correctly formatted and matches the exact domain in the Zoho organization.