{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/nylas/main/json-schema/nylas-amazon-sns-input-payload-schema.json",
  "title": "Amazon SNS Channel Payload",
  "x-generated": "2026-10-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/nylas-amazon-sns-notifications-api-openapi.yml#/components/schemas/amazon_sns_input_payload",
  "required": [
    "trigger_types",
    "topic",
    "role_arn"
  ],
  "type": "object",
  "properties": {
    "description": {
      "type": "string",
      "description": "A human-readable description of the Amazon SNS channel."
    },
    "trigger_types": {
      "$ref": "#/$defs/trigger_types"
    },
    "topic": {
      "type": "string",
      "description": "The Amazon SNS topic ARN that Nylas sends notifications to. Must start with `arn:aws:sns:`."
    },
    "role_arn": {
      "type": "string",
      "description": "The ARN of the IAM role that Nylas assumes to publish messages to the SNS topic. Must match `arn:aws:iam::<account-id>:role/<role-name>`."
    },
    "notification_email_addresses": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "The email addresses that Nylas notifies if delivery to the Amazon SNS channel fails."
    },
    "compressed_delivery": {
      "type": "boolean",
      "description": "If `true`, Nylas gzip-compresses and then base64-encodes notification payloads before delivering them. Nylas adds a `content_encoding: gzip+base64` message attribute to the SNS message. To decode, base64-decode the message body, then gzip-decompress. Default is `false`.",
      "default": false
    }
  },
  "$defs": {
    "trigger_types": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "calendar.created",
          "calendar.updated",
          "calendar.deleted",
          "event.created",
          "event.updated",
          "event.deleted",
          "grant.created",
          "grant.updated",
          "grant.deleted",
          "grant.expired",
          "grant.imap_sync_completed",
          "message.send_success",
          "message.send_failed",
          "message.bounce_detected",
          "message.created",
          "message.created.cleaned",
          "message.opened",
          "message.opened.legacy",
          "message.updated",
          "message.link_clicked",
          "message.link_clicked.legacy",
          "thread.replied",
          "thread.replied.legacy",
          "contact.updated",
          "contact.deleted",
          "folder.created",
          "folder.updated",
          "folder.deleted",
          "booking.created",
          "booking.pending",
          "booking.rescheduled",
          "booking.cancelled",
          "booking.reminder",
          "message.deleted",
          "message.transactional.bounced",
          "message.transactional.complaint",
          "message.transactional.delivered",
          "message.transactional.rejected",
          "message.bounced",
          "message.complaint",
          "message.delivered",
          "message.rejected",
          "notetaker.created",
          "notetaker.updated",
          "notetaker.deleted",
          "notetaker.meeting_state",
          "notetaker.media"
        ]
      },
      "description": "The event that triggers the notification. See the\n[notification schemas](/docs/reference/notifications/) for details about each trigger\ntype.\n\nSee the [Grants](/docs/reference/api/manage-grants/), [Calendar](/docs/reference/api/calendar/),\n[Events](/docs/reference/api/events/), and [Messages](/docs/reference/api/messages/) references\nfor information on how to trigger each event type."
    }
  }
}