Back

Zoho Mail API Essential Guide

Aug 13, 20246 minute read

What type of API does Zoho Mail provide?

Zoho Mail uses a REST API. Here are the key points:

API Type

  • Zoho Mail provides a REST API

Key Features

  • Allows integration of Zoho Mail modules with third-party applications and services
  • Language-independent - can be used with any programming language
  • Responses are in JSON format

Prerequisites

  • Valid Zoho Mail account
  • Permission to access API service
  • Valid OAuth token for authentication
  • Required role/permissions to access specific APIs

Available Modules

The REST API is available for various Zoho Mail modules, with availability based on account plans and permissions

Best Practices

  • Use OAuth for authentication
  • Review the API documentation for specific endpoints and parameters
  • Consider rate limits and quotas

While Zoho Mail uses REST, it's worth noting that some other Zoho products like Zoho CRM also offer GraphQL APIs. However, for Zoho Mail specifically, the primary API type is REST.

Does the Zoho Mail API have webhooks?

Availability of webhooks

The official Zoho Mail API does not appear to have webhooks directly. However, Zoho offers webhook functionality through their ZeptoMail service, which is part of the Zoho ecosystem and can be used for email-related events.

Types of events you can subscribe to

ZeptoMail provides webhooks for the following types of email-related events:

  1. Email Opens: Triggered when a recipient opens an email.
  2. Link Clicks: Triggered when a recipient clicks a link in an email.
  3. Bounces:
    • Soft bounces: For temporary delivery failures
    • Hard bounces: For permanent delivery failures

Key points to consider

  1. Webhook setup: You can configure webhooks in your ZeptoMail account by providing a URL to receive the webhook data.

  2. Event data: Each webhook type provides detailed information about the event, including recipient details, email information, and event-specific data.

  3. First-time triggering: For email opens, the webhook is triggered only on the first instance of the email being opened.

  4. SMTP integration: Webhooks can be triggered for emails sent via SMTP as well.

  5. Multiple webhooks: You can add multiple webhooks to a single Mail Agent in ZeptoMail.

  6. Editing webhooks: You can edit the webhook URL, description, and event subscriptions after setup.

  7. No-code usage: Webhooks can be used with iPaaS (Integration Platform as a Service) applications like Zapier, Zoho Flow, or Microsoft Power Automate for no-code integrations.

Best practices

  1. Set up a script to receive and process the webhook data in the correct format.

  2. Use webhooks to trigger specific actions in your application based on email events.

  3. Leverage webhooks for real-time notifications and to improve email deliverability by quickly addressing issues.

  4. Consider using webhooks instead of constant polling to save resources and time.

While this information is specifically about ZeptoMail, which is a Zoho service, it's important to note that the search results don't provide information about webhooks in the core Zoho Mail API. If you need webhook functionality for email events in a Zoho environment, ZeptoMail appears to be the recommended solution.

Rate Limits and other limitations

Based on the search results provided, I couldn't find specific information about the API Rate Limits for the Zoho Mail API. However, I can provide some general information about Zoho API limits and best practices:

General API Limits for Zoho Services

  1. Zoho uses a credit system for API calls, where each call consumes a certain number of credits [3].

  2. The API call limit has a rolling 24-hour window from the start of the call [3].

  3. Different Zoho services and editions have varying API limits [1][3].

Key Points to Consider

  • Concurrency Limits: Zoho implements concurrency limits, which specify the maximum number of API calls that can be simultaneously active at a given point in time per organization per app [3][5].

  • Sub-concurrency Limits: Some specific API operations have sub-concurrency limits to restrict the number of concurrent calls for certain types of requests [3][5].

  • Credit Deduction: Different API operations consume different numbers of credits. For example, simple operations like getting user information might consume 1 credit, while more complex operations like converting leads might consume 5 credits [3][5].

Best Practices

  1. Optimize API usage by retrieving a maximum of 200 records with each request [2].

  2. For insert, update, or delete operations, handle a maximum of 100 records per request [2].

  3. Be aware of the specific credit consumption for different API operations to manage your usage effectively [3][5].

  4. Monitor your API usage through the API Dashboard provided by Zoho [3].

  5. If you need more API credits than your plan allows, consider upgrading your plan or purchasing additional credits [3].

Summary

While the specific rate limits for Zoho Mail API are not provided in the search results, it's important to note that Zoho implements a credit-based system with concurrency limits for their APIs. The exact limits may vary depending on the service and edition you're using. It's recommended to check the official Zoho Mail API documentation or contact Zoho support for the most accurate and up-to-date information on API rate limits specific to Zoho Mail.

Latest API Version

Based on the search results provided, here are the key points regarding the most recent version of the Zoho Mail API:

Current API Version

The search results do not explicitly mention a specific version number for the Zoho Mail API. However, they provide details about the current API endpoints and functionality, which appears to be the most recent version available.

Key Points

  1. The Zoho Mail API is a RESTful API that allows integration of Zoho Mail modules with third-party applications and services [2].

  2. The API is language-independent and returns responses in JSON format [2].

  3. The API covers various modules including Organization, Users, Groups, Mail Policy, Email Messages, Folders, and more [1].

  4. Authentication is done using OAuth 2.0 protocol [2].

  5. The API provides endpoints for various operations such as sending emails, managing folders, handling attachments, and performing user management tasks [1].

API Structure

The Zoho Mail API is organized into several modules, each with its own set of endpoints:

  • Email Messages API
  • Users API
  • Groups API
  • Organization API
  • Folders API
  • Signatures API
  • Logs API
  • And others [1]

Best Practices

  1. Use the appropriate OAuth scope for each API call (e.g., ZohoMail.messages for Email Messages API) [3].

  2. Follow the prerequisites, including having a valid Zoho Mail Account and the necessary permissions [2].

  3. Use the provided API endpoints and HTTP methods (GET, POST, PUT, DELETE) as specified in the documentation [1].

  4. Be aware of any API call limits and follow the guidelines for usage [2].

While the search results don't mention a specific version number, they provide comprehensive information about the current Zoho Mail API. To get the most up-to-date information or to confirm the exact version number, it would be best to check the official Zoho Mail API documentation or contact Zoho support directly.

How to get a Zoho Mail developer account and API Keys?

To get a developer account for Zoho Mail and create an API integration, you need to follow these steps:

1. Create a Zoho Mail Account

First, you need to have a valid Zoho Mail account. If you don't have one, you'll need to sign up for Zoho Mail.

2. Access Developer Space

Once you have a Zoho Mail account:

  1. Log in to your Zoho Mail account
  2. Navigate to Settings >> Integrations >> Developer Space

The Developer Space provides you with the tools to integrate third-party applications with Zoho Mail or create custom extensions.

3. Register Your Application

To create an API integration, you need to register your application:

  1. Go to the Zoho API Console
  2. Hover over your desired client type and click "CREATE NOW"
  3. Enter the required details:
    • Client Name
    • Homepage URL
    • Authorized redirect URI
    • JavaScript Domain URI (for client-based applications)

4. Obtain Client Credentials

After registering your application, you'll receive:

  • Client ID: A unique identifier for your application
  • Client Secret: A unique key that must be kept confidential

5. Generate OAuth Token

To access the Zoho Mail API, you need to generate and use a valid OAuth token. You can do this by:

  1. Using the Client ID and Client Secret
  2. Specifying the required scopes for your application
  3. Following the OAuth 2.0 flow to obtain an access token

What can you do with the Zoho Mail API?

Based on the provided search results, here's a list of data models you can interact with using the Zoho Mail API, along with what is possible for each:

Email Messages

  • Send emails (with or without attachments)
  • Upload attachments
  • Save drafts and templates
  • Reply to emails
  • Get list of emails in a folder
  • Search emails
  • Get email headers, content, and metadata
  • Get original message
  • Get attachment information and content
  • Mark emails as read/unread
  • Move emails
  • Flag emails
  • Apply/remove labels
  • Archive/unarchive emails
  • Mark emails as spam/not spam
  • Delete emails

Users

  • Add users to an organization
  • Fetch user details (all or single user)
  • Change user roles
  • Reset user passwords
  • Change Two-Factor Authentication (TFA) preferences
  • Manage email aliases
  • Enable/disable user mail accounts
  • Change incoming/outgoing email status
  • Change IMAP/POP/ActiveSync status
  • Delete user accounts

Groups

  • Create groups
  • Get group details
  • Manage moderation for group emails
  • Update group names
  • Enable streams for groups
  • Manage group members (add, delete, update status/role/settings)
  • Update threshold limits and advanced admin settings
  • Manage group email aliases
  • Delete groups

Organization

  • Add child organizations
  • Manage allowed IPs
  • Get organization details and subscription information
  • Manage user storage
  • Update organization spam settings
  • Manage spam listings

Mail Policy

  • Create and manage various types of policies (org policy, email restrictions, account restrictions, access restrictions, forward restrictions)
  • Get policy details and associated users/groups
  • Apply policies to users/groups
  • Assign restrictions to policies

Accounts

  • Get account details
  • Update mail account sequence
  • Manage reply-to addresses
  • Add send mail details
  • Update display name and email address
  • Manage email forwarding
  • Set up vacation replies

Domains

  • Add domains to an organization
  • Fetch domain details
  • Verify domains
  • Set primary domains
  • Enable/disable email hosting for domains
  • Manage domain aliases
  • Verify MX and SPF records
  • Manage DKIM settings
  • Enable/disable subdomain stripping
  • Manage catch-all and notification addresses
  • Delete domains

Other Data Models

The Zoho Mail API also provides endpoints for interacting with:

  • Folders
  • Labels
  • Threads
  • Tasks
  • Bookmarks
  • Notes
  • Logs

These data models allow for comprehensive management and interaction with various aspects of Zoho Mail, enabling developers to create powerful integrations and applications.