{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/nylas/refs/heads/main/json-schema/nylas-grant-updated.schema.json",
  "title": "Nylas grant.updated notification object",
  "description": "Sent when a grant is modified, updated, or re-authenticated. This schema describes `data.object` inside the Nylas notification envelope.",
  "type": "object",
  "required": [],
  "properties": {
    "code": {
      "type": "integer",
      "description": "Nylas notification code. A value of `25014` indicates a normal update; `25027` indicates a re-authentication event."
    },
    "grant_id": {
      "type": "string",
      "description": "Unique identifier for the grant."
    },
    "integration_id": {
      "type": "string",
      "description": "Identifier for the connector (integration) associated with this grant."
    },
    "provider": {
      "type": "string",
      "description": "Email provider for this grant.",
      "enum": [
        "google",
        "microsoft",
        "imap",
        "yahoo",
        "icloud",
        "ews",
        "eas"
      ]
    },
    "email": {
      "type": "string",
      "description": "Email address associated with the grant."
    },
    "reauthentication_flag": {
      "type": "boolean",
      "description": "Whether this update was triggered by a re-authentication flow."
    },
    "scope": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Granted OAuth scopes. Only reliably present on `grant.created` events. For `grant.updated`, this field is typically absent."
    }
  },
  "x-nylas-trigger": "grant.updated",
  "x-nylas-category": "Grants",
  "x-provenance": {
    "method": "authored",
    "publisher": "Nylas",
    "source": "https://developer.nylas.com/docs/reference/notifications/grants/grant-updated/",
    "derived_from": "nylas/developer.nylas.com@a7995fb6:src/_component-data/notification-schemas.json",
    "generated": "2026-09-28"
  },
  "examples": [
    {
      "code": 25014,
      "grant_id": "<NYLAS_GRANT_ID>",
      "integration_id": "<NYLAS_INTEGRATION_ID>",
      "provider": "microsoft",
      "reauthentication_flag": false,
      "email": "user@example.com"
    }
  ]
}