Only show these results:

Using the Ruby SDK

The Nylas Ruby SDK is an open-source software development kit that enables you to use Ruby to integrate the Nylas APIs with your application.

⚠️ The v6.x Nylas Ruby SDK is only compatible with v3.x Nylas APIs. If you're still using an earlier version of Nylas, you should keep using the v5.x Ruby SDK until you can upgrade to Nylas v3.

Before you begin

Before you can start using the Nylas Ruby SDK, make sure you have done the following:

Install the Nylas Ruby SDK

To install the Nylas Ruby SDK, follow these steps:

  1. Add a reference to the Nylas gem in your application's Gemfile:

    gem 'nylas'   
  2. Open your terminal and run the bundle command.

  3. Run gem install nylas to install the Nylas gem.

MacOS 10.11 (El Capitan)

The Nylas gem requires you to have OpenSSL installed. However, Apple stopped bundling OpenSSL with its native Ruby version as of MacOS 10.11. If you're using MacOS El Capitan and have trouble installing the gem, you can run the following commands in your terminal to install OpenSSL.

sudo brew install openssl
sudo brew link openssl --force
gem install nylas

Initialize the Client object

All of Nylas' functionality is available through the Client object. Before you make requests, initialize the Client object with the API key.

#!/usr/bin/env ruby
require 'nylas'

nylas =
api_key: "<NYLAS_API_KEY>"

(Optional) Change the base API URL

You can choose to change the base API URL depending on your location, as in the table below.

Location Nylas API URL
United States (Oregon)
Europe (Ireland)

For more information, see the data residency documentation and the Migration guide for data centers.

To change the API URL, pass the NYLAS_API_URI parameter with the API URL of your location.

#!/usr/bin/env ruby
require 'nylas'

nylas =
api_key: "<NYLAS_API_KEY>",
api_uri: "<NYLAS_API_URI>"

🔍 The base API URL defaults to the Nylas U.S. region. See the data residency documentation for more information.

Latest supported version

For the latest supported version of the SDK, see the Releases page on GitHub.

Method reference

The Nylas Ruby SDK includes method documentation, so you can easily find the implementation details that you need.

GitHub repositories

The Nylas Ruby SDK repository houses the Ruby SDK. You can contribute to the SDK by creating an issue or opening a pull request.

For Nylas code samples, visit the Nylas Samples repository.