Google has announced the beta of a Gmail API which makes them the first email provider to offer an API for users’ inboxes. As an email API pioneer, we are very excited about this new functionality from Google. It acknowledges something that we all know—email is a valuable development platform which developers like you work with every day.
What is it?
The Gmail API provides basic functionality to access and send email in a Gmail account through a RESTful API that is much easier to integrate than IMAP. The API gives access to Threads, Messages, Labels, Drafts, and History. Google clearly states the new API should not be used to replace IMAP for full-fledged email client access. They describe it as “an alternative” to IMAP. It is not meant as an IMAP replacement.
The use cases for the new API are straightforward based on the endpoints it now offers. You can read, create, update, delete, and send email with the API. It also allows you to modify labels and conduct message and thread searches.
How does the Gmail API differ from Context.IO?
Google’s email API is limited to Gmail, but Context.IO supports Gmail as well as Yahoo! Mail, Office365, Outlook.com, and AOL. Gmail has 425 million accounts but Context.io can reach over 1.2 billion email accounts! Gmail may be the most popular provider, but you can almost triple your potential customer base by using Context.IO and having access to all of the other major email providers.
We support any email provider that uses IMAP which includes many ISPs and cable companies (e.g. Comcast, Cox Communications, and Time Warner Cable). Support for a broad range of providers is especially important in countries where there is a strong reliance on regional email providers.
Support for a diversity of email accounts is not the only difference between these APIs. The Context.IO platform has many features not available in the Gmail API. The most popular of these is WebHooks. WebHooks allows you to define rules-based notifications. These alerts are sent to your application as soon as an email arrives matching your filter criteria. You can filter WebHook notifications by sender, recipients, attachments, subject, folders, and thread. This works across all email providers using IMAP, not just Gmail.
Another valuable tool for developers is our Contacts resource, built directly from email headers. This makes our Contacts data more complete than Gmail’s as it is based on a user’s actual email activity and not just what the user adds to an “address book”. In addition, our Contacts compile comprehensively across all email accounts a user might have. The feature allows you to create contact-based applications incorporating metrics such as message counts and the dates of the latest messages sent to or received from a contact. The Gmail API does not have Contacts endpoints that can be used in your application.
We will continue to layer new features onto both the 2.0 and Lite APIs. We recently added the ability to fetch attachments in Lite and will be rolling out new endpoints in the near future. We are also exploring ways to leverage the Gmail API to improve our connectivity with Gmail. If the Gmail API offers a better way to access their accounts, we will certainly take advantage of it!
Validation! Email as a Development Platform
The Gmail API recognizes there is significant power within our inboxes. We on the Context.IO team believe there are many opportunities to utilize email information better. We spearheaded the idea of the RESTful email API, and we are glad Google has followed suit. We hope it will prod other email services to do the same. Email may be 30 years old, but we are just beginning to see the creative possibilities.