# Chatbot

## Get User Chatbots

> Retrieve a list of chatbots available for the specified user, including their models, agents, search types, and other configurations

```json
{"openapi":"3.1.0","info":{"title":"GLChat Backend API","version":"0.1.0"},"security":[{"OAuth2PasswordBearer":[]},{"APIKeyHeader":[]}],"components":{"securitySchemes":{"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"auth/token"}}},"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-Tenant-ID"}},"schemas":{"GetUserChatbotsResponse":{"properties":{"chatbots":{"items":{"$ref":"#/components/schemas/ChatbotItem"},"type":"array","title":"Chatbots"}},"type":"object","required":["chatbots"],"title":"GetUserChatbotsResponse","description":"Response model for getting user chatbots.\n\nAttributes:\n    chatbots (list[ChatbotItem]): List of chatbots available to the user."},"ChatbotItem":{"properties":{"id":{"type":"string","title":"Id","description":"The unique identifier for the chatbot"},"display_name":{"type":"string","title":"Display Name","description":"The display name of the chatbot"},"description":{"type":"string","title":"Description","description":"A brief description of the chatbot"},"models":{"items":{"$ref":"#/components/schemas/ChatbotModelItem"},"type":"array","title":"Models","description":"List of models supported by the chatbot"},"agents":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Agents","description":"List of agents supported by the chatbot"},"support_pii_anonymization":{"type":"boolean","title":"Support Pii Anonymization","description":"Whether the chatbot supports anonymizing personally identifiable information (PII)"},"default_pii_anonymization":{"type":"boolean","title":"Default Pii Anonymization","description":"Whether the chatbot anonymizes PII by default"},"search_types":{"items":{"$ref":"#/components/schemas/SearchType"},"type":"array","title":"Search Types","description":"List of supported search types for the chatbot"},"discovery_providers":{"additionalProperties":{"type":"string"},"type":"object","title":"Discovery Providers","description":"Dictionary of discovery providers and their configurations"},"max_file_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max File Size","description":"The maximum file size supported by the chatbot"},"max_file_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max File Count","description":"The maximum file count supported by the chatbot"},"enable_smart_search_integration":{"type":"boolean","title":"Enable Smart Search Integration","description":"Whether the chatbot supports smart search integration","default":false},"chat_history_limit":{"type":"integer","title":"Chat History Limit","description":"The maximum number of chat history messages to keep for this chatbot"},"connectors":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminConnectorModel"},"type":"array"},{"type":"null"}],"title":"Connectors","description":"List of connectors for the chatbot"},"is_question_library":{"type":"boolean","title":"Is Question Library","description":"Whether question library is enabled for this chatbot","default":false},"question_library_source":{"anyOf":[{"$ref":"#/components/schemas/QuestionLibrarySource"},{"type":"null"}],"description":"Source of question library (FAQ or MANUAL)"},"display_type":{"anyOf":[{"$ref":"#/components/schemas/DisplayType"},{"type":"null"}],"description":"Display type for questions (BY_ORDER or RANDOM)"},"click_behaviour":{"anyOf":[{"$ref":"#/components/schemas/ClickBehaviour"},{"type":"null"}],"description":"Click behaviour for questions (SEND or EDIT)"},"max_question_show":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Question Show","description":"Maximum number of questions to show"},"question_library":{"anyOf":[{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array"},{"type":"null"}],"title":"Question Library","description":"Full question library with categories and questions"},"question_show_list":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Question Show List","description":"List of questions to show based on max_question_show and display_type"},"tenant_id":{"type":"string","title":"Tenant Id","description":"The tenant ID for the chatbot"},"light_logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Light Logo Url","description":"The light logo URL for the chatbot"},"dark_logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dark Logo Url","description":"The dark logo URL for the chatbot"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number","description":"Phone number for the chatbot"},"use_tenant_logo":{"type":"boolean","title":"Use Tenant Logo","description":"Whether to use tenant logo","default":false},"enable_live_chat":{"type":"boolean","title":"Enable Live Chat","description":"Whether live chat feature is enabled for this chatbot","default":false},"show_app_logo":{"type":"boolean","title":"Show App Logo","description":"Whether to show app logo","default":false}},"type":"object","required":["id","display_name","description","models","agents","support_pii_anonymization","default_pii_anonymization","search_types","discovery_providers","chat_history_limit","tenant_id"],"title":"ChatbotItem","description":"Model for a chatbot item.\n\nAttributes:\n    id (str): The unique identifier for the chatbot.\n    display_name (str): The display name of the chatbot.\n    description (str): A brief description of the chatbot.\n    models (list[ChatbotModelItem]): List of models supported by the chatbot.\n    agents (list[dict[str, Any]]): List of agents supported by the chatbot.\n    support_pii_anonymization (bool): Whether the chatbot supports anonymizing\n        personally identifiable information (PII).\n    default_pii_anonymization (bool): Whether the chatbot anonymizes PII by default.\n    search_types (list[SearchType]): List of supported search types for the chatbot.\n    discovery_providers (dict[str, str]): Dictionary of discovery providers and their configurations.\n    max_file_size (int | None): The maximum file size for each file supported by the chatbot. Defaults to None.\n    max_file_count (int | None): The maximum file count supported by the chatbot. Defaults to None.\n    enable_smart_search_integration (bool): Whether the chatbot supports smart search integration.\n    chat_history_limit (int): The maximum number of chat history messages to keep for this chatbot.\n    connectors (list[AdminConnectorModel] | None, optional): List of connectors for the chatbot. Defaults to None.\n    is_question_library (bool): Whether question library is enabled for this chatbot.\n    question_library_source (QuestionLibrarySource | None): Source of question library (FAQ or MANUAL).\n    display_type (DisplayType | None): Display type for questions (BY_ORDER or RANDOM).\n    click_behaviour (ClickBehaviour | None): Click behaviour for questions (SEND or EDIT).\n    max_question_show (int | None): Maximum number of questions to show.\n    question_library (list[dict[str, str]]): Full question library with categories and questions.\n    question_show_list (list[str]): List of questions to show based on max_question_show and display_type.\n    tenant_id (str): The tenant ID for the chatbot.\n    light_logo_url (str | None): The logo URL for the chatbot.\n    dark_logo_url (str | None): The logo URL for the chatbot.\n    phone_number (str | None): Phone number for the chatbot.\n    use_tenant_logo (bool): Whether to use tenant logo.\n    enable_live_chat (bool): Whether live chat feature is enabled for this chatbot.\n    show_app_logo (bool): Whether to show app logo."},"ChatbotModelItem":{"properties":{"name":{"type":"string","title":"Name","description":"The name of the chatbot model"},"display_name":{"type":"string","title":"Display Name","description":"The display name of the chatbot model"},"description":{"type":"string","title":"Description","description":"A brief description of the chatbot model"},"icon":{"type":"string","title":"Icon","description":"The icon representing the chatbot model"},"supported_attachments":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object","title":"Supported Attachments","description":"Supported attachment types and formats"}},"type":"object","required":["name","display_name","description","icon","supported_attachments"],"title":"ChatbotModelItem","description":"Model for a chatbot model item.\n\nAttributes:\n    name (str): The name of the chatbot model.\n    display_name (str): The display name of the chatbot model.\n    description (str): A brief description of the chatbot model.\n    icon (str): The icon representing the chatbot model.\n    supported_attachments (dict[str, list[str]]): Supported attachment types and formats."},"SearchType":{"type":"string","enum":["normal","search","sql_search","web","deep_research","essentials_deep_research","comprehensive_deep_research"],"title":"SearchType","description":"The type of search to perform.\n\nAttributes:\n    NORMAL: Get answer from chatbot knowledge.\n    SEARCH: Get answer from various connectors.\n    SQL_SEARCH: Get answer from SQL-based database.\n    WEB: Get more relevant information from the web. (DEPRECATED)\n        Web Search uses real-time data. Agent selection isn't available in this mode.\n    DEEP_RESEARCH: Get answer from Deep Research Agent.\n    ESSENTIALS_DEEP_RESEARCH: Get answer from Deep Research with Essentials mode.\n        Provides key points and core insights without noise, optimized for speed and clarity.\n        Ideal for quick decision-making support and fast orientation.\n    COMPREHENSIVE_DEEP_RESEARCH: Get answer from Deep Research with Comprehensive mode.\n        Delivers the full picture with depth and thoroughness, covering all relevant angles,\n        details, and supporting data. Suitable for professional research tasks where\n        precision matters more than speed."},"AdminConnectorModel":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"display_name":{"type":"string","title":"Display Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"is_active":{"type":"boolean","title":"Is Active"},"knowledge_source":{"type":"boolean","title":"Knowledge Source","default":false},"is_connected":{"type":"boolean","title":"Is Connected","default":false},"chatbots":{"items":{"$ref":"#/components/schemas/glchat_be__admin__connector__model__model__AdminChatbotConnectorModel"},"type":"array","title":"Chatbots","default":[]}},"type":"object","required":["id","name","display_name","is_active"],"title":"AdminConnectorModel","description":"Admin Connector model.\n\nAttributes:\n    id (str): The unique identifier of the connector.\n    name (str): The name of the connector.\n    display_name (str): The display name of the connector.\n    description (str | None, optional): The description of the connector. Defaults to None.\n    icon (str | None, optional): The icon of the connector. Defaults to None.\n    is_active (bool): Whether the connector is active.\n    knowledge_source(bool): Determine if the connector will be shown in /connectors endpoint and\n        admin chatbot endpoints.\n    is_connected (bool, optional): Whether the current user is connected to the connector. Defaults to False.\n    chatbots (list[AdminChatbotConnectorModel], optional): List of chatbot connectors. Defaults to []."},"glchat_be__admin__connector__model__model__AdminChatbotConnectorModel":{"properties":{"id":{"type":"string","title":"Id"},"chatbot_id":{"type":"string","title":"Chatbot Id"},"chatbot_name":{"type":"string","title":"Chatbot Name"}},"type":"object","required":["id","chatbot_id","chatbot_name"],"title":"AdminChatbotConnectorModel","description":"Admin Chatbot Connector model.\n\nAttributes:\n    id (str): Chatbot connector ID.\n    chatbot_id (str): Chatbot ID.\n    chatbot_name (str): Chatbot name."},"QuestionLibrarySource":{"type":"string","enum":["FAQ","MANUAL"],"title":"QuestionLibrarySource","description":"Enum for question library source."},"DisplayType":{"type":"string","enum":["BY_ORDER","RANDOM"],"title":"DisplayType","description":"Enum for display type."},"ClickBehaviour":{"type":"string","enum":["SEND","EDIT"],"title":"ClickBehaviour","description":"Enum for click behaviour."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"ErrorResponse":{"properties":{"detail":{"type":"string","title":"Detail","description":"Error message"}},"type":"object","required":["detail"],"title":"ErrorResponse","description":"Response model for error.\n\nAttributes:\n    detail (str): The error message."}}},"paths":{"/chatbots":{"get":{"tags":["Chatbot"],"summary":"Get User Chatbots","description":"Retrieve a list of chatbots available for the specified user, including their models, agents, search types, and other configurations","operationId":"get_chatbots_chatbots_get","parameters":[{"name":"phone_number","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The phone number of the provider","title":"Phone Number"},"description":"The phone number of the provider"},{"name":"__Secure-next-auth.session-token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"  Secure-Next-Auth.Session-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetUserChatbotsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal Server Error"}}}}}}
```

## Get Chatbot Right-Sidebar Filter

> Retrieve the right-sidebar filter for a specific chatbot. This filter is fetched from the chatbot's preset.

```json
{"openapi":"3.1.0","info":{"title":"GLChat Backend API","version":"0.1.0"},"paths":{"/chatbots/{chatbot_id}/filters":{"get":{"tags":["Chatbot"],"summary":"Get Chatbot Right-Sidebar Filter","description":"Retrieve the right-sidebar filter for a specific chatbot. This filter is fetched from the chatbot's preset.","operationId":"get_chatbot_filter_chatbots__chatbot_id__filters_get","parameters":[{"name":"chatbot_id","in":"path","required":true,"schema":{"type":"string","title":"Chatbot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ConfigValueColumnDefinition"},"title":"Response Get Chatbot Filter Chatbots  Chatbot Id  Filters Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ConfigValueColumnDefinition":{"properties":{"name":{"type":"string","title":"Name"},"csv_name":{"type":"string","title":"Csv Name"},"label":{"type":"string","title":"Label"},"is_filter":{"type":"boolean","title":"Is Filter"},"is_field_of_interest":{"type":"boolean","title":"Is Field Of Interest"},"default":{"anyOf":[{},{"type":"null"}],"title":"Default"},"placeholder":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Placeholder"},"type":{"anyOf":[{"$ref":"#/components/schemas/ConfigValueType"},{"type":"null"}]},"is_range":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Range"},"is_multi":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Multi"},"min_date":{"anyOf":[{"type":"string","format":"date"},{"type":"string","format":"time"},{"type":"string"},{"type":"null"}],"title":"Min Date"},"max_date":{"anyOf":[{"type":"string","format":"date"},{"type":"string","format":"time"},{"type":"string"},{"type":"null"}],"title":"Max Date"},"min":{"anyOf":[{"type":"string","format":"date"},{"type":"string","format":"time"},{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"null"}],"title":"Min"},"max":{"anyOf":[{"type":"string","format":"date"},{"type":"string","format":"time"},{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"null"}],"title":"Max"},"step":{"anyOf":[{"type":"integer"},{"type":"number"},{"type":"null"}],"title":"Step"},"options":{"anyOf":[{"items":{"$ref":"#/components/schemas/ConfigValueOption"},"type":"array"},{"type":"null"}],"title":"Options"}},"type":"object","required":["name","csv_name","label","is_filter","is_field_of_interest"],"title":"ConfigValueColumnDefinition","description":"Config value column definition type.\n\nAttributes:\n    name (str): The name of the column.\n    label (str): The label of the column.\n    default (Any | None): The default value of the column.\n    placeholder (str | None): The placeholder of the column.\n    type (ConfigValueType): The type of the column.\n    is_range (bool): Whether the column is a range.\n    is_multi (bool): Whether the column is a multi-select.\n    min_date (datetime.date | datetime.time | str | None): The minimum date of the column.\n    max_date (datetime.date | datetime.time | str | None): The maximum date of the column.\n    min (datetime.date | datetime.time | str | int | float | None): The minimum value of the column.\n    max (datetime.date | datetime.time | str | int | float | None): The maximum value of the column.\n    step (int | float | None): The step of the column.\n    options (list[ConfigValueOption] | None): The options of the column."},"ConfigValueType":{"type":"string","enum":["select","date","boolean","number","time","string"],"title":"ConfigValueType","description":"Input type enum."},"ConfigValueOption":{"properties":{"label":{"type":"string","title":"Label"},"value":{"type":"string","title":"Value"}},"type":"object","required":["label","value"],"title":"ConfigValueOption","description":"Config value option type."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```
