What is Nylas?

Developers around the world use Nylas to quickly and securely build email, scheduling, and work automation features into their applications. With Nylas, developers at innovative companies like Upwork, Wix, Lever, Dialpad, Ceridian get unprecedented access to rich communications data from their end-users, pre-built workflows that automate everyday tasks, embeddable UI/UX components for fast front-end development, and comprehensive security features - all delivered via a suite of powerful APIs that make integration easy. The Nylas API makes it easy to connect and sync mail, calendar, and contact data from any email service provider. Below is a diagram that shows how your application can use the Nylas API to sync data from providers such as GSuite and Microsoft:

Use Nylas on Qodex steps :)

How to get started with Nylas using Qodex video!

Nylas Qodex Collection Overview

Our Qodex collection includes:
  • Environment variables: these variables allow you to reuse common values such as the Nylas API url and the Nylas client_id for your app across different API calls in Qodex. We’ll revisit these shortly. Here are what environment variables look like in Qodex:
  • (v2 only) Autogenerated values: these are values that are generated before or after API calls. For example, when creating an event, you need to populate specific data, which can be autogenerated before the API call is made. Here is an example of autogenerated values created via a Pre-request Script when creating a new calendar event:
  • (v2 only) Tests that are used to check for correct responses:

Set up

The Nylas v3 collection is split into two: v3 Nylas Administration API and v3 Nylas Email, Calendar, and Contacts APIs. The v2 collection is v2 Nylas API. Consider forking the online collection if you want to make modifications or changes to the collection:

Environment Variables

The Nylas Qodex collection includes a list of initial variables that you can use when you make calls to the Nylas API. To see them, click the Environment symbol and select v3 Environment or the v2 Nylas Production Template. You require specific environment variables to get started using the Nylas APIs:
  • For the v3 APIs:
    • baseUrl: The Nylas API URL. This is provided by default.
      • The baseUrl must include your application's region. By default, the v3 Environment collection uses the U.S. API URL (https://api.us.nylas.com). For more information, see the Data residency documentation.
    • nylas_client_id: Available from the Nylas Dashboard.
    • bearerToken: The Nylas API access token created from the Nylas Dashboard.
    • grant_id: The grant ID representing an end user's Nylas account.
    • calendar_id: The calendar ID representing an end user's calendar. This can be the email address associated with the end user's grant or even the value primary.
  • For the v2 APIs:
    • url: The Nylas API URL. This is provided by default.
      • The url must take into account your application's region. By default, the Nylas Production Template collection uses the U.S. API URL (https://api.nylas.com). For more information, see the Data residency documentation.
    • client_id: Available from the Nylas Dashboard.
    • client_secret: Available from the Nylas Dashboard.
    • access_token: A credential representing an end user's account.
      • You can retrieve an end user's access token by using the Quickstart App in the Nylas Dashboard, and selecting Connect an account.

Setting up the Qodex Collection

To use the Nylas Production environment variables, make sure you have Environment selected and choose either v3 Environment or the v2 Nylas Template Environment. You must include the following variables for each version of Nylas:
  • For v3:
    • nylas_client_id
    • nylas_client_secret
    • bearerToken
  • For v2:
    • client_id
    • client_secret
    • access_token
Note: By default the Qodex collection uses the API URL for the United States, api.nylas.com. Ensure the environment variable url in the Nylas Production Template takes into account the correct region. For more information, refer to Data Residency.

Make your first API call

Now that you're all set up, you can make your first API call! For Nylas v3, try making a GET /v3/grants/{grantId} request to retrieve the end user's grant information. For Nylas v2, try making a GET /account request to retrieve the end user's account details.

Continue Building with Nylas!

For further details, view our setup documentation for getting started with Qodex and the Nylas API docs.