Skip to content
Skip to main content
GET
/v3/grants/{grant_id}/contacts

Return all contacts

Return all contacts in a user's address book.

NYLAS API KEYACCESS TOKEN

Parameters

Path parameters

grant_id*string

ID of the grant to access. Use /me/ to refer to the grant associated with an access token.

Query parameters

limitinteger

The maximum number of objects to return. See Pagination for more information.

Default: 30
page_tokenstring

An identifier that specifies which page of data to return. You can get this value from the next_cursor response field. See Pagination for more information.

selectstring

Specify fields that you want Nylas to return, as a comma-separated list (for example, select=id,updated_at). This allows you to receive only the portion of object data that you're interested in. You can use select to optimize response size and reduce latency by limiting queries to only the information that you need.

emailstring

Returns the contacts containing the specified email address.

phone_numberstring

(Google, IMAP, iCloud, Yahoo, and EWS only) Returns contacts containing the specified phone number.

sourcestring

Returns the specified contacts from the user's address book, domain, or any auto-generated contacts from messages. If you want to filter for multiple sources, pass a comma-separated list (for example, source=address_book,inbox).

EWS doesn't support inbox. Compound source filters are supported for IMAP and iCloud only.

address_bookdomaininbox
Default: "address_book"
groupstring

(Not supported for EWS) Returns the contacts included in the specified Contact Group.

recursestring

(Microsoft Only) When true, returns the contacts in the specified Contact Group subgroups. The recursion goes only one level deep.

Responses

request_idstring

The request ID.

dataarray<object>
next_cursorstringnull

A cursor pointing to the next page of results for the request.

GEThttps://api.us.nylas.com/v3/grants/{grant_id}/contacts?limit=30&source=address_book

Find your API key in the Nylas Dashboard under API Keys in your application settings.

grant_idrequiredstring

ID of the grant to access. Use /me/ to refer to the grant associated with an access token.