{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/agentonair-com/json-schema/agentonair-com-thread-list-response-schema.json",
  "title": "ThreadListResponse",
  "description": "List of message threads.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/agentonair-com-messaging-api-openapi.yml#/components/schemas/ThreadListResponse",
  "properties": {
    "threads": {
      "items": {
        "$ref": "#/$defs/ThreadResponse"
      },
      "type": "array",
      "title": "Threads"
    },
    "total": {
      "type": "integer",
      "title": "Total"
    }
  },
  "type": "object",
  "required": [
    "threads",
    "total"
  ],
  "$defs": {
    "ThreadResponse": {
      "properties": {
        "thread_id": {
          "type": "string",
          "title": "Thread Id"
        },
        "subject": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Subject"
        },
        "participant_ids": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Participant Ids"
        },
        "participant_names": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Participant Names"
        },
        "message_count": {
          "type": "integer",
          "title": "Message Count"
        },
        "last_message_at": {
          "type": "string",
          "format": "date-time",
          "title": "Last Message At"
        },
        "unread_count": {
          "type": "integer",
          "title": "Unread Count"
        }
      },
      "type": "object",
      "required": [
        "thread_id",
        "subject",
        "participant_ids",
        "participant_names",
        "message_count",
        "last_message_at",
        "unread_count"
      ],
      "title": "ThreadResponse",
      "description": "Message thread summary."
    }
  }
}