Only show these results:

How Nylas Works

The Nylas API makes it easy to connect and sync mail, calendar, and contact data from any email service provider. Nylas provides the integration layer with your email service provider, so you can monitor your end users' email and calendars for changes and react to them as needed, create new events, and write and send messages on their behalf. Nylas does not send email or create calendar events itself, rather it uses the provider APIs to do it for you. This makes Nylas transparent to the provider.

Nylas API and Sync Architecture Overview

The diagram below represents how your application can use the Nylas API to sync data from providers such as Google and Microsoft.

Your application uses Nylas to send requests to create, read, update, and delete objects from the provider. Nylas also monitors the provider for changes on each authenticated account, and sends those changes to your application so it can send notifications and react appropriately.

Nylas Architecture Diagram

The basic steps to getting started with Nylas are:

  1. Create your Nylas account.
  2. Connect to your provider and authenticate test accounts.
  3. Write your application!

When you're ready with all the features you need, work through the production checklist, get your app approved with your provider, and invite your end users.

Data Storage

When you authenticate an account with Nylas, the Nylas sync servers automatically start syncing mail, calendar, and contact data from the provider to the Nylas database. Mail, contact, and calendar data is stored for up to 30 days.

Nylas syncs 30 days of data by default. You can adjust this by updating your historical sync settings.

Nylas also caches files, attachments, and copies of the raw RFC-2822 MIME message in an Amazon S3 bucket for seven days. If you request the raw message during those first seven days, Nylas returns the cached copy from S3. After seven days, Nylas deletes the extra copy of the raw message from S3, and if you request the data again, Nylas sends a request to the provider's mail server to re-retrieve the original data.

Performance

Performance Estimation

The statistics below are approximations and actual performance varies per provider. These estimates provide a rough idea to help you design how your application works with the Nylas API. See your service agreement for specific performance guarantees.

Metric Value Description
API Success Rate 99.9% The number of requests that return successful HTTP status codes
P90(request_time) Less than 500 ms P90 of request_time to various API endpoints
TT50 5 min Average time to sync the first 50 threads during an account's initial sync
TT500 25 min Average time to sync the first 500 threads during an account's initial sync
Historical Sync Time 1 day Average time to sync all historical mail for an account. This is highly variable and depends on how much data is in the account, and the mail server's upstream bandwidth.

How Nylas Syncs Customer Data

When an account connects to Nylas, the Nylas sync engine starts pulling all of the data it has access to for the account. This could be mail, contacts, or calendars, or any combination of those.

Email

Nylas prioritizes recent messages, but email isn't always added in reverse chronological order. As new email arrives in the user's mailbox, Nylas syncs it in parallel with historical sync jobs.

Contacts and Calendar

Nylas downloads contacts and events from newest to oldest. However, new events or contacts added after the initial sync starts have to wait. They are downloaded after the initial sync finishes.

Raw Mail

Nylas also caches files, attachments, and copies of the raw RFC-2822 MIME message in an Amazon S3 bucket for seven days. If you request the raw message during those first seven days, Nylas returns the cached copy from S3. After seven days, Nylas deletes the extra copy of the raw message from S3, and if you request the data again, Nylas sends a request to the provider's mail server to re-retrieve the original data.

How Nylas keeps your data up-to-date

To keep your data in sync with your provider, Nylas

  • Keeps an IMAP IDLE connection open with the provider.
  • Exchanges ActiveSync's ping notifications.
  • Uses webhooks from calendar providers.
  • Polls the provider for new changes.

Syncing Transactional Email Providers

When Nylas syncs transactional emails, such as Sendgrid or Mailgun, it saves a copy on the IMAP server. This means your customer also sees the emails appear in their email provider account.

How Nylas Sends Emails

Nylas doesn't send emails from Nylas servers. Instead, when you make the API call to send an email, Nylas connects to the provider's email SMTP server using the user credentials, and uploads the email. One of three things then happens:

  • The email is accepted for delivery. Nylas returns a 200 response to the application.
  • The email is rejected by the email server. Nylas passes the rejection code and error message from the provider to your application.
  • The email is delayed. This can happen if the email server is busy or if there is a large attachment. Nylas recommends waiting three minutes for the request to time out before sending any new API calls.

Email Delivery Services

An email delivery service sends emails on behalf of other domains. If your email administrator asks for information about Nylas, you can tell them that Nylas is not an email delivery service. Nylas does not manage the following: