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

Return all folders

Returns all folders for all providers. Nylas flattens sub-folders into a single list.

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

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.

include_hidden_foldersboolean

(Microsoft only) When true, Nylas includes hidden folders in its response.

Default: false
limitinteger

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

Default: 50
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.

parent_idstring

(Microsoft and EWS only) Use the ID of a folder to find all child folders it contains.

shared_fromstring

(Microsoft only) When provided, Nylas returns items that were shared from the specified email address. It also accepts grant ID. This parameter only accepts single email address or grant ID. Check out the Shared folders guide for more information.

single_levelboolean

(Microsoft only) If true, retrieves folders from a single-level hierarchy only. If false, retrieves folders across a multi-level hierarchy.

Default: false

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}/folders?include_hidden_folders=false&limit=50&single_level=false

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.