{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/eloqua/json-schema/eloqua-query-result-email-schema.json",
  "title": "QueryResultEmail",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/eloqua-emails-api-openapi.yml#/components/schemas/QueryResultEmail",
  "type": "object",
  "properties": {
    "elements": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Email"
      }
    },
    "page": {
      "type": "integer"
    },
    "pageSize": {
      "type": "integer"
    },
    "total": {
      "type": "integer"
    }
  },
  "$defs": {
    "Email": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Unique identifier for the email",
          "readOnly": true
        },
        "name": {
          "type": "string",
          "description": "Email name"
        },
        "description": {
          "type": "string",
          "description": "Email description"
        },
        "subject": {
          "type": "string",
          "description": "Email subject line"
        },
        "senderName": {
          "type": "string",
          "description": "Sender name displayed to recipients"
        },
        "senderEmail": {
          "type": "string",
          "format": "email",
          "description": "Sender email address"
        },
        "replyToEmail": {
          "type": "string",
          "format": "email",
          "description": "Reply-to email address"
        },
        "replyToName": {
          "type": "string",
          "description": "Reply-to name"
        },
        "previewText": {
          "type": "string",
          "description": "Preheader text (max 500 characters)",
          "maxLength": 500
        },
        "htmlContent": {
          "type": "object",
          "description": "HTML content of the email",
          "properties": {
            "type": {
              "type": "string"
            },
            "contentSource": {
              "type": "string",
              "description": "HTML source content"
            }
          }
        },
        "plainText": {
          "type": "string",
          "description": "Plain text version of the email"
        },
        "sendPlainTextOnly": {
          "type": "boolean",
          "description": "Whether to send as plain text only"
        },
        "isTracked": {
          "type": "string",
          "description": "Whether Eloqua tracks interactions"
        },
        "currentStatus": {
          "type": "string",
          "description": "Current email status",
          "readOnly": true
        },
        "renderMode": {
          "type": "string",
          "enum": [
            "fixed",
            "flow"
          ],
          "description": "Email layout rendering mode"
        },
        "archived": {
          "type": "boolean",
          "description": "Whether the email is archived"
        },
        "folderId": {
          "type": "string",
          "description": "Containing folder identifier",
          "readOnly": true
        },
        "createdAt": {
          "type": "string",
          "description": "Creation timestamp (Unix time)",
          "readOnly": true
        },
        "updatedAt": {
          "type": "string",
          "description": "Last update timestamp (Unix time)",
          "readOnly": true
        },
        "createdBy": {
          "type": "string",
          "description": "User who created the email",
          "readOnly": true
        },
        "updatedBy": {
          "type": "string",
          "description": "User who last updated the email",
          "readOnly": true
        },
        "depth": {
          "type": "string",
          "description": "Level of detail returned",
          "readOnly": true
        },
        "type": {
          "type": "string",
          "description": "Asset type in Eloqua",
          "readOnly": true
        }
      }
    }
  }
}