Skip to content
Skip to main content

Quickstart: Contacts API

The Nylas Contacts API gives you access to a user’s address book across Gmail, Outlook, Exchange, and iCloud — all through a single API. List contacts, look up people by email, and create new entries without building separate integrations for each provider.

This quickstart walks you through listing, searching, and creating contacts on behalf of a connected user.

You need two things from Nylas to make API calls:

  1. An API key — authenticates your application. You’ll pass it as a Bearer token.
  2. A grant ID — identifies which user’s contacts to access. You get one when you connect an account to Nylas.

If you don’t have these yet, follow one of the setup guides first:

Then install the Nylas SDK for your language:

For Java and Kotlin, see the Kotlin/Java SDK setup guide.

Retrieve contacts from a user’s address book. Replace <NYLAS_GRANT_ID> and <NYLAS_API_KEY> with your values.

Find contacts by email address. Useful for looking up a sender’s details before replying, or checking if a contact exists before creating one.

Add a new contact to a user’s address book.