Skip to content

Overview

Nylas is a powerful unified API platform that provides developers like you with tools to integrate email, calendar, and contact functionality into your applications across multiple providers like Gmail, Microsoft, IMAP, and others. Nylas also supports webhooks, which allow applications to receive real-time updates on changes in emails, calendars, and contacts.

But first, let’s sign up

If you’re a first-time user, sign up for a free Nylas account first! 😎

In free tier, Nylas automatically creates a Sandbox application for you. Sandbox app allows you to connect up to 5 accounts or grants and provides pre-configured Google and Microsoft connector for easy testing.

  • A grant is a record of a specific user’s account authenticating with their provider, and “granting” Nylas access to parts of the account’s email inbox and calendar (represented by authentication “scopes”). Grants and connected accounts are often used interchangeably.

  • Connectors are provider integrations that allows your Nylas application to connect to a third party services, such as a provider auth application from Google (GCP), Microsoft (Azure), or to an IMAP provider. You can update the scopes that Nylas requests when connecting to that provider under connector settings.

Make an API request or two

Get a list of account’s calendars

The Get all Calendars request fetches information about all of the calendars that the test account has access to, but doesn’t fetch the events that the calendar contains.

Return all Events on a calendar

Using the id of a specific calendar, you can make a Get all Events request to see what’s in it. This might be a long list, so you can also include the limit parameter to show only the first few events, or step through several pages of results.

Create an event

Right, we found the calendar and looked at the Events that are already on it. Now it’s time to create a new Event.

You can copy and paste the example request below into your terminal and replace the CALENDAR_ID at the end of the request with the calendar ID from the previous example. If you want, you can also set it to primary to put the Event on the test account’s main calendar.

Remember to change the when parameter to some time in the future. The parameter is in Unix timestamp format, so you might want to use an online tool or software library to convert it.

The participants object lists the people that you’re inviting to the event. By default, Nylas creates the Event on the calendar that you specify for the test account, so you don’t need to add the account’s information to the participants list.

Remember, anyone you put in the participants list gets an event on their calendar! (You could add the ?notify_participants=false parameter string after the calendar ID, but not all providers respect it.)

Get unread email messages

Moving out of calendar land, let’s take a look at email.

Let’s fetch the two most recent unread email messages. You can specify these limits using the ?limit=2&unread=true query string parameters, as in the example request below.

There are lots of other limits and filters available. For a full list, see the Get all Messages references.

Send an email message

Next, you’ll send an email message to yourself using the Send Message API.

What’s next?

Here are some alternate paths you can also take:

  • Use the Nylas AI Prompts to get started with Nylas using AI tools like Cursor, GitHub Copilot, Windsurf, or Zed.
  • Visit the Tutorials section for follow-along tutorials that cover basic API use cases for the Nylas Node.js, Python, Ruby, and Kotlin/Java SDKs.
  • If you’re ready to start integrating Nylas into your project, check out Developing with Nylas for a start-to-finish guide. You’ll pick a Nylas plan, create a new application, and set up authentication so you can start building your real project.
  • Try out the Nylas Postman collection. For more information, read Nylas’ Postman collection documentation.
  • Join Nylas’ developer forums to learn about Nylas APIs, get help, attend events, and support others in the community.