{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sendmux-ai/json-schema/sendmux-ai-incoming-log-item-response-schema.json",
  "title": "IncomingLogItemResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sendmux-ai-inboxes-api-openapi.yml#/components/schemas/IncomingLogItemResponse",
  "allOf": [
    {
      "$ref": "#/$defs/SuccessEnvelope"
    },
    {
      "properties": {
        "data": {
          "$ref": "#/$defs/IncomingLogItem"
        },
        "meta": {
          "$ref": "#/$defs/ResponseMeta"
        }
      },
      "required": [
        "data"
      ],
      "type": "object"
    }
  ],
  "unevaluatedProperties": false,
  "$defs": {
    "IncomingLogItem": {
      "additionalProperties": false,
      "properties": {
        "amount": {
          "description": "Billable amount for this message in USD",
          "type": "string"
        },
        "billing_bucket_start": {
          "description": "ISO 8601 usage bucket start",
          "type": "string"
        },
        "event_type": {
          "enum": [
            "message.received",
            "message.received.spam"
          ],
          "type": "string"
        },
        "from_email": {
          "type": [
            "string",
            "null"
          ]
        },
        "id": {
          "description": "Incoming log public ID",
          "type": "string"
        },
        "is_spam": {
          "type": "boolean"
        },
        "mailbox_email": {
          "description": "Mailbox email address",
          "type": [
            "string",
            "null"
          ]
        },
        "mailbox_id": {
          "description": "Mailbox public ID",
          "type": [
            "string",
            "null"
          ]
        },
        "message_id": {
          "description": "Message identifier when available",
          "type": [
            "string",
            "null"
          ]
        },
        "message_id_kind": {
          "description": "Identifier source when available",
          "type": [
            "string",
            "null"
          ]
        },
        "received_at": {
          "description": "ISO 8601 received timestamp",
          "type": "string"
        },
        "size_bytes": {
          "type": [
            "number",
            "null"
          ]
        },
        "subject": {
          "type": [
            "string",
            "null"
          ]
        },
        "to_emails": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "unit_amount": {
          "description": "Per-message unit amount in USD",
          "type": "string"
        }
      },
      "required": [
        "id",
        "mailbox_id",
        "mailbox_email",
        "event_type",
        "message_id",
        "message_id_kind",
        "from_email",
        "to_emails",
        "subject",
        "size_bytes",
        "received_at",
        "is_spam",
        "billing_bucket_start",
        "unit_amount",
        "amount"
      ],
      "type": "object"
    },
    "ResponseMeta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        }
      },
      "required": [
        "request_id"
      ],
      "type": "object"
    },
    "SuccessEnvelope": {
      "properties": {
        "meta": {
          "additionalProperties": {},
          "properties": {},
          "type": "object"
        },
        "ok": {
          "enum": [
            true
          ],
          "type": "boolean"
        }
      },
      "required": [
        "ok",
        "meta"
      ],
      "type": "object"
    }
  }
}