{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/nylas/refs/heads/main/json-schema/nylas-message-rejected.schema.json",
  "title": "Nylas message.rejected notification object",
  "description": "Sent when an email was rejected because one or more attachments contained a virus. This schema describes `data.object` inside the Nylas notification envelope.",
  "type": "object",
  "properties": {
    "message": {
      "type": "object",
      "description": "The original message that was rejected.",
      "properties": {
        "id": {
          "type": "string",
          "description": "The Nylas message ID."
        },
        "subject": {
          "type": "string",
          "description": "The message subject line."
        },
        "from": {
          "type": "string",
          "description": "Sender email address."
        },
        "to": {
          "type": "array",
          "description": "Primary recipient email addresses.",
          "items": {
            "type": "string"
          }
        },
        "cc": {
          "type": "array",
          "description": "CC recipient email addresses. Omitted if none were specified.",
          "items": {
            "type": "string"
          }
        },
        "bcc": {
          "type": "array",
          "description": "BCC recipient email addresses. Omitted if none were specified.",
          "items": {
            "type": "string"
          }
        },
        "sent_at": {
          "type": "integer",
          "description": "Unix timestamp when the message was sent."
        },
        "metadata": {
          "type": "object",
          "description": "Custom key-value metadata attached when sending. Omitted if none were provided.",
          "additionalProperties": true
        }
      }
    },
    "rejected_at": {
      "type": "integer",
      "description": "Unix timestamp when the message was rejected."
    }
  },
  "required": [
    "message",
    "rejected_at"
  ],
  "x-nylas-trigger": "message.rejected",
  "x-nylas-category": "Agent Accounts",
  "x-provenance": {
    "method": "authored",
    "publisher": "Nylas",
    "source": "https://developer.nylas.com/docs/reference/notifications/agent-accounts/message-rejected/",
    "derived_from": "nylas/developer.nylas.com@a7995fb6:src/_component-data/notification-schemas.json",
    "generated": "2026-09-28"
  },
  "examples": [
    {
      "message": {
        "id": "<MESSAGE_ID>",
        "subject": "Your order has shipped",
        "from": "notifications@example.com",
        "to": [
          "jordan.taylor@example.com"
        ],
        "cc": [
          "sam.lee@example.com"
        ],
        "bcc": [
          "alex.johnson@example.com"
        ],
        "sent_at": 1234567890,
        "metadata": {
          "campaign": "welcome-email"
        }
      },
      "rejected_at": 1234567890
    }
  ]
}