{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/tinysend-com/json-schema/tinysend-com-mailbox-email-detail-schema.json",
  "title": "MailboxEmailDetail",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/tinysend-com-v1-openapi.json#/components/schemas/MailboxEmailDetail",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "direction": {
      "type": "string"
    },
    "from_address": {
      "type": "string"
    },
    "to_address": {
      "type": "string"
    },
    "subject": {
      "type": [
        "string",
        "null"
      ]
    },
    "message_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "in_reply_to": {
      "type": [
        "string",
        "null"
      ]
    },
    "text_body": {
      "type": [
        "string",
        "null"
      ],
      "description": "Plain-text body, resolved from storage."
    },
    "html_body": {
      "type": [
        "string",
        "null"
      ],
      "description": "HTML body, resolved from storage."
    },
    "status": {
      "type": "string"
    },
    "handler_results": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "nullable": true
      }
    },
    "extracted_data": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "nullable": true
      }
    },
    "tags": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/EmailTag"
      }
    },
    "contact_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "code": {
      "type": [
        "string",
        "null"
      ],
      "description": "The code read out of this email when it reached a temp address; null otherwise."
    },
    "link": {
      "type": [
        "string",
        "null"
      ],
      "description": "The confirm link read out of this email when it reached a temp address; null otherwise."
    },
    "created_at": {
      "type": "string"
    }
  },
  "required": [
    "id",
    "direction",
    "from_address",
    "to_address",
    "subject",
    "message_id",
    "in_reply_to",
    "text_body",
    "html_body",
    "status",
    "handler_results",
    "extracted_data",
    "tags",
    "contact_id",
    "code",
    "link",
    "created_at"
  ],
  "$defs": {
    "EmailTag": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "maxLength": 256
        },
        "value": {
          "type": "string",
          "maxLength": 256
        }
      },
      "required": [
        "name",
        "value"
      ]
    }
  }
}