openapi: 3.2.0 info: title: Nylas Folders API version: v3 summary: The complete Nylas v3 API — Email, Calendar, Contacts, Notetaker, Scheduling, Administration, and Migration. description: The Nylas API is designed using the REST ideology to provide simple and predictable URIs to access and modify objects. contact: url: https://www.nylas.com/ x-provenance: method: harvested first_party: true publisher: Nylas source: https://developer.nylas.com/_spec-files/nylas-api.yaml harvested: '2026-08-21' sha256: 7ff001d571e163b1ffe22178741b59f813d8208ec878157a839a33dc2c13fd35 bytes: 1666223 note: 'Published by Nylas as the unified contract for the Nylas v3 API and stored verbatim; API Evangelist added only this provenance block. Submitted by the provider in api-evangelist/nylas#1 and verified against the live URL before harvest: OpenAPI 3.1.0, 118 paths, 208 operations, 174 component schemas, 100% of operations carrying summary, description, tag and a unique operationId, x-code-samples on 208 of 208. This document REPLACES a 22-operation scaffold API Evangelist derived from reading the documentation, now quarantined under openapi/_scaffold/.' x-evidence: - url: https://developer.nylas.com/_spec-files/nylas-api.yaml what: the published unified contract, harvested verbatim 2026-08-21 (200, text/yaml, 1,666,223 bytes) - url: https://developer.nylas.com/.well-known/api-catalog what: RFC 9727 linkset advertising that URL as service-desc for api.us.nylas.com and api.eu.nylas.com (200, application/linkset+json) servers: - url: https://api.us.nylas.com description: U.S. - url: https://api.eu.nylas.com description: E.U. security: - ACCESS_TOKEN: [] - NYLAS_API_KEY: [] tags: - name: Folders description: To simplify your experience, the Nylas Email API uses the same commands to manage both folders and labels, and can refer to specific folders using the provider's `folder_id`. paths: /v3/grants/{grant_id}/folders: parameters: - schema: type: string name: grant_id in: path required: true description: ID of the grant to access. Use `/me/` to refer to the grant associated with an access token. get: summary: Return all folders tags: - Folders x-scopes: google: min: https://www.googleapis.com/auth/gmail.labels others: https://www.googleapis.com/auth/gmail.modify microsoft: min: https://graph.microsoft.com/Mail.Read others: - https://graph.microsoft.com/Mail.ReadWrite - https://graph.microsoft.com/Mail.ReadWrite.Shared - https://graph.microsoft.com/Mail.Read.Shared yahoo: min: email, mail-r responses: '200': $ref: '#/components/responses/folders' '400': $ref: '#/components/responses/400' '401': $ref: '#/components/responses/401' '429': $ref: '#/components/responses/429' '504': $ref: '#/components/responses/504' operationId: get-folder description: Returns all folders for all providers. Nylas flattens sub-folders into a single list. security: - NYLAS_API_KEY: [] - ACCESS_TOKEN: [] parameters: - $ref: '#/components/parameters/field_selection' - $ref: '#/components/parameters/include_hidden_folders' - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/page_token' - $ref: '#/components/parameters/parent_id' - $ref: '#/components/parameters/shared_from' - $ref: '#/components/parameters/single_level' x-code-samples: - lang: bash label: cURL source: "curl --compressed --request GET \\\n --url 'https://api.us.nylas.com/v3/grants//folders' \\\n --header 'Accept: application/json' \\\n --header 'Authorization: Bearer ' \\\n --header 'Content-Type: application/json'" - lang: javascript label: Node.js SDK source: "import Nylas from \"nylas\";\n\nconst nylas = new Nylas({\n apiKey: \"\",\n apiUri: \"\",\n});\n\nasync function fetchFolders() {\n try {\n const folders = await nylas.folders.list({\n identifier: \"\",\n });\n\n console.log(\"folders:\", folders);\n } catch (error) {\n console.error(\"Error fetching folders:\", error);\n }\n}\n\nfetchFolders();\n" - lang: python label: Python SDK source: "from nylas import Client\n\nnylas = Client(\n \"\",\n \"\"\n)\n\ngrant_id = \"\"\nfolder_id = \"\"\n\nfolder = nylas.folders.list(\n grant_id\n)\n\nprint(folder)" - lang: ruby label: Ruby SDK source: "require 'nylas'\n\nnylas = Nylas::Client.new(\n api_key: \"\"\n)\n\nfolders, _ = nylas.folders.list(identifier: \"\")\n\nfolders.each { |folder|\n puts \"#{folder[:id]} | #{folder[:name]}\"\n}\n" - lang: java label: Java SDK source: "import com.nylas.NylasClient;\nimport com.nylas.models.*;\n\npublic class ReturnFolders {\n public static void main(String[] args) throws \n NylasSdkTimeoutError, NylasApiError {\n NylasClient nylas = new NylasClient.Builder(\"\").build();\n\n ListResponse folders = \n nylas.folders().list(\"\");\n for(Folder folder : folders.getData()){\n System.out.println(folder.getId() + \" | \" + folder.getName());\n }\n }\n}\n" - lang: kotlin label: Kotlin SDK source: "import com.nylas.NylasClient\n\nfun main(args: Array) {\n\n val nylas: NylasClient = NylasClient(\n apiKey = \"\"\n )\n\n val labels = nylas.folders().list(\"\")\n for (label in labels.data){\n println(label.id + \" | \" + label.name)\n }\n}\n" post: summary: Create a Folder operationId: post-folder description: Creates a folder. tags: - Folders x-scopes: google: min: https://www.googleapis.com/auth/gmail.labels others: https://www.googleapis.com/auth/gmail.modify microsoft: min: https://graph.microsoft.com/Mail.ReadWrite others: https://graph.microsoft.com/Mail.ReadWrite.Shared yahoo: min: email, mail-r, mail-w requestBody: $ref: '#/components/requestBodies/folder_create' responses: '200': $ref: '#/components/responses/folder' '400': $ref: '#/components/responses/400' '401': $ref: '#/components/responses/401' '429': $ref: '#/components/responses/429' '504': $ref: '#/components/responses/504' security: - NYLAS_API_KEY: [] - ACCESS_TOKEN: [] parameters: - $ref: '#/components/parameters/field_selection' - $ref: '#/components/parameters/shared_from' x-code-samples: - lang: bash label: cURL source: "curl --compressed --request POST \\\n --url 'https://api.us.nylas.com/v3/grants//folders' \\\n --header 'Content-Type: application/json' \\\n --header 'Accept: application/json' \\\n --header 'Authorization: Bearer ' \\\n --data '{\n \"text_color\": \"#000000\",\n \"name\": \"new folder\",\n \"background_color\": \"#73AFFF\"\n }'" - lang: javascript label: Node.js SDK source: "import Nylas from \"nylas\";\n\nconst nylas = new Nylas({\n apiKey: \"\",\n apiUri: \"\",\n});\nconst identifier = \"\";\n\nconst createFolder = async () => {\n try {\n const folder = await nylas.folders.create({\n identifier,\n requestBody: {\n name: \"New Folder\",\n },\n });\n\n console.log(\"Folder created:\", folder);\n } catch (error) {\n console.error(\"Error creating folder:\", error);\n }\n};\n\ncreateFolder();\n" - lang: python label: Python SDK source: "from nylas import Client\n\nnylas = Client(\n \"\",\n \"\"\n)\n\ngrant_id = \"\"\n\nfolder = nylas.folders.create(\n grant_id,\n request_body={\n \"name\": 'New Folder',\n }\n)\n\nprint(folder)" - lang: ruby label: Ruby SDK source: "require 'nylas'\n\nnylas = Nylas::Client.new(\n api_key: \"\"\n)\n\nrequest_body = {\n name: \"My Custom label\"\n}\n\nfolder = nylas.folders.create(identifier: \"\", \n request_body: request_body)" - lang: java label: Java SDK source: "import com.nylas.NylasClient;\nimport com.nylas.models.*;\n\npublic class CreateFolder {\n\n public static void main(String[] args) throws \n NylasSdkTimeoutError, NylasApiError {\n\n NylasClient nylas = new NylasClient.Builder(\"\").build();\n\n CreateFolderRequest request = \n new CreateFolderRequest(\"My Custom folder\", \"\", \"\", \"\");\n\n Response label = \n nylas.folders().create(\"\", request);\n }\n}\n" - lang: kotlin label: Kotlin SDK source: "import com.nylas.NylasClient\nimport com.nylas.models.CreateFolderRequest\n\nfun main(args: Array) {\n\n val nylas: NylasClient = NylasClient(\n apiKey = \"\"\n )\n\n val request = CreateFolderRequest(\"My Custom folder\")\n val folder = nylas.folders().create(\"\", request).data\n println(folder.name)\n}\n" /v3/grants/{grant_id}/folders/{folder_id}: parameters: - schema: type: string name: grant_id in: path required: true description: ID of the grant to access. Use `/me/` to refer to the grant associated with an access token. - schema: type: string name: folder_id in: path required: true description: 'ID of the folder to access. Nylas recommends you URL-encode this field, or you might receive a [`404` error](/docs/api/errors/400-response/) if the ID contains special characters (for example, `#`).' get: summary: Return a Folder tags: - Folders x-scopes: google: min: https://www.googleapis.com/auth/gmail.labels others: https://www.googleapis.com/auth/gmail.modify microsoft: min: https://graph.microsoft.com/Mail.Read others: - https://graph.microsoft.com/Mail.ReadWrite - https://graph.microsoft.com/Mail.ReadWrite.Shared - https://graph.microsoft.com/Mail.Read.Shared yahoo: min: email, mail-r responses: '200': $ref: '#/components/responses/folder' '400': $ref: '#/components/responses/400' '401': $ref: '#/components/responses/401' '404': $ref: '#/components/responses/404' '429': $ref: '#/components/responses/429' '504': $ref: '#/components/responses/504' operationId: get-folders-id security: - NYLAS_API_KEY: [] - ACCESS_TOKEN: [] parameters: - $ref: '#/components/parameters/field_selection' - $ref: '#/components/parameters/include_hidden_folders' - $ref: '#/components/parameters/shared_from' description: Returns the specified folder. x-code-samples: - lang: bash label: cURL source: "curl --compressed --request GET \\\n --url 'https://api.us.nylas.com/v3/grants//folders/' \\\n --header 'Accept: application/json' \\\n --header 'Authorization: Bearer ' \\\n --header 'Content-Type: application/json'" - lang: javascript label: Node.js SDK source: "import Nylas from \"nylas\";\n\nconst nylas = new Nylas({\n apiKey: \"\",\n apiUri: \"\",\n});\n\nasync function fetchFolderById() {\n try {\n const folder = await nylas.folders.find({\n identifier: \"\",\n folderId: \"\",\n });\n\n console.log(\"Folder:\", folder);\n } catch (error) {\n console.error(\"Error fetching folder:\", error);\n }\n}\n\nfetchFolderById();\n" - lang: python label: Python SDK source: "from nylas import Client\n\nnylas = Client(\n \"\",\n \"\"\n)\n\ngrant_id = \"\"\nfolder_id = \"\"\n\nmessage = nylas.folders.find(\n grant_id,\n folder_id,\n)\n\nprint(message)" - lang: ruby label: Ruby SDK source: "require 'nylas'\n\nnylas = Nylas::Client.new(\n api_key: \"\"\n)\n\nfolder, _ = nylas.folders.find(identifier: \"\", folder_id: \"\")\n\nputs folder" - lang: java label: Java SDK source: "import com.nylas.NylasClient;\nimport com.nylas.models.*;\n\npublic class GetLabel {\n\n public static void main(String[] args) throws \n NylasSdkTimeoutError, NylasApiError {\n NylasClient nylas = new NylasClient.Builder(\"\").build();\n\n Response folder = nylas.folders().find(\"\", \n \"\");\n System.out.println(folder);\n }\n}\n" - lang: kotlin label: Kotlin SDK source: "import com.nylas.NylasClient\n\nfun main(args: Array) {\n\n val nylas: NylasClient = NylasClient(\n apiKey = \"\"\n )\n\n val folder = nylas.folders().find(\"\", \n \"\")\n print(folder)\n}\n" put: summary: Update a folder tags: - Folders x-scopes: google: min: https://www.googleapis.com/auth/gmail.labels others: https://www.googleapis.com/auth/gmail.modify microsoft: min: https://graph.microsoft.com/Mail.ReadWrite others: https://graph.microsoft.com/Mail.ReadWrite.Shared yahoo: min: email, mail-r, mail-w responses: '200': $ref: '#/components/responses/folder' '400': $ref: '#/components/responses/400' '401': $ref: '#/components/responses/401' '404': $ref: '#/components/responses/404' '429': $ref: '#/components/responses/429' '504': $ref: '#/components/responses/504' operationId: put-folders-id description: 'Updates the specified folder. When you make a `PUT` request, Nylas replaces all data in the nested object with the information included in your request. For more information, see Updating objects.' security: - NYLAS_API_KEY: [] - ACCESS_TOKEN: [] parameters: - $ref: '#/components/parameters/field_selection' - $ref: '#/components/parameters/include_hidden_folders' - $ref: '#/components/parameters/shared_from' requestBody: $ref: '#/components/requestBodies/folder_update' x-code-samples: - lang: bash label: cURL source: "curl --compressed --request PUT \\\n --url 'https://api.us.nylas.com/v3/grants//folders/' \\\n --header 'Accept: application/json' \\\n --header 'Authorization: Bearer ' \\\n --header 'Content-Type: application/json' \\\n --data '{\n \"name\": \"Renamed folder\"\n }'" - lang: javascript label: Node.js SDK source: "import Nylas from \"nylas\";\n\nconst nylas = new Nylas({\n apiKey: \"\",\n apiUri: \"\",\n});\n\nasync function updateFolder() {\n try {\n const folder = await nylas.folders.update({\n identifier: \"\",\n folderId: \"\",\n requestBody: {\n name: \"Updated Folder Name\",\n textColor: \"#000000\",\n backgroundColor: \"#434343\",\n },\n });\n\n console.log(\"Updated Folder:\", folder);\n } catch (error) {\n console.error(\"Error to update folder:\", error);\n }\n}\n\nupdateFolder();\n" - lang: python label: Python SDK source: "from nylas import Client\n\nnylas = Client(\n \"\",\n \"\"\n)\n\ngrant_id = \"\"\n\nfolder = nylas.folders.update(\n grant_id,\n folder_id=\"\",\n request_body={\n \"name\": \"Updated Folder Name\",\n \"text_color\": \"#000000\",\n }\n)\n\nprint(folder)" - lang: ruby label: Ruby SDK source: "require 'nylas'\n\nnylas = Nylas::Client.new(\n api_key: \"\"\n)\n\nrequest_body = {\n name: \"Renamed folder\"\n}\n\nfolder, _ = nylas.folders.update(identifier: \"\", \n folder_id: \"Label_19\", request_body: request_body)\n\nputs folder" - lang: java label: Java SDK source: "import com.nylas.NylasClient;\nimport com.nylas.models.*;\n\npublic class UpdateLabel {\n\n public static void main(String[] args) throws \n NylasSdkTimeoutError, NylasApiError {\n\n NylasClient nylas = new NylasClient.Builder(\"\").build();\n\n UpdateFolderRequest updateRequest = new UpdateFolderRequest.Builder().\n name(\"Renamed \").build();\n\n Response folder = nylas.folders().update(\"\", \n \"\", updateRequest);\n }\n}\n" - lang: kotlin label: Kotlin SDK source: "import com.nylas.NylasClient\nimport com.nylas.models.UpdateFolderRequest\n\nfun main(args: Array) {\n\n val nylas: NylasClient = NylasClient(\n apiKey = \"\"\n )\n\n val requestBody = UpdateFolderRequest.Builder().\n name(\"Renamed Folder\").build();\n\n val folder = nylas.folders().update(\"\", \n \"\", requestBody)\n\n print(folder.data)\n}\n" delete: summary: Delete a Folder tags: - Folders x-scopes: google: min: https://www.googleapis.com/auth/gmail.labels others: https://www.googleapis.com/auth/gmail.modify microsoft: min: https://graph.microsoft.com/Mail.ReadWrite others: https://graph.microsoft.com/Mail.ReadWrite.Shared yahoo: min: email, mail-r, mail-w responses: '200': $ref: '#/components/responses/200-delete' '400': $ref: '#/components/responses/400' '401': $ref: '#/components/responses/401' '404': $ref: '#/components/responses/404' '429': $ref: '#/components/responses/429' '504': $ref: '#/components/responses/504' operationId: delete-folders-id description: Deletes the specified folder. security: - NYLAS_API_KEY: [] - ACCESS_TOKEN: [] parameters: - $ref: '#/components/parameters/shared_from' x-code-samples: - lang: bash label: cURL source: "curl --compressed --request DELETE \\\n --url 'https://api.us.nylas.com/v3/grants//folders/' \\\n --header 'Accept: application/json' \\\n --header 'Authorization: Bearer '" - lang: javascript label: Node.js SDK source: "import Nylas from \"nylas\";\n\nconst nylas = new Nylas({\n apiKey: \"\",\n apiUri: \"\",\n});\nconst identifier = \"\";\nconst folderId = \"\";\n\nconst deleteFolder = async () => {\n try {\n await nylas.folders.destroy({ identifier, folderId });\n console.log(`Folder with ID ${folderId} deleted successfully.`);\n } catch (error) {\n console.error(`Error deleting folder with ID ${folderId}:`, error);\n }\n};\n\ndeleteFolder();\n" - lang: python label: Python SDK source: "from nylas import Client\n\nnylas = Client(\n \"\",\n \"\"\n)\n\ngrant_id = \"\"\nfolder_id = \"\"\n\nrequest = nylas.folders.destroy(\n grant_id,\n folder_id,\n)\n\nprint(request)" - lang: ruby label: Ruby SDK source: "require 'nylas'\n\nnylas = Nylas::Client.new(\n api_key: \"\"\n)\n\nfolder, _ = nylas.folders.destroy(identifier: \"\", \nfolder_id: \"\")\n\nputs folder\n" - lang: java label: Java SDK source: "import com.nylas.NylasClient;\nimport com.nylas.models.*;\n\npublic class DestroyLabel {\n\n public static void main(String[] args) throws \n NylasSdkTimeoutError, NylasApiError {\n\n NylasClient nylas = new NylasClient.Builder(\"\").build();\n\n DeleteResponse folder = nylas.folders().destroy(\"\", \n \"\");\n }\n}\n" - lang: kotlin label: Kotlin SDK source: "import com.nylas.NylasClient\n\nfun main(args: Array) {\n\n val nylas: NylasClient = NylasClient(\n apiKey = \"\"\n )\n\n val folder = nylas.folders().destroy(\"\", \n \"\")\n\n print(folder)\n}\n" components: schemas: folder: title: Folder type: object description: An email folder or label. properties: background_color: type: string description: '(Google only) The background color of the folder, in hexadecimal format (for example, `#0099EE`). See the [list of Google-defined values](https://developers.google.com/gmail/api/reference/rest/v1/users.labels#color) for more information.' child_count: type: integer description: (Microsoft and EWS only) The number of immediate child folders nested under the specified folder. readOnly: true grant_id: $ref: '#/components/schemas/grant_id' id: $ref: '#/components/schemas/id' name: type: string description: The name of the folder. example: Invoices object: $ref: '#/components/schemas/object' parent_id: type: string description: (Microsoft and EWS only) The ID of the parent folder. single_level: type: boolean description: (Microsoft only) If `true`, retrieves folders from a single-level hierarchy only. If `false`, retrieves folders across a multi-level hierarchy. system_folder: type: boolean description: '(Google only) If `true`, the folder is a standard folder created by Google. If `false`, the folder was created by the user.' readOnly: true text_color: type: string description: '(Google only) The text color of the folder, in hexadecimal format (for example, `#0099EE`). See the [list of Google-defined values](https://developers.google.com/gmail/api/reference/rest/v1/users.labels#color) for more information.' total_count: type: integer description: The number of items inside the folder. readOnly: true unread_count: type: integer description: The number of unread items inside the folder. readOnly: true attributes: type: array description: 'An array of attribute descriptors shared by system folders across providers. For example, folders that contain sent messages ("Sent Items" on Microsoft, or "SENT" on other providers) have the `["\\Sent"]` attribute. For more information, see [Common folder attributes](/docs/v3/email/folders/#common-folder-attributes). If a folder does not have one of the standard system folders, Nylas returns the `attributes` array empty. You can''t query for folders using attributes, but you _can_ manually filter through folders to find any that match the attributes you''re looking for.' items: type: string minItems: 0 common_response: properties: request_id: type: string description: The request ID. data: type: object description: The response object. example: request_id: 5fa64c92-e840-4357-86b9-2aa364d35b88 grant_id: title: Grant ID type: string description: The ID of grant for the connected user. example: 41009df5-bf11-4c97-aa18-b285b5f2e386 readOnly: true update_folder: title: update_folder type: object properties: name: type: string description: The name of the folder to be updated. parent_id: type: string description: (Microsoft and EWS only) The ID of the parent folder. text_color: type: string description: '(Google only) The text color of the folder, in hexadecimal format (for example, `#0099EE`). See [Google''s reference documentation](https://developers.google.com/gmail/api/reference/rest/v1/users.labels#color) for a list of accepted values.' background_color: type: string description: '(Google only) The background color of the folder, in hexadecimal format (for example, `#0099EE`). See [Google''s reference documentation](https://developers.google.com/gmail/api/reference/rest/v1/users.labels#color) for a list of accepted values.' common_response_with_cursor: properties: request_id: type: string description: The request ID. data: type: object description: The response object. next_cursor: type: - string - 'null' description: A cursor pointing to the next page of results for the request. example: request_id: 5fa64c92-e840-4357-86b9-2aa364d35b88 next_cursor: CigKGjRlaDdyNGQydTFqbWJ0bGo5a2QxdWJtdDZnGAEggIDAu7fw7bEYGg8IABIAGPjh2PGEi_0CIAEiBwgCEOqs6i4= object: type: string description: The type of object. create_folder: title: create_folder type: object required: - name properties: name: type: string maxLength: 1024 minLength: 1 description: Creates a folder with the specified display name. parent_id: type: string description: (Microsoft and EWS only) The ID of the parent folder. text_color: type: string description: (Google only) The text color of the folder, in hexadecimal format (for example, `#0099EE`). See the [list of Google-defined values](https://developers.google.com/gmail/api/reference/rest/v1/users.labels#color) for more information. background_color: type: string description: (Google only) The background color of the folder, in hexadecimal format (for example, `#0099EE`). See the [list of Google-defined values](https://developers.google.com/gmail/api/reference/rest/v1/users.labels#color) for more information. id: title: ID type: string minLength: 1 description: A globally unique object identifier for Microsoft accounts. An email address for Google accounts. example: 5d3qmne77v32r8l4phyuksl2x, nyla@example.com parameters: field_selection: name: select in: query required: false schema: type: string description: '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.' page_token: name: page_token in: query required: false schema: type: string description: 'An identifier that specifies which page of data to return. You can get this value from the `next_cursor` response field. See [Pagination](/docs/reference/api/#pagination) for more information.' parent_id: name: parent_id in: query schema: type: string description: (Microsoft and EWS only) Use the ID of a folder to find all child folders it contains. limit: name: limit in: query required: false schema: type: integer default: 50 maximum: 200 description: 'The maximum number of objects to return. See [Pagination](/docs/reference/api/#pagination) for more information.' include_hidden_folders: name: include_hidden_folders in: query schema: type: boolean default: false description: (Microsoft only) When `true`, Nylas includes hidden folders in its response. shared_from: name: shared_from in: query schema: type: string description: '(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](/docs/provider-guides/microsoft/shared-folders) guide for more information.' single_level: name: single_level schema: type: boolean default: false in: query required: false description: (Microsoft only) If `true`, retrieves folders from a single-level hierarchy only. If `false`, retrieves folders across a multi-level hierarchy. responses: folder: description: Folder content: application/json: schema: allOf: - $ref: '#/components/schemas/common_response' - properties: data: $ref: '#/components/schemas/folder' example: Folder response example: request_id: 5fa64c92-e840-4357-86b9-2aa364d35b88 data: id: SENT grant_id: 41009df5-bf11-4c97-aa18-b285b5f2e386 name: SENT system_folder: true attributes: - \Sent folders: description: Returned all folders content: application/json: schema: allOf: - $ref: '#/components/schemas/common_response_with_cursor' - properties: data: type: array items: $ref: '#/components/schemas/folder' example: request_id: 5fa64c92-e840-4357-86b9-2aa364d35b88 data: - id: SENT grant_id: 41009df5-bf11-4c97-aa18-b285b5f2e386 name: SENT system_folder: true - id: INBOX grant_id: 41009df5-bf11-4c97-aa18-b285b5f2e386 name: INBOX system_folder: true - id: Label_2 grant_id: 41009df5-bf11-4c97-aa18-b285b5f2e386 name: New Label with Color system_folder: false next_cursor: CigKGjRlaDdyNGQydTFqbWJ0bGo5a2QxdWJtdDZnGAEggIDAu7fw7bEYGg8IABIAGPjh2PGEi_0CIAEiBwgCEOqs6i4= '504': description: Provider Failure content: application/json: schema: title: error type: object properties: request_id: type: string description: The request ID. error: type: object description: The response error object. properties: type: type: string description: The error type. message: type: string description: The error message. examples: Provider Failure: value: request_id: 5fa64c92-e840-4357-86b9-2aa364d35b88 error: type: provider_error message: Provider request timed out. '429': description: Rate Limit content: application/json: schema: title: error type: object properties: request_id: type: string description: The request ID. error: type: object description: The response error object. properties: type: type: string description: The error type. message: type: string description: The error message. examples: Not Found: value: request_id: 5fa64c92-e840-4357-86b9-2aa364d35b88 error: type: rate_limit_error message: Too many requests, please try again shortly. '401': description: Unauthorized content: application/json: schema: title: error type: object properties: request_id: type: string description: The request ID. error: type: object description: The response error object. properties: type: type: string description: The error type. message: type: string description: The error message. provider_error: type: object description: The error from the provider. examples: Unauthorized: value: request_id: 5fa64c92-e840-4357-86b9-2aa364d35b88 error: type: unauthorized message: Unauthorized provider_error: code: 401 message: Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. '404': description: Not Found content: application/json: schema: title: error type: object properties: request_id: type: string description: The request ID. error: type: object description: The response error object. properties: type: type: string description: The error type. message: type: string description: The error message. provider_error: type: object description: The raw error from the provider, if available properties: code: type: string message: type: string examples: Not Found: value: request_id: 5fa64c92-e840-4357-86b9-2aa364d35b88 error: type: not_found_error message: requested object not found provider_error: code: MailboxNotEnabledForRESTAPI message: The mailbox is either inactive, soft-deleted, or is hosted on-premise. '400': description: Bad Request content: application/json: schema: title: error type: object properties: request_id: type: string description: The request ID. error: type: object description: The response error object. properties: type: type: string description: The error type. message: type: string description: The error message. provider_error: type: object description: The error from the provider. examples: Bad Request: value: request_id: 5fa64c92-e840-4357-86b9-2aa364d35b88 error: type: invalid_request_error message: error parsing request body provider_error: code: TargetIdShouldNotBeMeOrWhitespace message: Id is malformed. Invalid Idempotency-Key: value: request_id: 5fa64c92-e840-4357-86b9-2aa364d35b88 error: type: api.invalid_idempotency_key message: Idempotency-Key must be 256 characters or fewer. 200-delete: description: Delete Succeeded content: application/json: schema: type: object required: - request_id properties: request_id: type: string description: ID of the request. example: 5967ca40-a2d8-4ee0-a0e0-6f18ace39a90 requestBodies: folder_update: content: application/json: schema: $ref: '#/components/schemas/update_folder' examples: Google Folder: value: name: Invoices text_color: '#fff' background_color: '#00FF00' Microsoft Folder: value: name: Invoices parent_id: AAMkADk0ZWVhMzJhLWY1ODktNDRhZi1hNDcyLWJkMDRlYmE0MTc3ZAAuAAAAAAC6eJwD9EoFS4TLH1YcoDjXAQDIFSkx-42TT5zffjtLuf8AAAAAAAEIAAA= folder_create: content: application/json: schema: $ref: '#/components/schemas/create_folder' examples: Google Folder: value: name: Invoices text_color: '#fff' background_color: '#00FF00' Microsoft Folder: value: name: Invoices parent_id: AAMkADk0ZWVhMzJhLWY1ODktNDRhZi1hNDcyLWJkMDRlYmE0MTc3ZAAuAAAAAAC6eJwD9EoFS4TLH1YcoDjXAQDIFSkx-42TT5zffjtLuf8AAAAAAAEIAAA= securitySchemes: ACCESS_TOKEN: scheme: bearer type: http bearerFormat: NYLAS_ACCESS_TOKEN description: 'The Nylas **access token** for a specific grant. Issued as part of OAuth 2.1 flow token exchange.' NYLAS_API_KEY: scheme: bearer type: http bearerFormat: NYLAS_API_KEY description: 'The Nylas **API key** provides application-level access to APIs and all grants. You can generate these from the Dashboard. Learn more about [authorizing requests](/docs/v3/auth/).' SCHEDULER_SESSION_TOKEN: scheme: bearer type: http bearerFormat: Session ID description: The Nylas Scheduler **session ID** that Scheduler UI Components use to authorize API requests.