{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "MessagePayload",
  "type": "object",
  "description": "The message object containing all parameters for a transactional email, including recipients, content, attachments, and tracking options.",
  "properties": {
    "html": {
      "type": "string",
      "description": "The full HTML content of the message."
    },
    "text": {
      "type": "string",
      "description": "The full plain-text content of the message."
    },
    "subject": {
      "type": "string",
      "description": "The message subject line."
    },
    "from_email": {
      "type": "string",
      "description": "The sender email address."
    },
    "from_name": {
      "type": "string",
      "description": "The sender display name."
    },
    "to": {
      "type": "array",
      "description": "An array of recipient objects."
    },
    "headers": {
      "type": "object",
      "description": "Optional extra headers to add to the message (e.g., Reply-To)."
    },
    "important": {
      "type": "boolean",
      "description": "Whether this message is important and should be delivered ahead of non-important messages."
    },
    "track_opens": {
      "type": "boolean",
      "description": "Whether to enable open tracking for this message."
    },
    "track_clicks": {
      "type": "boolean",
      "description": "Whether to enable click tracking for this message."
    },
    "auto_text": {
      "type": "boolean",
      "description": "Whether to automatically generate a plain-text version from the HTML content."
    },
    "auto_html": {
      "type": "boolean",
      "description": "Whether to automatically generate HTML from the plain-text content."
    },
    "inline_css": {
      "type": "boolean",
      "description": "Whether to automatically inline all CSS styles from style blocks in the HTML content."
    },
    "url_strip_qs": {
      "type": "boolean",
      "description": "Whether to strip query strings from URLs when aggregating tracked click data."
    },
    "preserve_recipients": {
      "type": "boolean",
      "description": "Whether to show all recipients in the To header of each email."
    },
    "view_content_link": {
      "type": "boolean",
      "description": "Whether to include a View Content Link in the Mandrill dashboard for this message."
    },
    "bcc_address": {
      "type": "string",
      "description": "An optional address to BCC on the message."
    },
    "tracking_domain": {
      "type": "string",
      "description": "A custom domain to use for tracking opens and clicks."
    },
    "signing_domain": {
      "type": "string",
      "description": "A custom domain to use for DKIM signing instead of the default."
    },
    "return_path_domain": {
      "type": "string",
      "description": "A custom domain to use for the return-path header."
    },
    "merge": {
      "type": "boolean",
      "description": "Whether to evaluate merge tags in the message."
    },
    "merge_language": {
      "type": "string",
      "description": "The merge tag language to use (Mailchimp or Handlebars)."
    },
    "global_merge_vars": {
      "type": "array",
      "description": "Global merge variables applied to all recipients."
    },
    "merge_vars": {
      "type": "array",
      "description": "Per-recipient merge variables."
    },
    "tags": {
      "type": "array",
      "description": "An array of string tags to apply to this message for analytics."
    },
    "subaccount": {
      "type": "string",
      "description": "The unique ID of a subaccount for this message."
    },
    "google_analytics_domains": {
      "type": "array",
      "description": "An array of domains for which Google Analytics tracking parameters will be appended."
    },
    "google_analytics_campaign": {
      "type": "string",
      "description": "The utm_campaign tracking parameter for Google Analytics."
    },
    "metadata": {
      "type": "object",
      "description": "Key-value metadata to associate with the message."
    },
    "recipient_metadata": {
      "type": "array",
      "description": "Per-recipient metadata."
    },
    "attachments": {
      "type": "array",
      "description": "An array of file attachments."
    },
    "images": {
      "type": "array",
      "description": "An array of inline images referenced with \"cid:\" in the HTML content."
    }
  }
}