The Nylas Email API gives you a secure, reliable connection to your user’s inboxes that enables you to sync historic and live email data into your application in real-time and perform bi-directional email sync with full CRUD (create, read, update, delete) capabilities for Gmail, Microsoft Exchange, Outlook.com, Yahoo! Mail, AOL, IMAP, and the rest with just a few lines of code.
The Nylas Email API provides a REST interface that includes functionality to
- Read data from email messages and threads, such as email content, sender and recipient information, subject lines, dates, and more.
- Organize email inboxes with labels and folders.
- Update the unread and starred status of email messages.
- Manage and download file attachments.
- Create drafts and send emails.
- Search email inboxes for specific content.
Email API Endpoints
This section covers all of the endpoints the Nylas Email API provides to enable you to integrate full email functionality into your app.
Messages
Messages are the fundamental object of the Nylas platform, and the core building block for most email applications. They contain several pieces of information, such as when a message was sent, the sender's address, to whom it was sent, and the message body. They can also contain file attachments, calendar event invitations, and more.
Threads
Threads are multiple messages that are grouped together into a single, first class object. Nylas threads messages together using a variety of heuristics; on Gmail and Microsoft Exchange accounts, messages are threaded together as close as possible to the representation in those environments. For all other providers (including generic IMAP), messages are threaded using a custom JWZ-inspired algorithm.
Folders
Folders are the primary component for organizing email inboxes from most providers and they behave like normal IMAP or filesystem folders. A message can only be contained within a single folder, but a thread with many messages might span multiple folders.
Labels
Gmail uses labels to organize email inboxes rather than folders, and messages may have more than one label. Nylas makes it easy to detect when accounts use this method of organization so you can ensure your end users have an experience that matches their provider of choice.
Files
Files are any data attached to messages. Nylas allows you to download existing attachments from messages and threads and upload new files to be sent.
Drafts
Drafts are special kind of message that has not been sent, and therefore its body contents and recipients are still mutable. The drafts endpoints let you read and modify existing drafts, create new drafts, send drafts, and delete drafts.
Other Features of the Nylas Email API
The Nylas Communications Platform provides other functionality that makes it easy for you to build your email integration.
Search functionality that is proxied to the account's provider for full-text search. Results are matched with objects that have been synced, and are then returned.
Filtering allow you to narrow requests based on specific parameters like subject line, senders and recipients, thread ids, and unread and starred status. Filters help you reduce the size of your API requests, resulting in faster performance.
Pagination makes it possible to control the number of results that are returned.
Webhooks allow your application to receive notifications when certain events occur such as emails being received or sent, or other changes to an email inbox.
Deltas enable you to process new data quickly without fetching an index of the user's email inbox or performing a large number of API calls.
Views allow you to customize the response for any endpoint to return only specific information that you want.
Next Steps
How Nylas Works - Take a look at the Nylas architecture to see how we sync billions of emails.
//docs.nylas.com/docs/quickstart-python) and Node.js, or explore the Nylas Calendar or Contacts API.
Tutorials - Check out our plethora of tutorials to learn how to carry out common functionality, like sending emails, reading data from an email inbox, accessing file attachments, and organizing inboxes with labels and folders.
Integration Guides - Ready to start building your integration? Our integration guides cover what it takes to incorporate email functionality into your app. They cover best practices for using the Nylas Communications Platform and provider-specific advice for Google, Microsoft, and more.
Set up Postman - Postman makes it easy to explore the Nylas Email API.
API Reference - Our API reference provides all the detail you need to know to use the Nylas Communications Platform.
Updated 7 days ago