{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/call2me-app/json-schema/call2me-app-chat-session-schema.json",
  "title": "ChatSession",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/call2me-app-chats-api-openapi.yml#/components/schemas/ChatSession",
  "properties": {
    "session_id": {
      "type": "string",
      "title": "Session Id"
    },
    "user_id": {
      "type": "string",
      "title": "User Id"
    },
    "agent_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Agent Id"
    },
    "agent_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Agent Name"
    },
    "title": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Title"
    },
    "status": {
      "type": "string",
      "title": "Status"
    },
    "message_count": {
      "type": "integer",
      "title": "Message Count"
    },
    "total_tokens": {
      "type": "integer",
      "title": "Total Tokens"
    },
    "total_cost_usd": {
      "type": "number",
      "title": "Total Cost Usd"
    },
    "external_user_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "External User Id"
    },
    "created_at": {
      "type": "string",
      "title": "Created At"
    },
    "updated_at": {
      "type": "string",
      "title": "Updated At"
    },
    "source": {
      "type": "string",
      "title": "Source",
      "default": "chat"
    },
    "widget_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Widget Name"
    },
    "visitor_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Visitor Name"
    }
  },
  "type": "object",
  "required": [
    "session_id",
    "user_id",
    "status",
    "message_count",
    "total_tokens",
    "total_cost_usd",
    "created_at",
    "updated_at"
  ]
}