{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/call2me-app/json-schema/call2me-app-create-knowledge-base-request-schema.json",
  "title": "CreateKnowledgeBaseRequest",
  "description": "Request to create a new knowledge base.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/call2me-app-knowledge-base-api-openapi.yml#/components/schemas/CreateKnowledgeBaseRequest",
  "properties": {
    "knowledge_base_name": {
      "type": "string",
      "maxLength": 40,
      "title": "Knowledge Base Name",
      "description": "Name of the knowledge base"
    },
    "knowledge_base_texts": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/KnowledgeBaseTextInput"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Knowledge Base Texts",
      "description": "Texts to add"
    },
    "knowledge_base_urls": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Knowledge Base Urls",
      "description": "URLs to scrape and add"
    },
    "enable_auto_refresh": {
      "type": "boolean",
      "title": "Enable Auto Refresh",
      "description": "Auto-refresh URLs every 12 hours",
      "default": false
    },
    "agent_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Agent Id",
      "description": "Agent to own/link this knowledge base to"
    }
  },
  "type": "object",
  "required": [
    "knowledge_base_name"
  ],
  "$defs": {
    "KnowledgeBaseTextInput": {
      "properties": {
        "title": {
          "type": "string",
          "title": "Title",
          "description": "Title of the text"
        },
        "text": {
          "type": "string",
          "title": "Text",
          "description": "Text content to add"
        }
      },
      "type": "object",
      "required": [
        "title",
        "text"
      ],
      "title": "KnowledgeBaseTextInput",
      "description": "Text input for creating/adding to knowledge base."
    }
  }
}