{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/mailbuttons-com/json-schema/mailbuttons-com-full-email-message-schema.json",
  "title": "FullEmailMessage",
  "x-generated": "2026-11-17",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/mailbuttons-com-openapi.json#/components/schemas/FullEmailMessage",
  "properties": {
    "attachments": {
      "items": {
        "$ref": "#/$defs/AttachmentMeta"
      },
      "type": "array"
    },
    "from": {
      "type": [
        "string",
        "null"
      ]
    },
    "id": {
      "type": "string"
    },
    "in_reply_to": {
      "items": {
        "type": "string"
      },
      "type": [
        "array",
        "null"
      ]
    },
    "message_id": {
      "items": {
        "type": "string"
      },
      "type": [
        "array",
        "null"
      ]
    },
    "received_at": {
      "type": [
        "string",
        "null"
      ]
    },
    "references": {
      "items": {
        "type": "string"
      },
      "type": [
        "array",
        "null"
      ]
    },
    "subject": {
      "type": [
        "string",
        "null"
      ]
    },
    "text_body": {
      "type": [
        "string",
        "null"
      ]
    },
    "thread_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "to": {
      "items": {
        "type": "string"
      },
      "type": [
        "array",
        "null"
      ]
    }
  },
  "required": [
    "id",
    "thread_id",
    "subject",
    "from",
    "to",
    "received_at",
    "text_body",
    "message_id",
    "in_reply_to",
    "references",
    "attachments"
  ],
  "type": "object",
  "$defs": {
    "AttachmentMeta": {
      "description": "Metadata for one attachment. Fetch its bytes separately via\n`GET .../messages/{email_id}/attachments/{blob_id}`.\n",
      "properties": {
        "blob_id": {
          "type": "string"
        },
        "content_type": {
          "type": "string"
        },
        "filename": {
          "type": "string"
        },
        "size": {
          "format": "int64",
          "type": "integer"
        }
      },
      "required": [
        "blob_id",
        "filename",
        "content_type",
        "size"
      ],
      "type": "object"
    }
  }
}