{
  "service": "nylas",
  "displayName": "Nylas",
  "categories": [
    "Communication",
    "Productivity"
  ],
  "authTypes": [
    "api_key"
  ],
  "auth": [
    {
      "type": "api_key",
      "label": "API Key",
      "placeholder": "NYLAS_API_KEY",
      "description": "Nylas API key used with the Authorization Bearer header. Create or view API keys in the Nylas Dashboard: https://dashboard-v3.nylas.com/developer/api-keys.",
      "extraFields": []
    }
  ],
  "homepageUrl": "https://www.nylas.com",
  "actions": [
    {
      "id": "nylas.get_grant",
      "service": "nylas",
      "name": "get_grant",
      "description": "Get one Nylas grant by ID.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "grantId": {
            "type": "string",
            "minLength": 1,
            "description": "The Nylas grant ID to access. Nylas also accepts the grant email address for grant-scoped endpoints."
          },
          "exposeAliases": {
            "type": "boolean",
            "description": "Whether Nylas should include Google or Microsoft email aliases."
          }
        },
        "additionalProperties": false,
        "required": [
          "grantId"
        ],
        "description": "The input payload for getting a Nylas grant."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "requestId": {
            "anyOf": [
              {
                "type": "string",
                "description": "The Nylas request ID when returned."
              },
              {
                "type": "null"
              }
            ]
          },
          "grant": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "description": "The Nylas grant ID."
              },
              "provider": {
                "type": "string",
                "minLength": 1,
                "description": "The provider connected to this grant."
              },
              "email": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The email address associated with the grant when returned."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "name": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The user display name associated with the grant when returned."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "grantStatus": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The Nylas grant status when returned."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "createdAt": {
                "anyOf": [
                  {
                    "type": "number",
                    "description": "When the grant was created, in Unix seconds."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "updatedAt": {
                "anyOf": [
                  {
                    "type": "number",
                    "description": "When the grant was last updated, in Unix seconds."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "raw": {
                "type": "object",
                "properties": {},
                "additionalProperties": true,
                "description": "The raw Nylas object returned by the API."
              }
            },
            "additionalProperties": false,
            "required": [
              "id",
              "provider",
              "email",
              "name",
              "grantStatus",
              "createdAt",
              "updatedAt",
              "raw"
            ],
            "description": "A Nylas grant object."
          },
          "raw": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "The raw Nylas response payload."
          }
        },
        "additionalProperties": false,
        "required": [
          "requestId",
          "grant",
          "raw"
        ],
        "description": "The response returned when getting a Nylas grant."
      }
    },
    {
      "id": "nylas.list_calendars",
      "service": "nylas",
      "name": "list_calendars",
      "description": "List calendars for a Nylas grant.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "grantId": {
            "type": "string",
            "minLength": 1,
            "description": "The Nylas grant ID to access. Nylas also accepts the grant email address for grant-scoped endpoints."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "description": "The maximum number of calendars to return."
          },
          "pageToken": {
            "type": "string",
            "minLength": 1,
            "description": "The cursor token for the page to return."
          },
          "select": {
            "type": "string",
            "minLength": 1,
            "description": "A comma-separated list of calendar fields for Nylas to return."
          }
        },
        "additionalProperties": false,
        "required": [
          "grantId"
        ],
        "description": "The input payload for listing Nylas calendars."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "requestId": {
            "anyOf": [
              {
                "type": "string",
                "description": "The Nylas request ID when returned."
              },
              {
                "type": "null"
              }
            ]
          },
          "calendars": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The calendar ID."
                },
                "name": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The calendar display name when returned."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "description": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The calendar description when returned."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "timezone": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The calendar timezone when returned."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "isPrimary": {
                  "anyOf": [
                    {
                      "type": "boolean",
                      "description": "Whether this is the user's primary calendar when returned."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "readOnly": {
                  "anyOf": [
                    {
                      "type": "boolean",
                      "description": "Whether the calendar is read-only when returned."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "raw": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true,
                  "description": "The raw Nylas object returned by the API."
                }
              },
              "additionalProperties": false,
              "required": [
                "id",
                "name",
                "description",
                "timezone",
                "isPrimary",
                "readOnly",
                "raw"
              ],
              "description": "A Nylas calendar object."
            },
            "description": "The calendars returned by Nylas."
          },
          "nextCursor": {
            "anyOf": [
              {
                "type": "string",
                "description": "The cursor token for the next page when Nylas returns one."
              },
              {
                "type": "null"
              }
            ]
          },
          "raw": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "The raw Nylas response payload."
          }
        },
        "additionalProperties": false,
        "required": [
          "requestId",
          "calendars",
          "nextCursor",
          "raw"
        ],
        "description": "The response returned when listing Nylas calendars."
      }
    },
    {
      "id": "nylas.list_events",
      "service": "nylas",
      "name": "list_events",
      "description": "List calendar events for a Nylas grant and calendar.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "grantId": {
            "type": "string",
            "minLength": 1,
            "description": "The Nylas grant ID to access. Nylas also accepts the grant email address for grant-scoped endpoints."
          },
          "calendarId": {
            "type": "string",
            "minLength": 1,
            "description": "The Nylas calendar ID to filter events by. Use primary to query the user's primary calendar."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "description": "The maximum number of events to return."
          },
          "pageToken": {
            "type": "string",
            "minLength": 1,
            "description": "The cursor token for the page to return."
          },
          "start": {
            "type": "integer",
            "minimum": 0,
            "description": "Filter events that start at or after this Unix timestamp."
          },
          "end": {
            "type": "integer",
            "minimum": 0,
            "description": "Filter events that end at or before this Unix timestamp."
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "description": "Filter events by title text."
          },
          "description": {
            "type": "string",
            "minLength": 1,
            "description": "Filter events by description text."
          },
          "location": {
            "type": "string",
            "minLength": 1,
            "description": "Filter events by location text."
          },
          "showCancelled": {
            "type": "boolean",
            "description": "Whether Nylas should include cancelled events."
          },
          "tentativeAsBusy": {
            "type": "boolean",
            "description": "Whether Nylas should treat tentative Microsoft events as busy."
          },
          "updatedAfter": {
            "type": "integer",
            "minimum": 0,
            "description": "Filter events updated after this Unix timestamp."
          },
          "updatedBefore": {
            "type": "integer",
            "minimum": 0,
            "description": "Filter events updated before this Unix timestamp."
          },
          "select": {
            "type": "string",
            "minLength": 1,
            "description": "A comma-separated list of event fields for Nylas to return."
          }
        },
        "additionalProperties": false,
        "required": [
          "grantId",
          "calendarId"
        ],
        "description": "The input payload for listing Nylas events."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "requestId": {
            "anyOf": [
              {
                "type": "string",
                "description": "The Nylas request ID when returned."
              },
              {
                "type": "null"
              }
            ]
          },
          "events": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The event ID."
                },
                "title": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The event title when returned."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "calendarId": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The calendar ID associated with the event when returned."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "grantId": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The grant ID associated with the event when returned."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "busy": {
                  "anyOf": [
                    {
                      "type": "boolean",
                      "description": "Whether the event blocks time as busy when returned."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "status": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The event status when returned."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "htmlLink": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The provider event URL when returned."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "raw": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true,
                  "description": "The raw Nylas object returned by the API."
                }
              },
              "additionalProperties": false,
              "required": [
                "id",
                "title",
                "calendarId",
                "grantId",
                "busy",
                "status",
                "htmlLink",
                "raw"
              ],
              "description": "A Nylas event object."
            },
            "description": "The events returned by Nylas."
          },
          "nextCursor": {
            "anyOf": [
              {
                "type": "string",
                "description": "The cursor token for the next page when Nylas returns one."
              },
              {
                "type": "null"
              }
            ]
          },
          "raw": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "The raw Nylas response payload."
          }
        },
        "additionalProperties": false,
        "required": [
          "requestId",
          "events",
          "nextCursor",
          "raw"
        ],
        "description": "The response returned when listing Nylas events."
      }
    },
    {
      "id": "nylas.list_grants",
      "service": "nylas",
      "name": "list_grants",
      "description": "List grants in the Nylas application with optional filters.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "limit": {
            "type": "integer",
            "minimum": 1,
            "description": "The maximum number of grants to return."
          },
          "offset": {
            "type": "integer",
            "minimum": 0,
            "description": "The result offset for Nylas offset pagination."
          },
          "email": {
            "type": "string",
            "minLength": 1,
            "description": "Filter grants by email address."
          },
          "provider": {
            "type": "string",
            "minLength": 1,
            "description": "Filter grants by provider name."
          },
          "grantStatus": {
            "type": "string",
            "enum": [
              "valid",
              "invalid"
            ],
            "description": "Filter grants by grant status."
          },
          "workspaceId": {
            "type": "string",
            "minLength": 1,
            "description": "Filter grants by Nylas workspace ID."
          },
          "since": {
            "type": "integer",
            "minimum": 0,
            "description": "Return grants created at or after this Unix timestamp."
          },
          "before": {
            "type": "integer",
            "minimum": 0,
            "description": "Return grants created at or before this Unix timestamp."
          },
          "orderBy": {
            "type": "string",
            "minLength": 1,
            "description": "The sort order accepted by Nylas."
          },
          "sortBy": {
            "type": "string",
            "minLength": 1,
            "description": "The field Nylas should use to sort grants."
          }
        },
        "additionalProperties": false,
        "description": "The input payload for listing Nylas grants."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "requestId": {
            "anyOf": [
              {
                "type": "string",
                "description": "The Nylas request ID when returned."
              },
              {
                "type": "null"
              }
            ]
          },
          "grants": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The Nylas grant ID."
                },
                "provider": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The provider connected to this grant."
                },
                "email": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The email address associated with the grant when returned."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "name": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The user display name associated with the grant when returned."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "grantStatus": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The Nylas grant status when returned."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "createdAt": {
                  "anyOf": [
                    {
                      "type": "number",
                      "description": "When the grant was created, in Unix seconds."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "updatedAt": {
                  "anyOf": [
                    {
                      "type": "number",
                      "description": "When the grant was last updated, in Unix seconds."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "raw": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true,
                  "description": "The raw Nylas object returned by the API."
                }
              },
              "additionalProperties": false,
              "required": [
                "id",
                "provider",
                "email",
                "name",
                "grantStatus",
                "createdAt",
                "updatedAt",
                "raw"
              ],
              "description": "A Nylas grant object."
            },
            "description": "The grants returned by Nylas."
          },
          "limit": {
            "anyOf": [
              {
                "type": "number",
                "description": "The page limit returned by Nylas when present."
              },
              {
                "type": "null"
              }
            ]
          },
          "offset": {
            "anyOf": [
              {
                "type": "number",
                "description": "The page offset returned by Nylas when present."
              },
              {
                "type": "null"
              }
            ]
          },
          "raw": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "The raw Nylas response payload."
          }
        },
        "additionalProperties": false,
        "required": [
          "requestId",
          "grants",
          "limit",
          "offset",
          "raw"
        ],
        "description": "The response returned when listing Nylas grants."
      }
    }
  ]
}
