{
  "openapi": "3.0.0",
  "info": {
    "title": "Whisperchat API",
    "description": "Getting started\n\nLearn how to use Whisperchat API for application\n\nPrerequisites\n\n You will need a valid API key to access this feature. Create an API key form the Whisperchat\nBasic knowledge of any programming language\n\nAPI Keys\n\nWhisperchat uses API key for authenticating the request and is compulsary to send API key along with every request.\nAdd API key in the request header of your request.\nAdd API key in the form of Bearer <token> form where <token> is always prefixed by Bearer. Please see the example below for better understanding\n\n    \"Authorization\": \"bearer <token>\"\n\nJSON Response\n\nEvery request will send response in JSON format. Make sure this data structure can be parsed by your system. Examine the JSON response's error key for any issues.\n\nAssistance\n\nContact us on hello@whisperchat.ai for any assistance and support.",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.whisperchat.ai",
      "description": "Production server"
    }
  ],
  "tags": [
    {
      "name": "Chatbots",
      "description": "Operations related to chatbot management"
    },
    {
      "name": "Sources",
      "description": "Operations related to chatbot knowledge sources"
    },
    {
      "name": "Sessions",
      "description": "Operations related to chatbot conversation sessions"
    }
  ],
  "paths": {
    "/v1/chatbots": {
      "get": {
        "tags": ["Chatbots"],
        "summary": "Fetch all chatbots",
        "operationId": "fetchAllChatbots",
        "description": "Retrieve a list of all chatbots",
        "responses": {
          "200": {
            "description": "Successful response with chatbot list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatbotListResponse"
                },
                "example": {
                  "data": {
                    "chatbots": [
                      {
                        "id": "chatbot-id",
                        "name": "chatbot-name",
                        "profile_img": "<profile_img>",
                        "initial_msg": "Hi! What can I help you with?",
                        "has_powered_by": true,
                        "created_on": "Wednesday, 06. September 2023 02:19PM",
                        "settings": {
                          "visibility": "private",
                          "valid_domains": [],
                          "base_prompt": "I want you to act as a document that I am having a conversation with...",
                          "theme": "dark",
                          "display_name": "",
                          "float_btn_alignment": "left",
                          "user_message_color": "#4A86E8",
                          "chat_bubble_button_color": "#000000",
                          "suggested_messages": [],
                          "no_of_message_limit": 20,
                          "message_limit_duration": 240,
                          "limit_reached_message": "too many messages in a row",
                          "initial_message": ["Hi! What can I help you with?"],
                          "has_profile": true,
                          "has_chat_bubble_button_icon": true,
                          "chat_bubble_img": "<img_data>",
                          "auto_show_initial_msg": 3,
                          "chat_bubble_rounded": true,
                          "chat_bubble_transparent": false,
                          "chat_bubble_shadow": true
                        }
                      }
                    ]
                  },
                  "success": true
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "INVALID_API_KEY",
                    "message": "No valid API key found in 'Authorization' header"
                  },
                  "success": false
                }
              }
            }
          },
          "402": {
            "description": "Payment required - Subscription needed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "SUBSCRITPION_REQUIRED",
                    "message": "Subscription required to access this route"
                  },
                  "success": false
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "POST request not allowed"
                  },
                  "success": false
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "FAILED_FETCH_ALL_CHATBOTS",
                    "message": "Technical error occured!"
                  },
                  "success": false
                }
              }
            }
          }
        },
        "security": [{"BearerAuth": []}]
      }
    },
    "/v1/chatbot": {
      "post": {
        "tags": ["Chatbots"],
        "summary": "Create Chatbot",
        "operationId": "createChatbot",
        "description": "Create a new chatbot",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Name of chatbot"
                  }
                },
                "required": ["name"]
              },
              "example": {
                "name": "chatbot-1"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Chatbot created successfully",
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "bot": {
                      "id": "<chatbotId>",
                      "new-bot": "new-bot"
                    }
                  },
                  "success": true
                }
              }
            }
          },
          "400": {
            "description": "Bad request - Bot limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "BOT_LIMIT_REACHED",
                    "message": "Reached maximum number of chatbots"
                  },
                  "success": false
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "INVALID_API_KEY",
                    "message": "No valid API key found in 'Authorization' header"
                  },
                  "success": false
                }
              }
            }
          },
          "402": {
            "description": "Payment required - Subscription needed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "SUBSCRITPION_REQUIRED",
                    "message": "Subscription required to access this route"
                  },
                  "success": false
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "GET request not allowed"
                  },
                  "success": false
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "FAILED_CREATE_CHATBOT",
                    "message": "Technical error occured!"
                  },
                  "success": false
                }
              }
            }
          }
        },
        "security": [{"BearerAuth": []}]
      }
    },
    "/v1/chatbot/{chatbotId}": {
      "get": {
        "tags": ["Chatbots"],
        "summary": "Fetch Chatbot",
        "operationId": "fetchChatbot",
        "description": "Fetch details of a specific chatbot",
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "description": "ID of specific chatbot",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response with chatbot details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatbotResponse"
                },
                "example": {
                  "data": {
                    "chatbots": {
                      "id": "chatbot-id",
                      "name": "chatbot-name",
                      "profile_img": "<profile_img>",
                      "initial_msg": "Hi! What can I help you with?",
                      "has_powered_by": true,
                      "created_on": "Wednesday, 06. September 2023 02:19PM",
                      "settings": {
                        "visibility": "private",
                        "valid_domains": [],
                        "base_prompt": "I want you to act as a document that I am having a conversation with...",
                        "theme": "dark",
                        "display_name": "",
                        "float_btn_alignment": "left",
                        "user_message_color": "#4A86E8",
                        "chat_bubble_button_color": "#000000",
                        "suggested_messages": [],
                        "no_of_message_limit": 20,
                        "message_limit_duration": 240,
                        "limit_reached_message": "too many messages in a row",
                        "initial_message": ["Hi! What can I help you with?"],
                        "has_profile": true,
                        "has_chat_bubble_button_icon": true,
                        "chat_bubble_img": "<img_data>",
                        "auto_show_initial_msg": 3,
                        "chat_bubble_rounded": true,
                        "chat_bubble_transparent": false,
                        "chat_bubble_shadow": true
                      }
                    }
                  },
                  "success": true
                }
              }
            }
          },
          "400": {
            "description": "Bad request - Bot not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "BOT_NOT_FOUND",
                    "message": "Bot not found"
                  },
                  "success": false
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "INVALID_API_KEY",
                    "message": "No valid API key found in 'Authorization' header"
                  },
                  "success": false
                }
              }
            }
          },
          "402": {
            "description": "Payment required - Subscription needed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "SUBSCRITPION_REQUIRED",
                    "message": "Subscription required to access this route"
                  },
                  "success": false
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "POST request not allowed"
                  },
                  "success": false
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "FAILED_FETCH_CHATBOT",
                    "message": "Technical error occured!"
                  },
                  "success": false
                }
              }
            }
          }
        },
        "security": [{"BearerAuth": []}]
      },
      "delete": {
        "tags": ["Chatbots"],
        "summary": "Delete Chatbot",
        "operationId": "deleteChatbot",
        "description": "Delete a specific chatbot",
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "description": "ID of specific chatbot",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Chatbot deleted successfully",
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "message": "Successfully deleted chatbot"
                  },
                  "success": true
                }
              }
            }
          },
          "400": {
            "description": "Bad request - Bot not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "BOT_NOT_FOUND",
                    "message": "Bot not found"
                  },
                  "success": false
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "INVALID_API_KEY",
                    "message": "No valid API key found in 'Authorization' header"
                  },
                  "success": false
                }
              }
            }
          },
          "402": {
            "description": "Payment required - Subscription needed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "SUBSCRITPION_REQUIRED",
                    "message": "Subscription required to access this route"
                  },
                  "success": false
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "POST request not allowed"
                  },
                  "success": false
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "FAILED_DELETE_CHATBOT",
                    "message": "Technical error occured!"
                  },
                  "success": false
                }
              }
            }
          }
        },
        "security": [{"BearerAuth": []}]
      }
    },
    "/v1/chatbot/{chatbotId}/settings": {
      "patch": {
        "tags": ["Chatbots"],
        "summary": "Update Chatbot Settings",
        "operationId": "updateChatbotSettings",
        "description": "Update settings for a specific chatbot",
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "description": "ID of specific chatbot",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatbotSettings"
              },
              "example": {
                "name": "bot_name",
                "visibility": "private",
                "valid_domains": "example.com,test.com",
                "base_prompt": "I want you to act as a document...",
                "theme": "dark",
                "display_name": "My Chatbot",
                "float_btn_alignment": "left",
                "user_message_color": "#4A86E8",
                "chat_bubble_button_color": "#000000",
                "suggested_messages": "Question 1,Question 2",
                "no_of_message_limit": 30,
                "message_limit_duration": 240,
                "limit_reached_message": "Rate limit reached",
                "initial_message": "Hello,How can I help?",
                "has_profile": true,
                "profile_img": "data:image/png;base64,...",
                "has_chat_bubble_button_icon": true,
                "chat_bubble_img": "data:image/png;base64,...",
                "auto_show_initial_msg": 3,
                "chat_bubble_rounded": true,
                "chat_bubble_transparent": false,
                "chat_bubble_shadow": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Settings updated successfully",
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "message": "Successfully updated chatbot settings"
                  },
                  "success": true
                }
              }
            }
          },
          "400": {
            "description": "Bad request - Bot not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "BOT_NOT_FOUND",
                    "message": "Bot not found"
                  },
                  "success": false
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "INVALID_API_KEY",
                    "message": "No valid API key found in 'Authorization' header"
                  },
                  "success": false
                }
              }
            }
          },
          "402": {
            "description": "Payment required - Subscription needed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "SUBSCRITPION_REQUIRED",
                    "message": "Subscription required to access this route"
                  },
                  "success": false
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "GET request not allowed"
                  },
                  "success": false
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "FAILED_SETTINGS_UPDATE",
                    "message": "Technical error occured!"
                  },
                  "success": false
                }
              }
            }
          }
        },
        "security": [{"BearerAuth": []}]
      }
    },
    "/v1/chatbot/{chatbotId}/sessions": {
      "get": {
        "tags": ["Sessions"],
        "summary": "Fetch Chatbot Sessions",
        "operationId": "fetchChatbotSessions",
        "description": "Fetch all sessions for a specific chatbot",
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "description": "ID of specific chatbot",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response with sessions list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionListResponse"
                },
                "example": {
                  "data": {
                    "sessions": [
                      {
                        "id": "<sessionId>",
                        "created_on": "Friday, 03. May 2024 06:37AM",
                        "last_updated_on": "Friday, 03. May 2024 06:37AM",
                        "total_messages": 2,
                        "last_message": {
                          "question": {
                            "timestamp": "Friday, 03. May 2024 06:37AM",
                            "value": "Tell me about yourself"
                          },
                          "answer": {
                            "timestamp": "Friday, 03. May 2024 06:37AM",
                            "value": "I am a friendly assistant for the website www.terabits.xyz..."
                          }
                        }
                      }
                    ]
                  },
                  "success": true
                }
              }
            }
          },
          "400": {
            "description": "Bad request - Bot not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "BOT_NOT_FOUND",
                    "message": "Bot not found"
                  },
                  "success": false
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "INVALID_API_KEY",
                    "message": "No valid API key found in 'Authorization' header"
                  },
                  "success": false
                }
              }
            }
          },
          "402": {
            "description": "Payment required - Subscription needed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "SUBSCRITPION_REQUIRED",
                    "message": "Subscription required to access this route"
                  },
                  "success": false
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "POST request not allowed"
                  },
                  "success": false
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "FAILED_FETCH_CHATBOT_SESSIONS",
                    "message": "Technical error occured!"
                  },
                  "success": false
                }
              }
            }
          }
        },
        "security": [{"BearerAuth": []}]
      }
    },
    "/v1/chatbot/{chatbotId}/session/{sessionId}": {
      "get": {
        "tags": ["Sessions"],
        "summary": "Fetch Chatbot Session",
        "operationId": "fetchChatbotSession",
        "description": "Fetch details of a specific chatbot session",
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "description": "ID of specific chatbot",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sessionId",
            "in": "path",
            "description": "ID of specific chatbot session",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response with session details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionResponse"
                },
                "example": {
                  "data": {
                    "session": {
                      "id": "<sessionId>",
                      "created_on": "Friday, 03. May 2024 06:37AM",
                      "last_updated_on": "Friday, 03. May 2024 06:37AM",
                      "total_messages": 2,
                      "messages": [
                        {
                          "question": {
                            "timestamp": "Friday, 03. May 2024 06:37AM",
                            "value": "Tell me about yourself"
                          },
                          "answer": {
                            "timestamp": "Friday, 03. May 2024 06:37AM",
                            "value": "I am a friendly assistant for the website www.terabits.xyz..."
                          }
                        }
                      ]
                    }
                  },
                  "success": true
                }
              }
            }
          },
          "400": {
            "description": "Bad request - Bot or session not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "Bot not found": {
                    "value": {
                      "error": {
                        "code": "BOT_NOT_FOUND",
                        "message": "Bot not found"
                      },
                      "success": false
                    }
                  },
                  "Session not found": {
                    "value": {
                      "error": {
                        "code": "SESSION_NOT_FOUND",
                        "message": "Session not found"
                      },
                      "success": false
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "INVALID_API_KEY",
                    "message": "No valid API key found in 'Authorization' header"
                  },
                  "success": false
                }
              }
            }
          },
          "402": {
            "description": "Payment required - Subscription needed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "SUBSCRITPION_REQUIRED",
                    "message": "Subscription required to access this route"
                  },
                  "success": false
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "POST request not allowed"
                  },
                  "success": false
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "FAILED_FETCH_CHATBOT_SESSION_HISTORY",
                    "message": "Technical error occured!"
                  },
                  "success": false
                }
              }
            }
          }
        },
        "security": [{"BearerAuth": []}]
      }
    },
    "/v1/chatbot/{chatbotId}/chat": {
      "post": {
        "tags": ["Sessions"],
        "summary": "Send Message to Chatbot",
        "operationId": "sendMessageToChatbot",
        "description": "Send a message to a specific chatbot",
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "description": "ID of specific chatbot",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "session_id": {
                    "type": "string",
                    "description": "Chatbot session ID in which message is sent"
                  },
                  "message": {
                    "type": "string",
                    "description": "Message to be sent"
                  }
                },
                "required": ["message"]
              },
              "example": {
                "session_id": "session-123",
                "message": "What can you do?"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Message sent successfully",
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "message": {
                      "question": {
                        "timestamp": "Friday, 03. May 2024 06:46AM",
                        "value": "Tell me about yourself"
                      },
                      "answer": {
                        "timestamp": "Friday, 03. May 2024 06:46AM",
                        "value": "I am a friendly assistant for the website www.terabits.xyz..."
                      }
                    }
                  },
                  "success": true
                }
              }
            }
          },
          "400": {
            "description": "Bad request - Bot not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "BOT_NOT_FOUND",
                    "message": "Bot not found"
                  },
                  "success": false
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "INVALID_API_KEY",
                    "message": "No valid API key found in 'Authorization' header"
                  },
                  "success": false
                }
              }
            }
          },
          "402": {
            "description": "Payment required - Subscription needed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "SUBSCRITPION_REQUIRED",
                    "message": "Subscription required to access this route"
                  },
                  "success": false
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "GET request not allowed"
                  },
                  "success": false
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "FAILED_SENDING_MESSAGE",
                    "message": "Technical error occured!"
                  },
                  "success": false
                }
              }
            }
          }
        },
        "security": [{"BearerAuth": []}]
      }
    },
    "/v1/chatbot/{chatbotId}/urls": {
      "get": {
        "tags": ["Sources"],
        "summary": "Fetch Source URLs",
        "operationId": "fetchSourceURLs",
        "description": "Fetch all source URLs for a chatbot",
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "description": "ID of specific chatbot",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response with URLs list",
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "urls": [{
                      "url_id": 21323,
                      "url": "https://www.example.com",
                      "trained_characters": 0,
                      "is_trained": false
                    }]
                  },
                  "success": true
                }
              }
            }
          },
          "400": {
            "description": "Bad request - Bot not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "BOT_NOT_FOUND",
                    "message": "Bot not found"
                  },
                  "success": false
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "INVALID_API_KEY",
                    "message": "No valid API key found in 'Authorization' header"
                  },
                  "success": false
                }
              }
            }
          },
          "402": {
            "description": "Payment required - Subscription needed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "SUBSCRITPION_REQUIRED",
                    "message": "Subscription required to access this route"
                  },
                  "success": false
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "POST request not allowed"
                  },
                  "success": false
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "FAILED_FETCH_URLS",
                    "message": "Technical error occured!"
                  },
                  "success": false
                }
              }
            }
          }
        },
        "security": [{"BearerAuth": []}]
      }
    },
    "/v1/chatbot/{chatbotId}/url": {
      "post": {
        "tags": ["Sources"],
        "summary": "Create Source URL",
        "operationId": "createSourceURL",
        "description": "Add a new URL source for a chatbot",
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "description": "ID of specific chatbot",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "URL of a live website which can be used as source for chatbot"
                  }
                },
                "required": ["url"]
              },
              "example": {
                "url": "https://www.example.com"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "URL source created successfully",
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "url": {
                      "url_id": 21323,
                      "url": "https://www.example.com",
                      "trained_characters": 0,
                      "is_trained": false
                    }
                  },
                  "success": true
                }
              }
            }
          },
          "400": {
            "description": "Bad request - Bot not found or validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "Bot not found": {
                    "value": {
                      "error": {
                        "code": "BOT_NOT_FOUND",
                        "message": "Bot not found"
                      },
                      "success": false
                    }
                  },
                  "Validation failed": {
                    "value": {
                      "error": {
                        "code": "FAILED_REQUEST_VALIDATION",
                        "message": "Request body malformed"
                      },
                      "success": false
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "INVALID_API_KEY",
                    "message": "No valid API key found in 'Authorization' header"
                  },
                  "success": false
                }
              }
            }
          },
          "402": {
            "description": "Payment required - Subscription needed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "SUBSCRITPION_REQUIRED",
                    "message": "Subscription required to access this route"
                  },
                  "success": false
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "GET request not allowed"
                  },
                  "success": false
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "FAILED_CREATE_URL_SOURCE",
                    "message": "Technical error occured!"
                  },
                  "success": false
                }
              }
            }
          }
        },
        "security": [{"BearerAuth": []}]
      }
    },
    "/v1/chatbot/{chatbotId}/url/{urlId}": {
      "delete": {
        "tags": ["Sources"],
        "summary": "Delete Source URL",
        "operationId": "deleteSourceURL",
        "description": "Delete a URL source from a chatbot",
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "description": "ID of specific chatbot",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "urlId",
            "in": "path",
            "description": "ID of specific chatbot source URL",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "URL source deleted successfully",
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "message": "Successfully deleted chatbot url"
                  },
                  "success": true
                }
              }
            }
          },
          "400": {
            "description": "Bad request - Bot or URL not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "Bot not found": {
                    "value": {
                      "error": {
                        "code": "BOT_NOT_FOUND",
                        "message": "Bot not found"
                      },
                      "success": false
                    }
                  },
                  "URL not found": {
                    "value": {
                      "error": {
                        "code": "SOURCE_URL_NOT_FOUND",
                        "message": "Url not found"
                      },
                      "success": false
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "INVALID_API_KEY",
                    "message": "No valid API key found in 'Authorization' header"
                  },
                  "success": false
                }
              }
            }
          },
          "402": {
            "description": "Payment required - Subscription needed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "SUBSCRITPION_REQUIRED",
                    "message": "Subscription required to access this route"
                  },
                  "success": false
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "GET request not allowed"
                  },
                  "success": false
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "FAILED_DELETE_CHATBOT_URL",
                    "message": "Technical error occured!"
                  },
                  "success": false
                }
              }
            }
          }
        },
        "security": [{"BearerAuth": []}]
      }
    },
    "/v1/chatbot/{chatbotId}/texts": {
      "get": {
        "tags": ["Sources"],
        "summary": "Fetch All Source Texts",
        "operationId": "fetchAllSourceTexts",
        "description": "Fetch all text sources for a chatbot",
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "description": "ID of specific chatbot",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response with text sources list",
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "texts": [{
                      "text_id": 2344,
                      "title": "title of data",
                      "trained_characters": 35,
                      "is_trained": true
                    }]
                  },
                  "success": true
                }
              }
            }
          },
          "400": {
            "description": "Bad request - Bot not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "BOT_NOT_FOUND",
                    "message": "Bot not found"
                  },
                  "success": false
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "INVALID_API_KEY",
                    "message": "No valid API key found in 'Authorization' header"
                  },
                  "success": false
                }
              }
            }
          },
          "402": {
            "description": "Payment required - Subscription needed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "SUBSCRITPION_REQUIRED",
                    "message": "Subscription required to access this route"
                  },
                  "success": false
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "POST request not allowed"
                  },
                  "success": false
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "FAILED_FETCH_ALL_TEXT",
                    "message": "Technical error occured!"
                  },
                  "success": false
                }
              }
            }
          }
        },
        "security": [{"BearerAuth": []}]
      }
    },
    "/v1/chatbot/{chatbotId}/text": {
      "post": {
        "tags": ["Sources"],
        "summary": "Create Source text",
        "operationId": "createSourceText",
        "description": "Add a new text source for a chatbot",
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "description": "ID of specific chatbot",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "description": "Title of chatbot text source"
                  },
                  "data": {
                    "type": "string",
                    "description": "Data of chatbot text source"
                  }
                },
                "required": ["title", "data"]
              },
              "example": {
                "title": "Source-1",
                "data": "text-data"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Text source created successfully",
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "text": {
                      "text_id": 2344,
                      "title": "title of data",
                      "data": "text-data",
                      "trained_characters": 0,
                      "is_trained": false
                    }
                  },
                  "success": true
                }
              }
            }
          },
          "400": {
            "description": "Bad request - Bot not found or validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "Bot not found": {
                    "value": {
                      "error": {
                        "code": "BOT_NOT_FOUND",
                        "message": "Bot not found"
                      },
                      "success": false
                    }
                  },
                  "Validation failed": {
                    "value": {
                      "error": {
                        "code": "FAILED_REQUEST_VALIDATION",
                        "message": "Request body malformed"
                      },
                      "success": false
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "INVALID_API_KEY",
                    "message": "No valid API key found in 'Authorization' header"
                  },
                  "success": false
                }
              }
            }
          },
          "402": {
            "description": "Payment required - Subscription needed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "SUBSCRITPION_REQUIRED",
                    "message": "Subscription required to access this route"
                  },
                  "success": false
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "GET request not allowed"
                  },
                  "success": false
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "FAILED_CREATE_TEXT_SOURCE",
                    "message": "Technical error occured!"
                  },
                  "success": false
                }
              }
            }
          }
        },
        "security": [{"BearerAuth": []}]
      },
      "patch": {
        "tags": ["Sources"],
        "summary": "Update Source text",
        "operationId": "updateSourceText",
        "description": "Update an existing text source for a chatbot",
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "description": "ID of specific chatbot",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "text_id": {
                    "type": "integer",
                    "description": "ID of chatbot text source"
                  },
                  "title": {
                    "type": "string",
                    "description": "Title of chatbot text source"
                  },
                  "data": {
                    "type": "string",
                    "description": "Data of chatbot text source"
                  }
                },
                "required": ["text_id"]
              },
              "example": {
                "text_id": 234,
                "title": "Updated title",
                "data": "updated data"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Text source updated successfully",
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "message": "Succesfully updated text source"
                  },
                  "success": true
                }
              }
            }
          },
          "400": {
            "description": "Bad request - Bot not found, text not found, or validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "Bot not found": {
                    "value": {
                      "error": {
                        "code": "BOT_NOT_FOUND",
                        "message": "Bot not found"
                      },
                      "success": false
                    }
                  },
                  "Text not found": {
                    "value": {
                      "error": {
                        "code": "SOURCE_TEXT_NOT_FOUND",
                        "message": "Text not found"
                      },
                      "success": false
                    }
                  },
                  "Validation failed": {
                    "value": {
                      "error": {
                        "code": "FAILED_REQUEST_VALIDATION",
                        "message": "Request body malformed"
                      },
                      "success": false
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "INVALID_API_KEY",
                    "message": "No valid API key found in 'Authorization' header"
                  },
                  "success": false
                }
              }
            }
          },
          "402": {
            "description": "Payment required - Subscription needed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "SUBSCRITPION_REQUIRED",
                    "message": "Subscription required to access this route"
                  },
                  "success": false
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "GET request not allowed"
                  },
                  "success": false
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "FAILED_UPDATE_TEXT_SOURCE",
                    "message": "Technical error occured!"
                  },
                  "success": false
                }
              }
            }
          }
        },
        "security": [{"BearerAuth": []}]
      }
    },
    "/v1/chatbot/{chatbotId}/text/{textId}": {
      "get": {
        "tags": ["Sources"],
        "summary": "Fetch Source Text",
        "operationId": "fetchSourceText",
        "description": "Fetch details of a specific text source",
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "description": "ID of specific chatbot",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "textId",
            "in": "path",
            "description": "ID of specific chatbot source text",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response with text source details",
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "text": {
                      "text_id": 2344,
                      "title": "title of data",
                      "data": "text-data",
                      "trained_characters": 35,
                      "is_trained": true
                    }
                  },
                  "success": true
                }
              }
            }
          },
          "400": {
            "description": "Bad request - Bot or text not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "Bot not found": {
                    "value": {
                      "error": {
                        "code": "BOT_NOT_FOUND",
                        "message": "Bot not found"
                      },
                      "success": false
                    }
                  },
                  "Text not found": {
                    "value": {
                      "error": {
                        "code": "SOURCE_TEXT_NOT_FOUND",
                        "message": "Text not found"
                      },
                      "success": false
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "INVALID_API_KEY",
                    "message": "No valid API key found in 'Authorization' header"
                  },
                  "success": false
                }
              }
            }
          },
          "402": {
            "description": "Payment required - Subscription needed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "SUBSCRITPION_REQUIRED",
                    "message": "Subscription required to access this route"
                  },
                  "success": false
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "POST request not allowed"
                  },
                  "success": false
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "FAILED_FETCH_TEXT",
                    "message": "Technical error occured!"
                  },
                  "success": false
                }
              }
            }
          }
        },
        "security": [{"BearerAuth": []}]
      },
      "delete": {
        "tags": ["Sources"],
        "summary": "Delete Source Text",
        "operationId": "deleteSourceText",
        "description": "Delete a text source from a chatbot",
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "description": "ID of specific chatbot",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "textId",
            "in": "path",
            "description": "ID of specific chatbot source text",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Text source deleted successfully",
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "message": "Successfully deleted chatbot text"
                  },
                  "success": true
                }
              }
            }
          },
          "400": {
            "description": "Bad request - Bot or text not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "Bot not found": {
                    "value": {
                      "error": {
                        "code": "BOT_NOT_FOUND",
                        "message": "Bot not found"
                      },
                      "success": false
                    }
                  },
                  "Text not found": {
                    "value": {
                      "error": {
                        "code": "SOURCE_TEXT_NOT_FOUND",
                        "message": "Text not found"
                      },
                      "success": false
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "INVALID_API_KEY",
                    "message": "No valid API key found in 'Authorization' header"
                  },
                  "success": false
                }
              }
            }
          },
          "402": {
            "description": "Payment required - Subscription needed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "SUBSCRITPION_REQUIRED",
                    "message": "Subscription required to access this route"
                  },
                  "success": false
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "POST request not allowed"
                  },
                  "success": false
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "FAILED_DELETE_CHATBOT_TEXT",
                    "message": "Technical error occured!"
                  },
                  "success": false
                }
              }
            }
          }
        },
        "security": [{"BearerAuth": []}]
      }
    },
    "/v1/chatbot/{chatbotId}/qas": {
      "get": {
        "tags": ["Sources"],
        "summary": "Fetch All Source QAs",
        "operationId": "fetchAllSourceQAs",
        "description": "Fetch all QA sources for a chatbot",
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "description": "ID of specific chatbot",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response with QA sources list",
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "qas": [
                      {
                        "qa_id": 23242,
                        "question": "what is your name?",
                        "trained_characters": 34,
                        "is_trained": true
                      }
                    ]
                  },
                  "success": true
                }
              }
            }
          },
          "400": {
            "description": "Bad request - Bot not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "BOT_NOT_FOUND",
                    "message": "Bot not found"
                  },
                  "success": false
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "INVALID_API_KEY",
                    "message": "No valid API key found in 'Authorization' header"
                  },
                  "success": false
                }
              }
            }
          },
          "402": {
            "description": "Payment required - Subscription needed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "SUBSCRITPION_REQUIRED",
                    "message": "Subscription required to access this route"
                  },
                  "success": false
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "POST request not allowed"
                  },
                  "success": false
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "FAILED_FETCH_ALL_QA",
                    "message": "Technical error occured!"
                  },
                  "success": false
                }
              }
            }
          }
        },
        "security": [{"BearerAuth": []}]
      }
    },
    "/v1/chatbot/{chatbotId}/qa": {
      "post": {
        "tags": ["Sources"],
        "summary": "Create Source QA",
        "operationId": "createSourceQA",
        "description": "Add a new QA source for a chatbot",
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "description": "ID of specific chatbot",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "question": {
                    "type": "string",
                    "description": "Question of chatbot QA source"
                  },
                  "answer": {
                    "type": "string",
                    "description": "Answer of chatbot QA source"
                  }
                },
                "required": ["question", "answer"]
              },
              "example": {
                "question": "What is your use?",
                "answer": "The purpose of my existence is to provide information..."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "QA source created successfully",
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "qa": {
                      "qa_id": 23242,
                      "question": "what is your name?",
                      "answer": "I am a chatbot developed to help your needs.",
                      "trained_characters": 0,
                      "is_trained": false
                    }
                  },
                  "success": true
                }
              }
            }
          },
          "400": {
            "description": "Bad request - Bot not found or validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "Bot not found": {
                    "value": {
                      "error": {
                        "code": "BOT_NOT_FOUND",
                        "message": "Bot not found"
                      },
                      "success": false
                    }
                  },
                  "Validation failed": {
                    "value": {
                      "error": {
                        "code": "FAILED_REQUEST_VALIDATION",
                        "message": "Request body malformed"
                      },
                      "success": false
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "INVALID_API_KEY",
                    "message": "No valid API key found in 'Authorization' header"
                  },
                  "success": false
                }
              }
            }
          },
          "402": {
            "description": "Payment required - Subscription needed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "SUBSCRITPION_REQUIRED",
                    "message": "Subscription required to access this route"
                  },
                  "success": false
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "GET request not allowed"
                  },
                  "success": false
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "FAILED_CREATE_QA_SOURCE",
                    "message": "Technical error occured!"
                  },
                  "success": false
                }
              }
            }
          }
        },
        "security": [{"BearerAuth": []}]
      },
      "patch": {
        "tags": ["Sources"],
        "summary": "Update Source QA",
        "operationId": "updateSourceQA",
        "description": "Update an existing QA source for a chatbot",
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "description": "ID of specific chatbot",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "qa_id": {
                    "type": "integer",
                    "description": "ID of chatbot QA source"
                  },
                  "question": {
                    "type": "string",
                    "description": "Question of chatbot QA source"
                  },
                  "answer": {
                    "type": "string",
                    "description": "Answer of chatbot QA source"
                  }
                },
                "required": ["qa_id"]
              },
              "example": {
                "qa_id": 234,
                "question": "Updated question",
                "answer": "Updated answer"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "QA source updated successfully",
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "message": "Succesfully updated QA source"
                  },
                  "success": true
                }
              }
            }
          },
          "400": {
            "description": "Bad request - Bot not found, QA not found, or validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "Bot not found": {
                    "value": {
                      "error": {
                        "code": "BOT_NOT_FOUND",
                        "message": "Bot not found"
                      },
                      "success": false
                    }
                  },
                  "QA not found": {
                    "value": {
                      "error": {
                        "code": "SOURCE_QA_NOT_FOUND",
                        "message": "QA not found"
                      },
                      "success": false
                    }
                  },
                  "Validation failed": {
                    "value": {
                      "error": {
                        "code": "FAILED_REQUEST_VALIDATION",
                        "message": "Request body malformed"
                      },
                      "success": false
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "INVALID_API_KEY",
                    "message": "No valid API key found in 'Authorization' header"
                  },
                  "success": false
                }
              }
            }
          },
          "402": {
            "description": "Payment required - Subscription needed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "SUBSCRITPION_REQUIRED",
                    "message": "Subscription required to access this route"
                  },
                  "success": false
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "GET request not allowed"
                  },
                  "success": false
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "FAILED_UPDATE_QA_SOURCE",
                    "message": "Technical error occured!"
                  },
                  "success": false
                }
              }
            }
          }
        },
        "security": [{"BearerAuth": []}]
      }
    },
    "/v1/chatbot/{chatbotId}/qa/{QAId}": {
      "get": {
        "tags": ["Sources"],
        "summary": "Fetch Source QA",
        "operationId": "fetchSourceQA",
        "description": "Fetch details of a specific QA source",
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "description": "ID of specific chatbot",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "QAId",
            "in": "path",
            "description": "ID of specific chatbot source QA",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response with QA source details",
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "qa": {
                      "qa_id": 23242,
                      "question": "what is your name?",
                      "answer": "I am a chatbot developed to help your needs.",
                      "trained_characters": 34,
                      "is_trained": true
                    }
                  },
                  "success": true
                }
              }
            }
          },
          "400": {
            "description": "Bad request - Bot or QA not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "Bot not found": {
                    "value": {
                      "error": {
                        "code": "BOT_NOT_FOUND",
                        "message": "Bot not found"
                      },
                      "success": false
                    }
                  },
                  "QA not found": {
                    "value": {
                      "error": {
                        "code": "SOURCE_QA_NOT_FOUND",
                        "message": "QA not found"
                      },
                      "success": false
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "INVALID_API_KEY",
                    "message": "No valid API key found in 'Authorization' header"
                  },
                  "success": false
                }
              }
            }
          },
          "402": {
            "description": "Payment required - Subscription needed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "SUBSCRITPION_REQUIRED",
                    "message": "Subscription required to access this route"
                  },
                  "success": false
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "POST request not allowed"
                  },
                  "success": false
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "FAILED_FETCH_QA",
                    "message": "Technical error occured!"
                  },
                  "success": false
                }
              }
            }
          }
        },
        "security": [{"BearerAuth": []}]
      },
      "delete": {
        "tags": ["Sources"],
        "summary": "Delete Source QA",
        "operationId": "deleteSourceQA",
        "description": "Delete a QA source from a chatbot",
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "description": "ID of specific chatbot",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "QAId",
            "in": "path",
            "description": "ID of specific chatbot source QA",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "QA source deleted successfully",
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "message": "Successfully deleted chatbot qa"
                  },
                  "success": true
                }
              }
            }
          },
          "400": {
            "description": "Bad request - Bot or QA not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "Bot not found": {
                    "value": {
                      "error": {
                        "code": "BOT_NOT_FOUND",
                        "message": "Bot not found"
                      },
                      "success": false
                    }
                  },
                  "QA not found": {
                    "value": {
                      "error": {
                        "code": "SOURCE_QA_NOT_FOUND",
                        "message": "QA not found"
                      },
                      "success": false
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "INVALID_API_KEY",
                    "message": "No valid API key found in 'Authorization' header"
                  },
                  "success": false
                }
              }
            }
          },
          "402": {
            "description": "Payment required - Subscription needed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "SUBSCRITPION_REQUIRED",
                    "message": "Subscription required to access this route"
                  },
                  "success": false
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "POST request not allowed"
                  },
                  "success": false
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "FAILED_DELETE_CHATBOT_QA",
                    "message": "Technical error occured!"
                  },
                  "success": false
                }
              }
            }
          }
        },
        "security": [{"BearerAuth": []}]
      }
    },
    "/v1/chatbot/{chatbotId}/url/fetch": {
      "post": {
        "tags": ["Sources"],
        "summary": "Fetch URL Data",
        "operationId": "fetchURLData",
        "description": "Fetch data from a URL to be used as a source",
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "description": "ID of specific chatbot",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "Base URL of website"
                  }
                },
                "required": ["url"]
              },
              "example": {
                "url": "https://www.example.com"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "URL data fetched successfully",
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "urls": [{
                      "url_id": 21323,
                      "url": "https://www.example.com",
                      "trained_characters": 0,
                      "is_trained": false
                    }]
                  },
                  "success": true
                }
              }
            }
          },
          "400": {
            "description": "Bad request - Bot not found or validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "Bot not found": {
                    "value": {
                      "error": {
                        "code": "BOT_NOT_FOUND",
                        "message": "Bot not found"
                      },
                      "success": false
                    }
                  },
                  "Validation failed": {
                    "value": {
                      "error": {
                        "code": "FAILED_REQUEST_VALIDATION",
                        "message": "Request body malformed"
                      },
                      "success": false
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "INVALID_API_KEY",
                    "message": "No valid API key found in 'Authorization' header"
                  },
                  "success": false
                }
              }
            }
          },
          "402": {
            "description": "Payment required - Subscription needed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "SUBSCRITPION_REQUIRED",
                    "message": "Subscription required to access this route"
                  },
                  "success": false
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "GET request not allowed"
                  },
                  "success": false
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "FAILED_CHATBOT_URL_FETCH",
                    "message": "Technical error occured!"
                  },
                  "success": false
                }
              }
            }
          }
        },
        "security": [{"BearerAuth": []}]
      }
    },
    "/v1/chatbot/{chatbotId}/train": {
      "post": {
        "tags": ["Chatbots"],
        "summary": "Train Chatbot",
        "operationId": "trainChatbot",
        "description": "Train a chatbot with its configured sources",
        "parameters": [
          {
            "name": "chatbotId",
            "in": "path",
            "description": "ID of specific chatbot",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Chatbot trained successfully",
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "message": "Chatbot trained successfull"
                  },
                  "success": true
                }
              }
            }
          },
          "400": {
            "description": "Bad request - Bot not found or no valid sources",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "Bot not found": {
                    "value": {
                      "error": {
                        "code": "BOT_NOT_FOUND",
                        "message": "Bot not found"
                      },
                      "success": false
                    }
                  },
                  "No valid sources": {
                    "value": {
                      "error": {
                        "code": "SOURCE_NOT_FOUND",
                        "message": "No vaild source found for chatbot"
                      },
                      "success": false
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "INVALID_API_KEY",
                    "message": "No valid API key found in 'Authorization' header"
                  },
                  "success": false
                }
              }
            }
          },
          "402": {
            "description": "Payment required - Subscription needed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "SUBSCRITPION_REQUIRED",
                    "message": "Subscription required to access this route"
                  },
                  "success": false
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "METHOD_NOT_ALLOWED",
                    "message": "GET request not allowed"
                  },
                  "success": false
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "FAILED_TRAINING_CHATBOT",
                    "message": "Technical error occured!"
                  },
                  "success": false
                }
              }
            }
          }
        },
        "security": [{"BearerAuth": []}]
      }
    }
  },
  "components": {
    "schemas": {
      "ChatbotListResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "chatbots": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Chatbot"
                }
              }
            }
          },
          "success": {
            "type": "boolean"
          }
        }
      },
      "ChatbotResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "chatbots": {
                "$ref": "#/components/schemas/Chatbot"
              }
            }
          },
          "success": {
            "type": "boolean"
          }
        }
      },
      "Chatbot": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "profile_img": {
            "type": "string"
          },
          "initial_msg": {
            "type": "string"
          },
          "has_powered_by": {
            "type": "boolean"
          },
          "created_on": {
            "type": "string"
          },
          "settings": {
            "$ref": "#/components/schemas/ChatbotSettings"
          }
        }
      },
      "ChatbotSettings": {
        "type": "object",
        "properties": {
          "visibility": {
            "type": "string",
            "enum": ["private", "private_but_can_be_embedded", "public"]
          },
          "valid_domains": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "base_prompt": {
            "type": "string"
          },
          "theme": {
            "type": "string",
            "enum": ["dark", "light"]
          },
          "display_name": {
            "type": "string"
          },
          "float_btn_alignment": {
            "type": "string",
            "enum": ["left", "right"]
          },
          "user_message_color": {
            "type": "string",
            "format": "color"
          },
          "chat_bubble_button_color": {
            "type": "string",
            "format": "color"
          },
          "suggested_messages": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "no_of_message_limit": {
            "type": "integer"
          },
          "message_limit_duration": {
            "type": "integer"
          },
          "limit_reached_message": {
            "type": "string"
          },
          "initial_message": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "has_profile": {
            "type": "boolean"
          },
          "profile_img": {
            "type": "string",
            "format": "data-uri"
          },
          "has_chat_bubble_button_icon": {
            "type": "boolean"
          },
          "chat_bubble_img": {
            "type": "string",
            "format": "data-uri"
          },
          "auto_show_initial_msg": {
            "type": "integer"
          },
          "chat_bubble_rounded": {
            "type": "boolean"
          },
          "chat_bubble_transparent": {
            "type": "boolean"
          },
          "chat_bubble_shadow": {
            "type": "boolean"
          }
        }
      },
      "SessionListResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "sessions": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Session"
                }
              }
            }
          },
          "success": {
            "type": "boolean"
          }
        }
      },
      "SessionResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "session": {
                "$ref": "#/components/schemas/Session"
              }
            }
          },
          "success": {
            "type": "boolean"
          }
        }
      },
      "Session": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "created_on": {
            "type": "string"
          },
          "last_updated_on": {
            "type": "string"
          },
          "total_messages": {
            "type": "integer"
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          },
          "last_message": {
            "$ref": "#/components/schemas/Message"
          }
        }
      },
      "Message": {
        "type": "object",
        "properties": {
          "question": {
            "$ref": "#/components/schemas/MessageContent"
          },
          "answer": {
            "$ref": "#/components/schemas/MessageContent"
          }
        }
      },
      "MessageContent": {
        "type": "object",
        "properties": {
          "timestamp": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        }
      },
      "URLSourceListResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "urls": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/URLSource"
                }
              }
            }
          },
          "success": {
            "type": "boolean"
          }
        }
      },
      "URLSource": {
        "type": "object",
        "properties": {
          "url_id": {
            "type": "integer"
          },
          "url": {
            "type": "string"
          },
          "trained_characters": {
            "type": "integer"
          },
          "is_trained": {
            "type": "boolean"
          }
        }
      },
      "TextSourceListResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "texts": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/TextSource"
                }
              }
            }
          },
          "success": {
            "type": "boolean"
          }
        }
      },
      "TextSource": {
        "type": "object",
        "properties": {
          "text_id": {
            "type": "integer"
          },
          "title": {
            "type": "string"
          },
          "data": {
            "type": "string"
          },
          "trained_characters": {
            "type": "integer"
          },
          "is_trained": {
            "type": "boolean"
          }
        }
      },
      "QASourceListResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "qas": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/QASource"
                }
              }
            }
          },
          "success": {
            "type": "boolean"
          }
        }
      },
      "QASource": {
        "type": "object",
        "properties": {
          "qa_id": {
            "type": "integer"
          },
          "question": {
            "type": "string"
          },
          "answer": {
            "type": "string"
          },
          "trained_characters": {
            "type": "integer"
          },
          "is_trained": {
            "type": "boolean"
          }
        }
      },
      "SuccessResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "message": {
                "type": "string"
              }
            }
          },
          "success": {
            "type": "boolean"
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            }
          },
          "success": {
            "type": "boolean"
          }
        }
      }
    },
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  }
}