{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ausca-com/json-schema/ausca-com-list-agent-inbox-messages-result-schema.json",
  "title": "ListAgentInboxMessagesResult",
  "x-generated": "2026-11-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ausca-com-openapi.json#/components/schemas/ListAgentInboxMessagesResult",
  "additionalProperties": false,
  "properties": {
    "cursor": {
      "$ref": "#/$defs/InboxCursor"
    },
    "messages": {
      "items": {
        "$ref": "#/$defs/AgentInboxMessageSummary"
      },
      "maxItems": 50,
      "type": "array"
    },
    "status": {
      "const": "ok"
    }
  },
  "required": [
    "status",
    "messages",
    "cursor"
  ],
  "type": "object",
  "$defs": {
    "AgentInboxMessageID": {
      "pattern": "^msg_[A-Za-z0-9_-]{22,64}$",
      "type": "string"
    },
    "AgentInboxMessageSummary": {
      "additionalProperties": false,
      "properties": {
        "attachment_count": {
          "maximum": 20,
          "minimum": 0,
          "type": "integer"
        },
        "cursor": {
          "$ref": "#/$defs/InboxCursor"
        },
        "from": {
          "$ref": "#/$defs/MailboxAddress"
        },
        "message_id": {
          "$ref": "#/$defs/AgentInboxMessageID"
        },
        "received_at": {
          "description": "Server-observed ingress time. Never derived from the sender-controlled Date header.",
          "format": "date-time",
          "type": "string"
        },
        "subject": {
          "maxLength": 998,
          "type": "string"
        },
        "to": {
          "items": {
            "$ref": "#/$defs/MailboxAddress"
          },
          "maxItems": 50,
          "minItems": 1,
          "type": "array"
        }
      },
      "required": [
        "message_id",
        "cursor",
        "from",
        "to",
        "subject",
        "received_at",
        "attachment_count"
      ],
      "type": "object"
    },
    "InboxCursor": {
      "description": "Opaque continuation bound to one inbox. Callers must not construct or modify it.",
      "pattern": "^cur_[A-Za-z0-9_-]{22,171}$",
      "type": "string"
    },
    "MailboxAddress": {
      "additionalProperties": false,
      "properties": {
        "address": {
          "format": "email",
          "maxLength": 320,
          "minLength": 3,
          "pattern": "^[A-Za-z0-9!#$%&'*+/=?^_{|}~-]+(?:\\.[A-Za-z0-9!#$%&'*+/=?^_{|}~-]+)*@[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?(?:\\.[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)+$",
          "type": "string"
        },
        "name": {
          "maxLength": 256,
          "type": "string"
        }
      },
      "required": [
        "address"
      ],
      "type": "object"
    }
  }
}