openapi: 3.0.0
info:
  title: SiteGPT API Collection
  description: >-
    This collection contains the documentation of all the API endpoints.

    ## Getting started guide

    To start using the SiteGPT APIs, you need to 

    - You must use a valid API Key to send requests to the API endpoints. You
    can get your API key from SiteGPT's [billing
    dashboard](https://sitegpt.ai/billing). If you don't see it there, contact
    admin to generate one for you.

    - The API returns request responses in JSON format. When an API request
    returns an error, it is sent in the JSON response as an error key.
        
    ## Authentication

    SiteGPT uses API keys for authentication. You can generate a SiteGPT API key
    in the [billing dashboard](https://sitegpt.ai/billing).


    You must include an API key in each request to the Postman API with the
    Authorization request header.


    Header Name : Authorization


    Header Value : Bearer {{your-api-key}}


    ### Authentication error response

    If an API key is missing, malformed, or invalid, you will receive an HTTP
    401 Unauthorized response code.


    ## Need some help?

    In case you have any questions, feel free to contact us.
  license:
    name: SiteGPT Terms and Conditions
    url: https://sitegpt.ai/terms
  version: 1.0.0
  contact:
    name: Bhanu Teja P
    email: bhanu@sitegpt.ai
    url: mailto:bhanu@sitegpt.ai
servers:
  - url: https://sitegpt.ai/api
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
  schemas:
    ErrorResponse:
      type: object
      description: Error Response
      properties:
        success:
          type: boolean
          description: Indicates that this is error response
        message:
          type: string
          description: Overall error message regarding the operation performed
        data:
          type: object
          description: Data returned from the API. This will be `null` for errors
          nullable: true
        error:
          type: object
          description: Object with the error details
          properties:
            code:
              type: string
              description: Based on this error code, you can identify what is the error
            message:
              type: string
              description: The message indicating the reason for the error
            details:
              type: array
              description: More details on the error. Applicable only for Validation errors
              nullable: true
              items:
                type: object
                properties:
                  path:
                    type: array
                    description: >-
                      Specifies the path in request body where error occurred.
                      If the error field is nexted, then this array length will
                      be more than 1.
                    items:
                      oneOf:
                        - type: string
                          description: Specifies the name of the field
                        - type: integer
                          description: Specifies the position in an array
                  message:
                    type: string
                    description: Reason for the error of the path mentioned before
    Chatbot:
      type: object
      description: Chatbot
      properties:
        id:
          type: string
          description: Id of the chatbot
        title:
          type: string
          description: Title of the chatbot
        description:
          type: string
          description: Description of the chatbot
        createdById:
          type: string
          description: Id of the user that created this chatbot
        createdByEmail:
          type: string
          description: Email of the user that created this chatbot
        customContent:
          type: string
          description: Custom content of the chatbot
          nullable: true
        suggestions:
          type: array
          description: Quick prompts of the chatbot
          items:
            $ref: '#/components/schemas/QuickPrompt'
        prompts:
          type: array
          description: List of prompts set by the user
          items:
            $ref: '#/components/schemas/ChatbotPrompt'
        nextSuggestions:
          type: array
          description: Follow-up prompts of the chatbot
          items:
            $ref: '#/components/schemas/FollowUpPrompt'
        settings:
          $ref: '#/components/schemas/ChatbotSettings'
    ChatbotSettings:
      title: Chatbot-Settings
      type: object
      description: Settings of the chatbot
      properties:
        tooltip:
          type: string
          description: >-
            This tooltip will be shown on the top of chatbot icon. If not set,
            welcome message will be shown as tooltip
          nullable: true
        welcomeMessage:
          type: string
          description: The first message that the users will see in the chatbot
          nullable: true
        placeholderText:
          type: string
          description: >-
            Placeholder text that users see before they type their question in
            the chat
          nullable: true
        brandColor:
          type: string
          description: Primary color of the chatbot
          nullable: true
        brandTextColor:
          type: string
          description: Primary text color of the chatbot
          nullable: true
        hideSources:
          type: boolean
          description: Indicates whether to display sources or not in the chatbot
          nullable: true
        hideTooltip:
          type: boolean
          description: Indicates whether to hide tooltip or not in the chatbot
          nullable: true
        hideFeedbackButtons:
          type: boolean
          description: >-
            Indicates whether to hide feedback buttons (for each reply) or not
            in the chatbot
          nullable: true
        rtl:
          type: boolean
          description: >-
            Indicates whether to display the text in the chatbot right to left
            or opposite
          nullable: true
        watermarkText:
          type: string
          description: Text to be shown as the watermark in the chatbot
          nullable: true
        autoOpenChatWindowInDesktop:
          type: string
          enum:
            - ALWAYS_OPEN_WITH_DELAY
            - DONT_OPEN
          description: Option to handle behaviour auto open chat window in desktop
          nullable: true
        autoOpenChatWindowDelayInDesktop:
          type: integer
          description: >-
            Delay after which the chat window will shown in desktop when
            autoOpenChatWindowInDesktop is set to AUTO_OPEN_WITH_DELAY
          nullable: true
        autoOpenChatWindowInMobile:
          type: string
          enum:
            - ALWAYS_OPEN_WITH_DELAY
            - DONT_OPEN
          description: Option to handle behaviour auto open chat window in mobile
          nullable: true
        autoOpenChatWindowDelayInMobile:
          type: integer
          description: >-
            Delay after which the chat window will shown in mobile when
            autoOpenChatWindowInMobile is set to AUTO_OPEN_WITH_DELAY
          nullable: true
        hideWatermark:
          type: boolean
          description: Indicates whether the watermark is shown in the chatbot or not
          nullable: true
        watermarkLink:
          type: string
          description: Url of the watermark to be shown in the chatbot
          nullable: true
        distanceFromBottom:
          type: integer
          description: Distance from bottom (in px) where the chatbot icon should be shown
          nullable: true
        horizontalDistance:
          type: integer
          description: Horizantal distance (in px) where the chatbot icon should be shown
          nullable: true
        fontSize:
          type: integer
          description: Font size of the text shown in chatbot (in px)
          nullable: true
        iconSize:
          $ref: '#/components/schemas/ChatbotIconSize'
        iconPosition:
          $ref: '#/components/schemas/ChatbotIconPosition'
        height:
          type: number
          description: Height of the chatbot
          nullable: true
        ctaText:
          type: string
          description: Call to Action text
          nullable: true
        ctaLink:
          type: string
          description: Call to Action Link
          nullable: true
        localization:
          $ref: '#/components/schemas/ChatbotLocalizationSettings'
        maxWidth:
          type: number
          description: Max width of the chatbot
        iconSrcId:
          type: string
          description: Url reference of the Bot icon
          nullable: true
        personIconSrcId:
          type: string
          description: Url reference of the User/person icon
          nullable: true
        agentIconSrcId:
          type: string
          description: Url reference of the Agent icon
          nullable: true
        watermarkIconSrcId:
          type: string
          description: Url reference of the Watermark icon
          nullable: true
        bubbleIconSrcId:
          type: string
          description: Url reference of the Chat Buuble icon
          nullable: true
        systemPrompt:
          type: string
          description: >-
            Use this to change the tone of your chatbot and also give any
            additional instructions
          nullable: true
        userPrompt:
          type: string
          description: >-
            Use this to change the instructions you give to your chatbot in the
            user prompt
          nullable: true
        promptId:
          type: string
          description: >-
            Selected promptId that will be used as prompt to generate Open AI
            response
          nullable: true
        disableSmartFollowUpPrompts:
          type: boolean
          description: Option to disable smart followup questions generated by SiteGPT.
          nullable: true
        smartFollowUpPromptsCount:
          type: integer
          default: 3
          minimum: 1
          maximum: 5
          multipleOf: 1
          description: Number of smart follow up questions to be shown when enabled.
          nullable: true
        disableLeadNotifications:
          type: boolean
          description: Option to disable email notifications for new lead captures.
          nullable: true
        historyCount:
          type: integer
          description: >-
            Number of history messages to be considered when answering the
            question
          minimum: 0
          maximum: 50
          multipleOf: 1
          nullable: true
        temperature:
          type: number
          minimum: 0
          maximum: 2
          multipleOf: 0.01
          description: >-
            Creativity meter of the chatbot. This is valid only when creativity
            of the chatbot is custom
          nullable: true
        topK:
          type: number
          description: Number of relevant chunks to be fetched for answering the question
          minimum: 1
          maximum: 5
          multipleOf: 1
          nullable: true
        gptModel:
          $ref: '#/components/schemas/GPTModel'
        creativity:
          $ref: '#/components/schemas/ChatbotCreativity'
        webhookUrl:
          type: string
          description: >-
            All messages are sent to this global webhook url if webhook url is
            not configured at thread level
          nullable: true
        webhookToken:
          type: string
          description: >-
            This is the global webhook token that is sent in header in the calls
            made to the above webhook url for all messages if token is not
            configured at thread level
          nullable: true
        mode:
          $ref: '#/components/schemas/ChatMode'
        collectUserDetails:
          $ref: '#/components/schemas/CollectUserDetails'
        collectUserData:
          type: object
          description: This object has information what all user data needs to be collected
          properties:
            name:
              type: boolean
              description: Indicates whether to collect user name or not
            phone:
              type: boolean
              description: Indicates whether to collect user phone number or not
        extraData:
          type: string
          description: Any extra data you want to add to your chatbot.
          nullable: true
        metadata:
          type: object
          description: >-
            Any metadata (key-value pairs) that you can assign to the chatbot.
            Key should be string and Value could be anything.
          nullable: true
    ChatbotLocalizationSettings:
      title: Chatbot-Localization-Settings
      type: object
      description: Localization settings of the chatbot
      properties:
        locale:
          type: string
          description: >-
            Language of the text the widget writes itself (relative timestamps
            such as "just now"). A BCP-47 tag from the supported list, for
            example `da`, `de`, `ja`, `pt`; omit or send null for English
            (en-US).
          nullable: true
        learnMore:
          type: string
          description: Localization option for `Learn more` option
          nullable: true
        chatHome:
          $ref: '#/components/schemas/ChatbotLocalizationChatHome'
        chatMessages:
          $ref: '#/components/schemas/ChatbotLocalizationChatMessages'
        chatMessage:
          $ref: '#/components/schemas/ChatbotLocalizationChatMessage'
        chatAccount:
          $ref: '#/components/schemas/ChatbotLocalizationChatAccount'
    ChatbotLocalizationChatHome:
      title: Chatbot-Localization-ChatHome
      type: object
      description: Localization settings for home screen in the chatbot
      properties:
        home:
          type: string
          description: Text to be replaced for `Home` in home screen
        addDetails:
          type: string
          description: Text to be replaced for `Add details` in home screen
        startConversation:
          type: string
          description: Text to be replaced for `Start a conversation` in home screen
        starting:
          type: string
          description: Text to be replaced for `Starting...` in home screen
    ChatbotLocalizationChatMessages:
      title: Chatbot-Localization-ChatMessages
      type: object
      description: Localization settings for messages screen in the chatbot
      properties:
        messages:
          type: string
          description: Text to be replaced for `Messages` in messages screen
        noMessages:
          type: string
          description: Text to be replaced for `No Messages` in messages screen
        loginToSeeHistory:
          type: string
          description: >-
            Text to be replaced for `Verify your email to save your conversation
            history.` in messages screen
        historyShowsUpHere:
          type: string
          description: >-
            Text to be replaced for `Your conversation history shows up here.`
            in messages screen
        verifyEmail:
          type: string
          description: Text to be replaced for `Verify your email` in messages screen
        startConversation:
          type: string
          description: Text to be replaced for `Start a conversation` in messages screen
        starting:
          type: string
          description: Text to be replaced for `Starting...` in messages screen
    ChatbotLocalizationChatMessage:
      title: Chatbot-Localization-ChatMessage
      type: object
      description: Localization settings for individual conversations in the chatbot
      properties:
        botName:
          type: string
          description: Text to be replaced for `Bot` in individual conversations
        yourName:
          type: string
          description: Text to be replaced for `You` in individual conversations
        agentName:
          type: string
          description: Text to be replaced for `Agent` in individual conversations
        escalationHeading:
          type: string
          description: >-
            Text to be replaced for `Are you sure you want to escalate the chat
            to human support?` in individual conversations
        escalationSubHeading:
          type: string
          description: >-
            Text to be replaced for `This conversation will be shared with the
            human support and they will get back to you as soon as they can.` in
            individual conversations
        yesContinue:
          type: string
          description: Text to be replaced for `Yes, continue` in individual conversations
        cancel:
          type: string
          description: Text to be replaced for `Cancel` in individual conversations
        conversationEscalated:
          type: string
          description: >-
            Text to be replaced for `👨‍💼 Conversation changed to human mode`
            in individual conversations
    ChatbotLocalizationChatAccount:
      title: Chatbot-Localization-ChatAccount
      type: object
      description: Localization settings for account screen in the chatbot
      properties:
        account:
          type: string
          description: Text to be replaced for `Account` in account screen
        verifyEmail:
          type: string
          description: Text to be replaced for `Verify your email` in account screen
        loginToSeeHistory:
          type: string
          description: >-
            Text to be replaced for `Verify your email to save your chat
            history` in account screen
        emailLabel:
          type: string
          description: Text to be replaced for `Email` in account screen
        nameLabel:
          type: string
          description: Text to be replaced for `Name` in account screen
        phoneLabel:
          type: string
          description: Text to be replaced for `Phone Number` in account screen
        submit:
          type: string
          description: Text to be replaced for `Submit` in account screen
        sendingOtp:
          type: string
          description: Text to be replaced for `Sending OTP...` in account screen
        verifyOtp:
          type: string
          description: Text to be replaced for `Verify OTP` in account screen
        sentOtpToEmail:
          type: string
          description: >-
            Text to be replaced for `We sent the OTP to your email address` in
            account screen
        otp:
          type: string
          description: Text to be replaced for `OTP` in account screen
        verifyAndContinue:
          type: string
          description: Text to be replaced for `Verify & Continue` in account screen
        notReceivedOtpYet:
          type: string
          description: Text to be replaced for `Didn't receive OTP yet?` in account screen
        resend:
          type: string
          description: Text to be replaced for `Resend` in account screen
        editDetails:
          type: string
          description: Text to be replaced for `Edit Details` in account screen
        resetting:
          type: string
          description: Text to be replaced for `Resetting...` in account screen
        verifying:
          type: string
          description: Text to be replaced for `Verifying...` in account screen
        logout:
          type: string
          description: Text to be replaced for `Logout` in account screen
        loggingOut:
          type: string
          description: Text to be replaced for `Logging out...` in account screen
        verified:
          type: string
          description: Text to be replaced for `Verified` in account screen
        edit:
          type: string
          description: Text to be replaced for `Edit` in account screen
        update:
          type: string
          description: Text to be replaced for `Update` in account screen
        updating:
          type: string
          description: Text to be replaced for `Updating...` in account screen
    QuickPrompt:
      type: object
      description: Chatbot Conversation Starter
      properties:
        id:
          type: string
          description: Id of the conversation-starter
        title:
          type: string
          description: >-
            Title of the conversation-starter. This is the text that is shown as
            button in the chatbot.
        link:
          type: string
          description: >-
            Link of the conversation starter. If this link is not null, then
            when you click on the conversation starter in the chatbot, this link
            will be opened instead of sending a message to the chatbot.
          nullable: true
        description:
          type: string
          description: >-
            Description of the conversation-starter. This is the message that
            will be sent to the chatbot when you click on the
            conversation-starter inside the chatbot.
    FollowUpPrompt:
      type: object
      description: Follow Up Prompt
      properties:
        id:
          type: string
          description: Id of the follow-up prompt.
        title:
          type: string
          description: >-
            Title of the follow-up-prompt. This is the text that is shown as
            button in the chatbot.
        link:
          type: string
          description: >-
            Link of the follow-up prompt. If this link is not null, then when
            you click on the follow-up prompt in the chatbot, this link will be
            opened instead of sending a message to the chatbot.
          nullable: true
        description:
          type: string
          description: >-
            Description of the follow-up-prompt. This is the message that will
            be sent to the chatbot when you click on the follow-up-prompt inside
            the chatbot.
        isEscalationPrompt:
          type: boolean
          description: 'Indicates whether the follow-up prompt is escalation prompt or not. '
    ChatbotPersona:
      title: ChatbotPersona
      type: object
      description: Chatbot Persona
      properties:
        id:
          type: string
          description: Id of the persona
        title:
          type: string
          description: Title of the persona
        description:
          type: string
          description: Short description of the persona
        instructions:
          type: string
          description: Actual instructions of the persona. These will be sent to Open AI.
    ChatbotPrompt:
      title: ChatbotPrompt
      type: object
      description: Chatbot Prompt
      properties:
        id:
          type: string
          description: Id of the prompt
        title:
          type: string
          description: Title of the prompt
        description:
          type: string
          description: Short description of the prompt
        instructions:
          type: string
          description: Actual instructions of the prompt. These will be sent to Open AI.
        temperature:
          type: number
          minimum: 0
          maximum: 1
          multipleOf: 0.01
          description: >-
            Decides creativity level of the chatbot response. 0 is more focused
            and 1 is more creative/random.
    Thread:
      title: Thread
      type: object
      description: Chatbot Thread
      properties:
        threadId:
          type: string
          description: Id of the chatbot thread
        chatbotId:
          type: string
          description: Id of the chatbot
        chatUserId:
          type: string
          description: Id of the user chatting in the thread
          nullable: true
        mode:
          enum:
            - AI
            - AGENT
          description: Mode of the thread
        startedAt:
          type: string
          format: date-time
          description: Timestamp indicating when the thread has been started
        updatedAt:
          type: string
          format: date-time
          description: Timestamp indicating when the thread has been last updated
        endedAt:
          type: string
          format: date-time
          description: Timestamp indicating when the thread has been ended
        escalated:
          type: boolean
          description: Indicates whether conversation has been escalated or not
        webhookUrl:
          type: string
          description: All messages are sent to this webhook url
          nullable: true
        webhookToken:
          type: string
          description: >-
            The token which is sent in header in the calls made to the above
            webhook url for all messages
          nullable: true
        messages:
          type: array
          description: Messages of the thread
          items:
            $ref: '#/components/schemas/ThreadMessage'
        totalMessagesRead:
          type: integer
          description: Number of messages that are read in this thread
        chatUser:
          $ref: '#/components/schemas/ChatUser'
    ThinThread:
      title: Thin-Thread
      type: object
      description: Thin Thread
      properties:
        threadId:
          type: string
          description: Id of the chatbot thread
        mode:
          enum:
            - AI
            - AGENT
          description: Mode of the thread
        startedAt:
          type: string
          format: date-time
          description: Timestamp indicating when the thread has been started
        updatedAt:
          type: string
          format: date-time
          description: Timestamp indicating when the thread has been last updated
        endedAt:
          type: string
          format: date-time
          description: Timestamp indicating when the thread has been ended
        escalated:
          type: boolean
          description: Indicates whether the thread is escalated or not
        important:
          type: boolean
          description: Indicates whether the thread is marked as important or not
        resolved:
          type: boolean
          description: Indicates whether the thread is resolved or not
        totalMessages:
          type: integer
          description: Count of total messages
          minimum: 0
        totalPositiveMessages:
          type: integer
          description: Count of total positive messages
          minimum: 0
        totalNegativeMessages:
          type: integer
          description: Count of total negative messages
          minimum: 0
        totalGpt4MessagesCount:
          type: integer
          description: Count of total GPT-4.1 messages
          minimum: 0
        totalMessagesRead:
          type: integer
          description: Number of messages that have are already read
        chatUser:
          $ref: '#/components/schemas/ChatUser'
        lastMessage:
          $ref: '#/components/schemas/ThreadLastMessage'
    ChatQuestionAnswer:
      title: Chat-Question-Answer
      type: object
      description: Model for question/answer in the chat
      nullable: true
      properties:
        text:
          type: string
          description: Text containing either question or the answer
        timestamp:
          type: string
          format: date-time
          description: Timestamp of the question asked or answer replied
    MessageReaction:
      title: Message-Reaction
      description: User's reaction to the message
      enum:
        - POSITIVE
        - NEGATIVE
        - NEUTRAL
    MessageType:
      title: Message-Type
      description: Type of the message in the thread
      enum:
        - NORMAL_MESSAGE
        - USER_MESSAGE
        - AGENT_MESSAGE
        - SYSTEM_MESSAGE
    SystemMessageType:
      title: System-Message-Type
      description: Type of the message if type of the message is SYSTEM_MESSAGE
      enum:
        - CONVERSATION_ESCALATED
        - EXCEEDED_USAGE_LIMITS
        - EMAIL_VERIFIED
        - ENTERED_WRONG_OTP
        - PROVIDED_EMAIL
        - PERSONA_SELECTED
        - PROBLEMS_WITH_UPSTREAM_PROVIDER
        - COLLECT_LEAD
    ThreadMessage:
      title: Thread-Message
      type: object
      description: Message of a thread
      properties:
        messageId:
          type: string
          description: Id of the message
        messageType:
          $ref: '#/components/schemas/MessageType'
        systemMessageType:
          $ref: '#/components/schemas/SystemMessageType'
        question:
          $ref: '#/components/schemas/ChatQuestionAnswer'
        answer:
          $ref: '#/components/schemas/ChatQuestionAnswer'
        reaction:
          $ref: '#/components/schemas/MessageReaction'
        sources:
          type: array
          description: Sources used to answer the question
          items:
            type: string
        escalated:
          type: boolean
          description: Indicates whether this message is escalated or not
        iconUrl:
          type: string
          description: Url of the icon used in this message
          nullable: true
        prompts:
          type: array
          description: Quick prompts that have been configured by chatbot owner
          nullable: true
          items:
            $ref: '#/components/schemas/QuickPrompt'
        gptModel:
          type: string
          description: GPT Model used to answer the question
    ThreadLastMessage:
      title: Thread-Last-Message
      description: Last message of a thread
      type: object
      properties:
        messageId:
          type: string
          description: Id of the message
        messageType:
          $ref: '#/components/schemas/MessageType'
        systemMessageType:
          $ref: '#/components/schemas/SystemMessageType'
        threadId:
          type: string
          description: Id of the thread this message belongs to
        chatbotId:
          type: string
          description: Id of the chatbot this message belongs to
        question:
          $ref: '#/components/schemas/ChatQuestionAnswer'
        answer:
          $ref: '#/components/schemas/ChatQuestionAnswer'
        reaction:
          $ref: '#/components/schemas/MessageReaction'
        sources:
          type: array
          description: Sources used to answer the question
          items:
            type: string
        escalated:
          type: boolean
          description: Indicates whether this message is escalated or not
        iconUrl:
          type: string
          description: Url of the icon used in this message
          nullable: true
        prompts:
          type: array
          description: Quick prompts that have been configured by chatbot owner
          nullable: true
          items:
            $ref: '#/components/schemas/QuickPrompt'
        gptModel:
          type: string
          description: GPT Model used to answer the question
    ChatUser:
      title: Chat-User
      type: object
      description: Chat User
      nullable: true
      properties:
        id:
          type: string
          description: Id of the user
        name:
          type: string
          description: Name of the user
        email:
          type: string
          format: email
          description: Email Id of the user
        phone:
          type: string
          description: Phone Number of the user
        verified:
          type: boolean
          description: Indicates whether the user is verified or not
        createdAt:
          type: string
          format: date-time
          description: Timestamp indicating when the user is created
        updatedAt:
          type: string
          format: date-time
          description: Timestamp indicating when the user is last updated
    GPTModel:
      title: GPT-Model
      enum:
        - gpt-3.5-turbo
        - gpt-4
      description: All available GPT models
    ChatFrom:
      title: Chat-From
      enum:
        - USER
        - AGENT
      description: Indicates who all can send messages to the chat threads
    CollectUserDetails:
      title: CollectUserDetails
      description: Options whether to collect user details or not
      enum:
        - MANDATORY
        - OPTIONAL
        - DO_NOT_COLLECT
    ChatMode:
      title: Chat-Mode
      description: Mode of the chat
      enum:
        - AI
        - AGENT
    ChatbotCreativity:
      title: Chatbot-Creativity
      description: Options of the creativity for the chatbot
      enum:
        - restricted
        - conservative
        - creative
        - custom
    ChatbotIconPosition:
      title: Chatbot-Icon-Position
      description: Possible options for icon position of the chatbot
      enum:
        - LEFT
        - RIGHT
    ChatbotIconSize:
      title: Chatbot-Icon-Size
      description: Possible options foe icon size of the chatbot
      enum:
        - SMALL
        - MEDIUM
        - LARGE
        - XL
        - 2XL
        - 3XL
        - 4XL
        - 5XL
    WhitelabelBrand:
      title: Whitelabel-Brand
      type: object
      description: Details of the whitelabel brand
      properties:
        id:
          type: string
          description: Id of the whitelabel brand
        name:
          type: string
          description: Name of the whitelabel brand
        domain:
          type: string
          description: Domain of the whitelabel brand
        marketingDomain:
          type: string
          description: Marketing domain of the whitelabel brand
        supportEmail:
          type: string
          description: Support email of the whitelabel brand
        color:
          type: string
          description: Color of the whitelabel brand
        terms:
          type: string
          description: Terms and conditions of the whitelabel brand
        privacyPolicy:
          type: string
          description: Privacy policy of the whitelabel brand
        watermark:
          type: string
          nullable: true
        ownedById:
          type: string
          description: Owner id of the whitelabel brand
        logo:
          type: string
          description: Logo of the whitelabel brand
        fullLogo:
          type: string
          description: Full logo of the whitelabel brand
        metaDetails:
          $ref: '#/components/schemas/WhitelabelBrandMetaDetails'
        emailSettings:
          $ref: '#/components/schemas/WhitelabelBrandEmailSettings'
        defaultQuota:
          $ref: '#/components/schemas/WhitelabelBrandDefaultQuota'
        createdAt:
          type: string
          description: Timestamp at which the brand has been created
        updatedAt:
          type: string
          description: Timestamp at which the brand has been recently updated
    WhitelabelBrandEmailSettings:
      title: Whitelabel-Brand-Email-Settings
      type: object
      description: Email settings of the whitelabel brand
      properties:
        fromName:
          type: string
          description: From name of email config of the whitelabel brand
          nullable: true
        fromEmail:
          type: string
          description: From email of email config of the whitelabel brand
        replyToEmail:
          type: string
          description: Reply-to email of email config of the whitelabel brand email config
        resendApiKey:
          type: string
          description: Resend API key of email config of the whitelabel brand
    WhitelabelBrandMetaDetails:
      title: Whitelabel-Brand-Meta-Details
      type: object
      properties:
        title:
          type: string
          description: Meta title of the whitelabel brand
        description:
          type: string
          description: Meta description of the whitelabel brand
        ogImage:
          type: string
          description: Og image of the whitelabel brand
      description: Meta details of the whitelabel brand
    WhitelabelBrandDefaultQuota:
      title: Whitelabel-Brand-Default-Quota
      type: object
      description: Default quota of the brand
      properties:
        chatbotsQuota:
          type: integer
          minimum: 0
          description: Default chatbots quota for the new users
        linksQuota:
          type: integer
          minimum: 0
          description: Default links quota for the new users
        filesQuota:
          type: integer
          minimum: 0
          description: Default files quota for the new users
        combinedMessagesQuota:
          type: integer
          minimum: 0
          description: Default messages quota for the new users
        membersQuota:
          type: integer
          minimum: 0
          description: Default members quota for the new users
    WhitelabelUser:
      title: Whitelabel-User
      type: object
      description: Whitelabel User
      properties:
        id:
          type: string
          description: Id of the whitelabel user
        brandId:
          type: string
          description: Id of the brand which whitelabel user belongs to
        email:
          type: string
          description: Email of the whitelabel user
        name:
          type: string
          description: Name of the whitelabel user
        profilePic:
          type: string
          description: Profile picture url of the whitelabel user
        chatbotsQuota:
          type: integer
          description: Chatbots quota of the whitelabel user
        linksQuota:
          type: integer
          description: Links quota of the whitelabel user
        filesQuota:
          type: integer
          description: Files quota of the whitelabel user
        combinedMessagesQuota:
          type: integer
          description: Messages quota of the whitelabel user
        membersQuota:
          type: integer
          description: Members quota of the whitelabel user
        apiKey:
          type: string
          description: API key of the whitelabel user
        features:
          $ref: '#/components/schemas/WhitelabelUserFeatures'
        createdAt:
          type: string
          format: date-time
          description: Timestamp at which the whitelabel user has been created
        updatedAt:
          type: string
          format: date-time
          description: Timestamp at which the whitelabel user has been recently updated
    WhitelabelUserFeatures:
      title: WhitelabelUserFeatures
      type: object
      description: Features of Whitelabel User
      properties:
        watermark:
          type: boolean
          description: Indicates whether the watermark feature is enabled or not
        api:
          type: boolean
          description: Indicates whether the api feature is enabled or not
        webhooks:
          type: boolean
          description: Indicates whether the webhooks feature is enabled or not
        functions:
          type: boolean
          description: Indicates whether the functions feature is enabled or not
        integrations:
          type: boolean
          description: Indicates whether the integrations feature is enabled or not
        googleChatIntegration:
          type: boolean
          description: Indicates whether the google chat feature is enabled or not
        messengerChatIntegration:
          type: boolean
          description: Indicates whether the messenger chat feature is enabled or not
        crispChatIntegration:
          type: boolean
          description: Indicates whether the crisp chat feature is enabled or not
        slackChatIntegration:
          type: boolean
          description: Indicates whether the slack chat feature is enabled or not
        zendeskChatIntegration:
          type: boolean
          description: Indicates whether the zendesk chat feature is enabled or not
    ScrapeOptions:
      title: ScrapeOptions
      type: object
      description: Options for web scraping
      properties:
        onlyMainContent:
          type: boolean
          default: true
          description: >-
            When enabled, only the main content of the page is extracted,
            excluding headers, footers, sidebars, and navigation elements
        includeSelectors:
          type: array
          items:
            type: string
          description: CSS selectors to include when scraping (e.g., "main", ".content")
        excludeSelectors:
          type: array
          items:
            type: string
          description: CSS selectors to exclude when scraping (e.g., "footer", ".sidebar")
        headers:
          type: object
          additionalProperties:
            type: string
          description: >-
            Custom HTTP headers to use when fetching pages (e.g.,
            {"Authorization": "Bearer token"})
    SyncFrequency:
      title: SyncFrequency
      type: string
      description: Frequency for automatic content re-sync (requires feature flag)
      enum:
        - NEVER
        - DAILY
        - WEEKLY
        - MONTHLY
      default: NEVER
security:
  - bearerAuth: []
tags:
  - name: Chatbot
    x-displayName: Chatbots
    description: >-
      APIs to manage different chatbots. APIs include `Fetching All Chatbots`,
      `Creating New Chatbot`, Fetching One Chatbot`, `Updating Chatbot
      Appearance` and `Deleting Chatbot`.
    x-mint:
      icon: message-bot
  - name: Chatbot Appearance
    x-displayName: Appearance
    description: APIs to update appearance of the chatbot.
    x-mint:
      icon: palette
  - name: Chatbot Custom Content
    x-displayName: Custom Content
    description: APIs to modify custom content of the chatbot.
    x-mint:
      icon: file-pen
  - name: Chatbot Follow Up Prompts
    x-displayName: Follow-up Prompts
    description: >-
      APIs to manage `Follow up Prompts` of a particular chatbot. APIs include
      `Fetching All Follow up Prompts`, `Adding New Follow up Prompt`, `Fetching
      One Follow up Prompt`, `Updating Follow up Prompt` and `Deleting Follow up
      Prompt`.
    x-mint:
      icon: message-arrow-up
  - name: Chatbot Icons
    x-displayName: Icons
    description: APIs to manage (add/update/delete) icons related to a particular chatbot.
    x-mint:
      icon: icons
  - name: Chatbot Links
    x-displayName: Content & Training
    description: >-
      APIs to fetch internal links of any url and to add certain links to a
      particular chatbot.
    x-mint:
      icon: book-open
  - name: Chatbot Messages
    x-displayName: Messages
    description: >-
      APIs to send a message to a particular thread or start a new conversation
      with in a particular chatbot.
    x-mint:
      icon: messages
  - name: Chatbot Personas
    x-displayName: Personas
    description: APIs to manage personas of the chatbot.
    x-mint:
      icon: user-tie
  - name: Chatbot Prompts
    x-displayName: Instructions
    description: APIs to manage prompts of the chatbot.
    x-mint:
      icon: message-text
  - name: Chatbot Conversation Starters
    x-displayName: Conversation Starters
    description: >-
      APIs to manage `Conversation Starters` of a particular chatbot. APIs
      include `Fetching All Conversation Starters`, `Adding New Conversation
      Starter`, `Fetching One Conversation Starter`, `Updating Conversation
      Starter` and `Deleting Conversation Starter`.
    x-mint:
      icon: bolt
  - name: Chatbot Settings
    x-displayName: Settings
    description: >-
      APIs to update different settings of the chatbot. APIs include `General
      Settings`, `User Data Settings`, `Chat Mode Settings`, `Localization
      Settings` and `Advanced Settings`.
    x-mint:
      icon: gear
  - name: Chatbot Threads
    x-displayName: Threads
    description: >-
      APIs to manage threads related to a particular chatbot. APIs include
      `Fetching All Threads`, `Fetching One Thread` and `Update Thread`.
    x-mint:
      icon: message-lines
  - name: Whitelabel
    x-displayName: Whitelabel (Deprecated)
    description: >-
      APIs to manage whitelabel users. APIs include `Create Whitelabel User` and
      `Update Whitelabel User Quota`.
    x-mint:
      icon: tag
paths:
  /v0/chatbots:
    get:
      summary: Fetch All Chatbots
      tags:
        - Chatbot
      operationId: fetch-all-chatbots
      description: Fetch all the chatbots
      parameters:
        - schema:
            type: string
            default: ','
            example: ','
          in: query
          name: delimeter
          description: Delimeter to identify multiple values in other parameters
        - schema:
            type: string
            example: key1,key2
          in: query
          name: metadataKeys
          description: Array of keys to be searched in metadata (separated by delimeter)
        - schema:
            type: string
            example: value1,value2
          in: query
          name: metadataValues
          description: >-
            Array of values to be searched against above metadata keys
            (separated by delimeter)
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                type: object
                description: Success Response
                properties:
                  success:
                    type: boolean
                    description: >-
                      Indicates whether this is success response or error
                      response
                  message:
                    type: string
                    description: Overall message regarding the operation performed
                  data:
                    type: object
                    description: Data returned from the server
                    properties:
                      chatbots:
                        type: array
                        description: List of chatbots
                        items:
                          $ref: '#/components/schemas/Chatbot'
              examples:
                Success:
                  value:
                    success: true
                    message: Fetched all the chatbots successfully
                    data:
                      chatbots:
                        - id: '361628903185318481'
                          title: My First Bot
                          description: This is my first chat bot
                          settings:
                            userPrompt: ''
                            welcomeMessage: ''
                            systemPrompt: ''
                            promptId: null
                            hideTooltip: true
                          createdById: '360596271623307865'
                          createdByEmail: saidheeraj.kumar04@gmail.com
                          suggestions:
                            - id: 6b3ae643-257f-4ede-a28c-6ef02ed2737a
                              title: What is this?
                              description: What is site gpt ?
                          nextSuggestions: []
                          prompts: []
                        - id: '365062873485935184'
                          title: My Bot
                          description: This is a test chatbot
                          settings:
                            mode: AGENT
                            tooltip: Want to know anything about the porduct?
                            welcomeMessage: Hello! How can I assist you today?
                            placeholderText: Ask me anything...
                            brandColor: '#2563eb'
                            hideSources: false
                            hideTooltip: false
                            hideWatermark: false
                            watermarkText: Powered by SiteGPT
                            watermarkIconSrcId: ''
                            watermarkLink: https://sitegpt.ai
                            distanceFromBottom: 16
                            horizontalDistance: 16
                            fontSize: 14
                            iconSize: SMALL
                            iconPosition: RIGHT
                            height: 85
                            ctaLink: ''
                            ctaText: ''
                            iconSrcId: ''
                            personIconSrcId: ''
                            brandTextColor: '#FFFFFF'
                            hideFeedbackButtons: false
                            rtl: false
                            agentIconSrcId: ''
                            bubbleIconSrcId: ''
                            localization:
                              learnMore: Learn more
                              chatHome:
                                home: Home
                                addDetails: Add details
                                startConversation: Start a conversation
                                starting: Starting...
                              chatMessages:
                                messages: Messages
                                noMessages: No Messages
                                loginToSeeHistory: >-
                                  Verify your email to save your conversation
                                  history.
                                historyShowsUpHere: Your conversation history shows up here.
                                verifyEmail: Verify your email
                                startConversation: Start a conversation
                                starting: Starting...
                              chatMessage:
                                botName: Bot
                                yourName: You
                                agentName: Agent
                                escalationHeading: >-
                                  Are you sure you want to escalate the chat to
                                  human support?
                                escalationSubHeading: >-
                                  This conversation will be shared with the
                                  human support and they will get back to you as
                                  soon as they can.
                                yesContinue: Yes, continue
                                cancel: Cancel
                                conversationEscalated: 👨‍💼 Conversation changed to human mode
                              chatAccount:
                                account: Account
                                verifyEmail: Verify your email
                                loginToSeeHistory: Verify your email to save your chat history.
                                emailLabel: Email
                                nameLabel: Name
                                phoneLabel: Phone Number
                                sendingOtp: Sending OTP...
                                verifyOtp: Verify OTP
                                sentOtpToEmail: We sent the OTP to your email address
                                otp: OTP
                                verifyAndContinue: Verify & Continue
                                notReceivedOtpYet: Didn't receive OTP yet?
                                resend: Resend
                                editDetails: Edit Details
                                resetting: Resetting...
                                verifying: Verifying...
                                logout: Logout
                                loggingOut: Logging out...
                                verified: Verified
                                edit: Edit
                                update: Update
                                updating: Updating...
                            systemPrompt: >-
                              You are a funny AI assistant and you answer the
                              user queries based on the website content. Include
                              jokes in your answer.
                            userPrompt: >-
                              You are an AI assistant who answers user questions
                              based on the website content. Answer the questions
                              in the same language as the language of the
                              question.
                            promptId: 042686d9-b695-4dc5-aa11-58706284d45e
                            historyCount: 4
                            temperature: 1
                            topK: 3
                            gptModel: gpt-3.5-turbo
                            collectUserDetails: DO_NOT_COLLECT
                            collectUserData:
                              name: false
                              phone: false
                            creativity: conservative
                            webhookUrl: https://example.com
                            webhookToken: abc123
                            extraData: ''
                            metadata:
                              key1: value1
                          createdById: '360596271623307865'
                          createdByEmail: saidheeraj.kumar04@gmail.com
                          suggestions:
                            - id: 538aa9ca-ef69-4a1a-a6a2-ba1f62f05c43
                              title: Contact us
                              description: How to contact you?
                              link: https://sitegpt.ai/contact-us
                            - id: 40ffc3fe-9d74-439c-bfec-8b0d69a94836
                              title: Yo
                              description: Hey what's up?
                          nextSuggestions:
                            - id: dd6480d7-33da-4943-a5f5-24d7593ec62e
                              title: Elaborate
                              link: ''
                              description: Explain this in layman language
                              isEscalationPrompt: false
                          prompts:
                            - id: 042686d9-b695-4dc5-aa11-58706284d45e
                              title: Random
                              description: Random prompt
                              instructions: You should provide random information
                              temperature: 0.99
        '400':
          description: Bad Request
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Validation Error:
                  value:
                    success: false
                    message: Failed to fetch all the chatbots
                    data: null
                    error:
                      code: REQUEST_VALIDATION_FAILED
                      message: >-
                        Numbers of keys in metadataKeys and number of values in
                        metadataValues should be equal
                      details: null
        '401':
          description: Unauthorized
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Authentication Error:
                  value:
                    success: false
                    message: Failed to fetch all the chatbots
                    data: null
                    error:
                      code: API_KEY_NOT_VALID
                      message: Authorization header does not contain valid API key
                      details: null
        '405':
          description: Method Not Allowed
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Method Not Allowed Error:
                  value:
                    success: false
                    message: Failed to fetch all the chatbots
                    data: null
                    error:
                      code: REQUEST_METHOD_NOT_ALLOWED
                      message: POST request method is not allowed
                      details: null
        '500':
          description: Internal Server Error
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Server Error:
                  value:
                    success: false
                    message: Failed to fetch all the chatbots
                    data: null
                    error:
                      code: FETCH_ALL_CHATBOTS_FAILED
                      message: Some technical error has occurred !!
                      details: null
    post:
      tags:
        - Chatbot
      summary: Create Chatbot
      description: Create a new chatbot
      requestBody:
        content:
          application/json:
            schema:
              type: object
              description: Request body
              properties:
                chatbotName:
                  type: string
                  description: Title of the chatbot
              required:
                - chatbotName
            examples:
              Request Body:
                value:
                  chatbotName: Test Bot
        description: Request body to create the chatbot
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                type: object
                description: Success Response
                properties:
                  success:
                    type: boolean
                    description: >-
                      Indicates whether this is success response or error
                      response
                  message:
                    type: string
                    description: Overall message regarding the operation performed
                  data:
                    type: object
                    description: Data returned from the server
                    nullable: true
        '400':
          description: Bad Request
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Invalid Request Body:
                  value:
                    success: false
                    message: Failed to create the chatbot
                    data: null
                    error:
                      code: REQUEST_VALIDATION_FAILED
                      message: Request body is not valid
                      details:
                        - path:
                            - chatbotName
                          message: Required
        '401':
          description: Unauthorized
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Authentication Error:
                  value:
                    success: false
                    message: Failed to create the chatbot
                    data: null
                    error:
                      code: API_KEY_NOT_VALID
                      message: Authorization header does not contain valid API key
                      details: null
        '405':
          description: Method Not Allowed
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Method Not Allowed Error:
                  value:
                    success: false
                    message: Failed to create the chatbot
                    data: null
                    error:
                      code: REQUEST_METHOD_NOT_ALLOWED
                      message: POST request method is not allowed
                      details: null
        '500':
          description: Internal Server Error
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Server Error:
                  value:
                    success: false
                    message: Failed to create the chatbot
                    data: null
                    error:
                      code: CREATE_CHATBOT_FAILED
                      message: Some technical error has occurred !!
                      details: null
                Chatbots Limit Reached Error:
                  value:
                    success: false
                    message: Failed to create the chatbot
                    data: null
                    error:
                      code: CHATBOT_LIMIT_REACHED
                      message: You have already reached your chatbots limit
      operationId: create-chatbot
  /v0/chatbots/{chatbotId}:
    get:
      tags:
        - Chatbot
      summary: Fetch Chatbot
      parameters:
        - name: chatbotId
          description: Id of the chatbot
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                type: object
                description: Success Response
                properties:
                  success:
                    type: boolean
                    description: >-
                      Indicates whether this is success response or error
                      response
                  message:
                    type: string
                    description: Overall message regarding the operation performed
                  data:
                    type: object
                    description: Data returned from the server
                    properties:
                      chatbot:
                        $ref: '#/components/schemas/Chatbot'
              examples:
                Success:
                  value:
                    success: true
                    message: Fetched the chatbot successfully
                    data:
                      chatbot:
                        id: '365062873485935184'
                        title: My Bot
                        description: This is a test chatbot
                        createdById: '360596271623307865'
                        createdByEmail: saidheeraj.kumar04@gmail.com
                        suggestions:
                          - id: 538aa9ca-ef69-4a1a-a6a2-ba1f62f05c43
                            title: Contact us
                            description: How to contact you?
                            link: https://sitegpt.ai/contact-us
                          - id: 40ffc3fe-9d74-439c-bfec-8b0d69a94836
                            title: Yo
                            description: Hey what's up?
                        nextSuggestions:
                          - id: dd6480d7-33da-4943-a5f5-24d7593ec62e
                            title: Elaborate
                            link: ''
                            description: Explain this in layman language
                            isEscalationPrompt: false
                        prompts:
                          - id: 042686d9-b695-4dc5-aa11-58706284d45e
                            title: Random
                            description: Random prompt
                            instructions: You should provide random information
                            temperature: 0.9
                          - id: 78ac8ecd-d889-4700-8c8c-162c92731ff9
                            title: Factual
                            description: Factual Prompt
                            instructions: You should provide only facts
                            temperature: 0.1
                        settings:
                          mode: AGENT
                          tooltip: Want to know anything about the porduct?
                          welcomeMessage: Hello! How can I assist you today?
                          placeholderText: Ask me anything...
                          brandColor: '#2563eb'
                          hideSources: false
                          hideTooltip: false
                          hideWatermark: false
                          watermarkText: Powered by SiteGPT
                          watermarkIconSrcId: ''
                          watermarkLink: https://sitegpt.ai
                          distanceFromBottom: 16
                          horizontalDistance: 16
                          fontSize: 14
                          iconSize: SMALL
                          iconPosition: RIGHT
                          height: 85
                          ctaLink: ''
                          ctaText: ''
                          iconSrcId: ''
                          personIconSrcId: ''
                          brandTextColor: '#FFFFFF'
                          hideFeedbackButtons: false
                          rtl: false
                          agentIconSrcId: ''
                          bubbleIconSrcId: ''
                          localization:
                            learnMore: Learn more
                            chatHome:
                              home: Home
                              addDetails: Add details
                              startConversation: Start a conversation
                              starting: Starting...
                            chatMessages:
                              messages: Messages
                              noMessages: No Messages
                              loginToSeeHistory: >-
                                Verify your email to save your conversation
                                history.
                              historyShowsUpHere: Your conversation history shows up here.
                              verifyEmail: Verify your email
                              startConversation: Start a conversation
                              starting: Starting...
                            chatMessage:
                              botName: Bot
                              yourName: You
                              agentName: Agent
                              escalationHeading: >-
                                Are you sure you want to escalate the chat to
                                human support?
                              escalationSubHeading: >-
                                This conversation will be shared with the human
                                support and they will get back to you as soon as
                                they can.
                              yesContinue: Yes, continue
                              cancel: Cancel
                              conversationEscalated: 👨‍💼 Conversation changed to human mode
                            chatAccount:
                              account: Account
                              verifyEmail: Verify your email
                              loginToSeeHistory: Verify your email to save your chat history.
                              emailLabel: Email
                              nameLabel: Name
                              phoneLabel: Phone Number
                              sendingOtp: Sending OTP...
                              verifyOtp: Verify OTP
                              sentOtpToEmail: We sent the OTP to your email address
                              otp: OTP
                              verifyAndContinue: Verify & Continue
                              notReceivedOtpYet: Didn't receive OTP yet?
                              resend: Resend
                              editDetails: Edit Details
                              resetting: Resetting...
                              verifying: Verifying...
                              logout: Logout
                              loggingOut: Logging out...
                              verified: Verified
                              edit: Edit
                              update: Update
                              updating: Updating...
                          systemPrompt: >-
                            You are a funny AI assistant and you answer the user
                            queries based on the website content. Include jokes
                            in your answer.
                          userPrompt: >-
                            You are an AI assistant who answers user questions
                            based on the website content. Answer the questions
                            in the same language as the language of the
                            question.
                          promptId: 78ac8ecd-d889-4700-8c8c-162c92731ff9
                          historyCount: 4
                          temperature: 1
                          topK: 3
                          gptModel: gpt-3.5-turbo
                          collectUserDetails: DO_NOT_COLLECT
                          collectUserData:
                            name: false
                            phone: false
                          creativity: conservative
                          webhookUrl: https://example.com
                          webhookToken: abc123
                          extraData: ''
                          metadata:
                            key1: value1
                        customContent: null
        '400':
          description: Bad Request
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Validation Error:
                  value:
                    success: false
                    message: Failed to fetch the chatbot
                    data: null
                    error:
                      code: CHATBOT_ID_REQUIRED
                      message: chatbotId is required
                      details: null
        '401':
          description: Unauthorized
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Authentication Error:
                  value:
                    success: false
                    message: Failed to fetch the chatbot
                    data: null
                    error:
                      code: API_KEY_NOT_VALID
                      message: Authorization header does not contain valid API key
                      details: null
        '403':
          description: Forbidden
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Forbidden Error:
                  value:
                    success: false
                    message: Failed to fetch the chatbot
                    data: null
                    error:
                      code: CHATBOT_FETCH_FORBIDDEN
                      message: You are not authorized to fetch this chatbot
                      details: null
        '405':
          description: Method Not Allowed
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Method Not Allowed Error:
                  value:
                    success: false
                    message: Failed to fetch the chatbot
                    data: null
                    error:
                      code: REQUEST_METHOD_NOT_ALLOWED
                      message: POST request method is not allowed
                      details: null
        '500':
          description: Internal Server Error
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Server Error:
                  value:
                    success: false
                    message: Failed to fetch the chatbot
                    data: null
                    error:
                      code: FETCH_CHATBOT_FAILED
                      message: Some technical error has occurred !!
                      details: null
      operationId: fetch-chatbot
      description: Fetch a particular chatbot
    delete:
      tags:
        - Chatbot
      summary: Delete Chatbot
      parameters:
        - name: chatbotId
          description: Id of the chatbot
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                type: object
                description: Success Response
                properties:
                  success:
                    type: boolean
                    description: >-
                      Indicates whether this is success response or error
                      response
                  message:
                    type: string
                    description: Overall message regarding the operation performed
                  data:
                    type: object
                    description: Data returned from the server
                    nullable: true
              examples:
                Success:
                  value:
                    success: true
                    message: Deleted the chatbot successfully
                    data: null
        '400':
          description: Bad Request
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Validation Error:
                  value:
                    success: false
                    message: Failed to delete the chatbot
                    data: null
                    error:
                      code: CHATBOT_ID_REQUIRED
                      message: chatbotId is required
                      details: null
        '401':
          description: Unauthorized
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Authentication Error:
                  value:
                    success: false
                    message: Failed to delete the chatbot
                    data: null
                    error:
                      code: API_KEY_NOT_VALID
                      message: Authorization header does not contain valid API key
                      details: null
        '403':
          description: Forbidden
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Forbidden Error:
                  value:
                    success: false
                    message: Failed to delete the chatbot
                    data: null
                    error:
                      code: CHATBOT_DELETE_FORBIDDEN
                      message: You are not authorized to delete this chatbot
                      details: null
        '405':
          description: Method Not Allowed
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Method Not Allowed Error:
                  value:
                    success: false
                    message: Failed to update the chatbot
                    data: null
                    error:
                      code: REQUEST_METHOD_NOT_ALLOWED
                      message: POST request method is not allowed
                      details: null
        '500':
          description: Internal Server Error
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Server Error:
                  value:
                    success: false
                    message: Failed to delete the chatbot
                    data: null
                    error:
                      code: CHATBOT_DELETE_FAILED
                      message: Some technical error has occurred !!
                      details: null
      operationId: delete-chatbot
      description: Delete the chatbot
  /v0/chatbots/{chatbotId}/appearance:
    patch:
      summary: Update Chatbot Appearance
      requestBody:
        content:
          application/json:
            schema:
              type: object
              description: Request Body
              properties:
                title:
                  type: string
                  description: Title of the chatbot
                welcomeMessage:
                  type: string
                  description: The first message that the users will see in the chatbot
                placeholderText:
                  type: string
                  description: >-
                    Placeholder text that users see before they type their
                    question in the chat
                brandColor:
                  type: string
                  description: Primary color of the chatbot
                brandTextColor:
                  type: string
                  description: Primary text color of the chatbot
                fontSize:
                  type: integer
                  description: Font size of the text shown in chatbot (in px)
                height:
                  type: number
                  description: Height of the chatbot
                learnMore:
                  type: string
                  description: Learn More localization setting of the chatbot
                ctaText:
                  type: string
                  description: Call to Action text
                ctaLink:
                  type: string
                  description: Call to Action link
                watermarkText:
                  type: string
                  description: Text to be shown as the watermark in the chatbot
                watermarkLink:
                  type: string
                  description: Url of the watermark to be shown in the chatbot
                autoOpenChatWindowInDesktop:
                  enum:
                    - ALWAYS_OPEN_WITH_DELAY
                    - DONT_OPEN
                  description: Option to handle behaviour auto open chat window in desktop
                autoOpenChatWindowDelayInDesktop:
                  type: integer
                  description: >-
                    Delay after which the chat window will shown in desktop when
                    autoOpenChatWindowInDesktop is set to AUTO_OPEN_WITH_DELAY
                autoOpenChatWindowInMobile:
                  enum:
                    - ALWAYS_OPEN_WITH_DELAY
                    - DONT_OPEN
                  description: Option to handle behaviour auto open chat window in mobile
                autoOpenChatWindowDelayInMobile:
                  type: integer
                  description: >-
                    Delay after which the chat window will shown in mobile when
                    autoOpenChatWindowInMobile is set to AUTO_OPEN_WITH_DELAY
                hideWatermark:
                  type: boolean
                  description: >-
                    Indicates whether the watermark is shown in the chatbot or
                    not
                hideSources:
                  type: boolean
                  description: Indicates whether to display sources or not in the chatbot
                hideTooltip:
                  type: boolean
                  description: Indicates whether to hide tooltip or not in the chatbot
                hideFeedbackButtons:
                  type: boolean
                  description: >-
                    Indicates whether to hide feedback buttons (for each reply)
                    or not in the chatbot
                rtl:
                  type: boolean
                  description: >-
                    Indicates whether to display the text in the chatbot right
                    to left or opposite
                distanceFromBottom:
                  type: integer
                  description: >-
                    Distance from bottom (in px) where the chatbot icon should
                    be shown
                horizontalDistance:
                  type: integer
                  description: >-
                    Horizantal distance (in px) where the chatbot icon should be
                    shown
                iconSize:
                  $ref: '#/components/schemas/ChatbotIconSize'
                iconPosition:
                  $ref: '#/components/schemas/ChatbotIconPosition'
            examples:
              Request Body:
                value:
                  title: My Bot
                  welcomeMessage: Hello! How can I assist you today?
                  placeholderText: Ask me anything...
                  brandColor: '#2563eb'
                  brandTextColor: '#FFFFFF'
                  fontSize: 14
                  height: 85
                  learnMore: Learn more
                  ctaText: ''
                  ctaLink: ''
                  watermarkText: Powered by SiteGPT
                  watermarkLink: https://sitegpt.ai
                  hideWatermark: false
                  hideSources: false
                  hideTooltip: false
                  hideFeedbackButtons: false
                  rtl: false
                  distanceFromBottom: 16
                  horizontalDistance: 16
                  iconSize: SMALL
                  iconPosition: RIGHT
        description: Request body to update appearance of the chatbot
      parameters:
        - name: chatbotId
          description: Id of the chatbot
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                type: object
                description: Success Response
                properties:
                  success:
                    type: boolean
                    description: >-
                      Indicates whether this is success response or error
                      response
                  message:
                    type: string
                    description: Overall message regarding the operation performed
                  data:
                    type: object
                    description: Data returned from the server
                    nullable: true
              examples:
                Success:
                  value:
                    success: true
                    message: Updated the chatbot  appearance successfully
                    data: {}
        '400':
          description: Bad Request
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Validation Error:
                  value:
                    success: false
                    message: Failed to update the chatbot appearance
                    data: null
                    error:
                      code: CHATBOT_ID_REQUIRED
                      message: chatbotId is required
                      details: null
                Invalid Request Body:
                  value:
                    success: false
                    message: Failed to update the chatbot appearance
                    data: null
                    error:
                      code: REQUEST_VALIDATION_FAILED
                      message: Request body is not valid
                      details:
                        - path:
                            - title
                          message: Expected string, received number
        '401':
          description: Unauthorized
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Authentication Error:
                  value:
                    success: false
                    message: Failed to update the chatbot appearance
                    data: null
                    error:
                      code: API_KEY_NOT_VALID
                      message: Authorization header does not contain valid API key
                      details: null
        '403':
          description: Forbidden
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Forbidden Error:
                  value:
                    success: false
                    message: Failed to update the chatbot appearance
                    data: null
                    error:
                      code: CHATBOT_APPEARANCE_UPDATE_FORBIDDEN
                      message: >-
                        You are not authorized to update appearance of this
                        chatbot
                      details: null
        '405':
          description: Method Not Allowed
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Method Not Allowed Error:
                  value:
                    success: false
                    message: Failed to update the chatbot appearance
                    data: null
                    error:
                      code: REQUEST_METHOD_NOT_ALLOWED
                      message: PATCH request method is not allowed
                      details: null
        '500':
          description: Internal Server Error
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Server Error:
                  value:
                    success: false
                    message: Failed to update the chatbot appearance
                    data: null
                    error:
                      code: CHATBOT_APPEARANCE_UPDATE_FAILED
                      message: Some technical error has occurred !!
                      details: null
      operationId: update-chatbot-appearance
      description: Update appearance of the chatbot
      tags:
        - Chatbot Appearance
  /v0/chatbots/{chatbotId}/custom-content:
    parameters:
      - schema:
          type: string
        name: chatbotId
        description: Id of the chatbot
        in: path
        required: true
    post:
      summary: Modify Chatbot Custom Content
      operationId: modify-chatbot-custom-content
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                type: object
                description: Success Response
                properties:
                  success:
                    type: boolean
                    description: >-
                      Indicates whether this is success response or error
                      response
                  message:
                    type: string
                    description: Overall message regarding the operation performed
                  data:
                    type: object
                    description: Data returned from the server
                    nullable: true
              examples:
                Success:
                  value:
                    success: true
                    message: Modified custom content of the chatbot successfully
                    data: {}
        '400':
          description: Bad Request
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Validation Error:
                  value:
                    success: false
                    message: Failed to modify custom content of the chatbot
                    data: null
                    error:
                      code: CHATBOT_ID_REQUIRED
                      message: chatbotId is required
                      details: null
                Invalid Request Body:
                  value:
                    success: false
                    message: Failed to modify custom content of the chatbot
                    data: null
                    error:
                      code: REQUEST_VALIDATION_FAILED
                      message: Request body is not valid
                      details:
                        - path:
                            - text
                          message: Required
        '401':
          description: Unauthorized
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Authentication Error:
                  value:
                    success: false
                    message: Failed to modify custom content of the chatbot
                    data: null
                    error:
                      code: API_KEY_NOT_VALID
                      message: Authorization header does not contain valid API key
                      details: null
        '403':
          description: Forbidden
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Forbidden Error:
                  value:
                    success: false
                    message: Failed to modify custom content of the chatbot
                    data: null
                    error:
                      code: CHATBOT_CUSTOM_CONTENT_MODIFY_FORBIDDEN
                      message: >-
                        You are not authorized to modify custom content of this
                        chatbot
                      details: null
        '405':
          description: Method Not Allowed
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Method Not Allowed Error:
                  value:
                    success: false
                    message: Failed to modify custom content of the chatbot
                    data: null
                    error:
                      code: REQUEST_METHOD_NOT_ALLOWED
                      message: PATCH request method is not allowed
                      details: null
        '500':
          description: Internal Server Error
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Server Error:
                  value:
                    success: false
                    message: Failed to modify custom content of the chatbot
                    data: null
                    error:
                      code: CHATBOT_CUSTOM_CONTENT_MODIFY_FAILED
                      message: Some technical error has occurred !!
                      details: null
      description: Modify (Add/Update) custom content of the chatbot
      requestBody:
        content:
          application/json:
            schema:
              type: object
              description: Request Body
              properties:
                text:
                  type: string
                  description: Custom content that you want to provide to the chatbot
            examples:
              Request Body:
                value:
                  text: Sample custom content for the chatbot
        description: Request body to modify (add/update) custom content of the chatbot
      tags:
        - Chatbot Custom Content
  /v0/chatbots/{chatbotId}/follow-up-prompts:
    get:
      summary: Fetch All Follow Up Prompts
      parameters:
        - name: chatbotId
          description: Id of the chatbot
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                type: object
                description: Success Response
                properties:
                  success:
                    type: boolean
                    description: >-
                      Indicates whether this is success response or error
                      response
                  message:
                    type: string
                    description: Overall message regarding the operation performed
                  data:
                    type: object
                    description: Data returned from the server
                    properties:
                      followUpPrompts:
                        type: array
                        items:
                          $ref: '#/components/schemas/FollowUpPrompt'
              examples:
                Success:
                  value:
                    success: true
                    message: Fetched follow-up prompts of the chatbot successfully
                    data:
                      followUpPrompts:
                        - id: 538aa9ca-ef69-4a1a-a6a2-ba1f62f05c43
                          title: Contact us
                          description: How to contact you?
                          isEscalationPrompt: false
                        - id: 40ffc3fe-9d74-439c-bfec-8b0d69a94836
                          title: Yo
                          description: Hey what's up?
                          isEscalationPrompt: false
        '400':
          description: Bad Request
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Validation Error:
                  value:
                    success: false
                    message: Failed to fetch follow-up prompts of the chatbot
                    data: null
                    error:
                      code: CHATBOT_ID_REQUIRED
                      message: chatbotId is required
                      details: null
                Invalid Request Body:
                  value:
                    success: false
                    message: Failed to add follow-up prompt of the chatbot
                    data: null
                    error:
                      code: REQUEST_VALIDATION_FAILED
                      message: Request body is not valid
                      details:
                        - path:
                            - description
                          message: Required
        '401':
          description: Unauthorized
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Authentication Error:
                  value:
                    success: false
                    message: Failed to fetch follow-up prompts of the chatbot
                    data: null
                    error:
                      code: API_KEY_NOT_VALID
                      message: Authorization header does not contain valid API key
                      details: null
        '403':
          description: Forbidden
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Forbidden Error:
                  value:
                    success: false
                    message: Failed to fetch follow-up prompts of the chatbot
                    data: null
                    error:
                      code: CHATBOT_FETCH_FOLLOW_UP_PROMPTS_FORBIDDEN
                      message: >-
                        You are not authorized to fetch follow-up prompts of
                        this chatbot
                      details: null
        '405':
          description: Method Not Allowed
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Method Not Allowed Error:
                  value:
                    success: false
                    message: Failed to fetch follow-up prompts of the chatbot
                    data: null
                    error:
                      code: REQUEST_METHOD_NOT_ALLOWED
                      message: PATCH request method is not allowed
                      details: null
        '500':
          description: Internal Server Error
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Server Error:
                  value:
                    success: false
                    message: Failed to fetch follow-up prompts of the chatbot
                    data: null
                    error:
                      code: CHATBOT_FETCH_FOLLOW_UP_PROMPTS_FAILED
                      message: Some technical error has occurred !!
                      details: null
      description: Fetch all the follow up prompts of a particular chatbot
      tags:
        - Chatbot Follow Up Prompts
      operationId: fetch-all-follow-up-prompts
    post:
      summary: Add Follow Up Prompt
      requestBody:
        content:
          application/json:
            schema:
              type: object
              description: Request Body
              properties:
                title:
                  type: string
                  description: >-
                    Title of the follow-up-prompt. This is the text that is
                    shown as button in the chatbot.
                link:
                  type: string
                  description: >-
                    Link of the follow-up prompt. If this link is added, then
                    when you click on the follow-up prompt in the chatbot, this
                    link will be opened instead of sending a message to the
                    chatbot.
                  nullable: true
                description:
                  type: string
                  description: >-
                    Description of the follow-up-prompt. This is the message
                    that will be sent to the chatbot when you click on the
                    follow-up-prompt inside the chatbot.
                isEscalationPrompt:
                  type: boolean
                  description: >-
                    Indicates whether the follow-up prompt is an escalation
                    prompt or not. Default value is false.
              required:
                - title
                - description
            examples:
              Request Body:
                value:
                  title: Yo
                  link: ''
                  description: Hey what's up?
                  isEscalationPrompt: false
        description: Request body to add a follow-up prompt
      parameters:
        - name: chatbotId
          description: Id of the chatbot
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: >-
                      Indicates whether this is success response or error
                      response
                  message:
                    type: string
                    description: Overall message regarding the operation performed
                  data:
                    type: object
                    description: Data returned from the server
              examples:
                Success:
                  value:
                    success: true
                    message: Added follow-up prompt to the chatbot successfully
                    data: {}
        '400':
          description: Bad Request
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Validation Error:
                  value:
                    success: false
                    message: Failed to add follow-up prompt to the chatbot
                    data: null
                    error:
                      code: CHATBOT_ID_REQUIRED
                      message: chatbotId is required
                      details: null
        '401':
          description: Unauthorized
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Authentication Error:
                  value:
                    success: false
                    message: Failed to add follow-up prompt to the chatbot
                    data: null
                    error:
                      code: API_KEY_NOT_VALID
                      message: Authorization header does not contain valid API key
                      details: null
        '403':
          description: Forbidden
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Forbidden Error:
                  value:
                    success: false
                    message: Failed to add follow-up prompt to the chatbot
                    data: null
                    error:
                      code: CHATBOT_ADD_FOLLOW_UP_PROMPT_FORBIDDEN
                      message: >-
                        You are not authorized to add follow-up prompt to this
                        chatbot
                      details: null
        '405':
          description: Method Not Allowed
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Method Not Allowed Error:
                  value:
                    success: false
                    message: Failed to add follow-up prompt to the chatbot
                    data: null
                    error:
                      code: REQUEST_METHOD_NOT_ALLOWED
                      message: PATCH request method is not allowed
                      details: null
        '500':
          description: Internal Server Error
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Server Error:
                  value:
                    success: false
                    message: Failed to add follow-up prompt to the chatbot
                    data: null
                    error:
                      code: CHATBOT_ADD_FOLLOW_UP_PROMPT_FAILED
                      message: Some technical error has occurred !!
                      details: null
      tags:
        - Chatbot Follow Up Prompts
      description: Add a new follow-up prompt to a particular chatbot
      operationId: add-follow-up-prompt
    parameters:
      - schema:
          type: string
        name: chatbotId
        in: path
        required: true
        description: Your Chatbot ID
  /v0/chatbots/{chatbotId}/follow-up-prompts/{followUpPromptId}:
    get:
      tags:
        - Chatbot Follow Up Prompts
      summary: Fetch Follow Up Prompt
      parameters:
        - name: chatbotId
          description: Id of the chatbot
          in: path
          schema:
            type: string
          required: true
        - name: followUpPromptId
          description: Id of the follow-up promptId
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                type: object
                description: Success Response
                properties:
                  success:
                    type: boolean
                    description: >-
                      Indicates whether this is success response or error
                      response
                  message:
                    type: string
                    description: Overall message regarding the operation performed
                  data:
                    $ref: '#/components/schemas/FollowUpPrompt'
              examples:
                Success:
                  value:
                    success: true
                    message: Fetched follow-up prompt of the chatbot successfully
                    data:
                      id: fd0bfc2d-2ea6-41dc-afb9-7a3ea7b2b729
                      title: Test Bot
                      description: This is a test chatbot
                      isEscalationPrompt: false
        '400':
          description: Bad Request
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Validation Error:
                  value:
                    success: false
                    message: Failed to fetch follow-up prompt of the chatbot
                    data: null
                    error:
                      code: FOLLOW_UP_PROMPT_ID_REQUIRED
                      message: followUpPromptId is required
                      details: null
        '401':
          description: Unauthorized
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Authentication Error:
                  value:
                    success: false
                    message: Failed to fetch follow-up prompt of the chatbot
                    data: null
                    error:
                      code: API_KEY_NOT_VALID
                      message: Authorization header does not contain valid API key
                      details: null
        '403':
          description: Forbidden
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Forbidden Error:
                  value:
                    success: false
                    message: Failed to fetch follow-up prompt of the chatbot
                    data: null
                    error:
                      code: CHATBOT_FETCH_FOLLOW_UP_PROMPT_FORBIDDEN
                      message: >-
                        You are not authorized to fetch follow-up prompt of this
                        chatbot
                      details: null
        '404':
          description: Not Found
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Not Found Error:
                  value:
                    success: false
                    message: Failed to fetch follow-up prompt of the chatbot
                    data: null
                    error:
                      code: CHATBOT_FOLLOW_UP_PROMPT_NOT_FOUND
                      message: Required follow-up prompt does not exist in this chatbot
                      details: null
        '405':
          description: Method Not Allowed
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Method Not Allowed Error:
                  value:
                    success: false
                    message: Failed to fetch follow-up prompt of the chatbot
                    data: null
                    error:
                      code: REQUEST_METHOD_NOT_ALLOWED
                      message: POST request method is not allowed
                      details: null
        '500':
          description: Internal Server Error
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Server Error:
                  value:
                    success: false
                    message: Failed to fetch follow-up prompt of the chatbot
                    data: null
                    error:
                      code: CHATBOT_FETCH_FOLLOW_UP_PROMPT_FAILED
                      message: Some technical error has occurred !!
                      details: null
      description: Fetch follow-up prompt of the chatbot
      operationId: fetch-follow-up-prompt
    patch:
      summary: Update Follow Up Prompt
      requestBody:
        content:
          application/json:
            schema:
              type: object
              description: Request Body
              properties:
                title:
                  type: string
                  description: >-
                    Title of the follow-up-prompt. This is the text that is
                    shown as button in the chatbot.
                link:
                  type: string
                  description: >-
                    Link of the follow-up prompt. If this link is added, then
                    when you click on the follow-up prompt in the chatbot, this
                    link will be opened instead of sending a message to the
                    chatbot.
                  nullable: true
                description:
                  type: string
                  description: >-
                    Description of the follow-up-prompt. This is the message
                    that will be sent to the chatbot when you click on the
                    follow-up-prompt inside the chatbot.
                isEscalationPrompt:
                  type: boolean
                  description: >-
                    Indicates whether the follow-up prompt is an escalation
                    prompt or not
            examples:
              Request Body:
                value:
                  title: conversation starter title
                  link: ''
                  description: conversation starter description
                  isEscalationPrompt: true
        description: Request body to update the follow-up prompt
      parameters:
        - name: chatbotId
          description: Id of the chatbot
          in: path
          schema:
            type: string
          required: true
        - name: followUpPromptId
          description: Id of the follow-up promptId
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                type: object
                description: Success Response
                properties:
                  success:
                    type: boolean
                    description: >-
                      Indicates whether this is success response or error
                      response
                  message:
                    type: string
                    description: Overall message regarding the operation performed
                  data:
                    type: object
                    description: Data returned from the server
              examples:
                Success:
                  value:
                    success: true
                    message: Updated follow-up prompt of the chatbot successfully
                    data: {}
        '400':
          description: Bad Request
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Validation Error:
                  value:
                    success: false
                    message: Failed to update follow-up prompt of the chatbot
                    data: null
                    error:
                      code: FOLLOW_UP_PROMPT_ID_REQUIRED
                      message: followUpPromptId is required
                      details: null
                Invalid Request Body:
                  value:
                    success: false
                    message: Failed to update follow-up prompt of the chatbot
                    data: null
                    error:
                      code: REQUEST_VALIDATION_FAILED
                      message: Request body is not valid
                      details:
                        - path:
                            - title
                          message: Expected string, received number
        '401':
          description: Unauthorized
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Authentication Error:
                  value:
                    success: false
                    message: Failed to update follow-up prompt of the chatbot
                    data: null
                    error:
                      code: API_KEY_NOT_VALID
                      message: Authorization header does not contain valid API key
                      details: null
        '403':
          description: Forbidden
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Forbidden Error:
                  value:
                    success: false
                    message: Failed to update follow-up prompt of the chatbot
                    data: null
                    error:
                      code: CHATBOT_UPDATE_FOLLOW_UP_PROMPT_FORBIDDEN
                      message: followUpPromptId is required
                      details: null
        '404':
          description: Not Found
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Not Found Error:
                  value:
                    success: false
                    message: Failed to update conversation starter of the chatbot
                    data: null
                    error:
                      code: CHATBOT_FOLLOW_UP_PROMPT_NOT_FOUND
                      message: Required follow-up prompt does not exist in this chatbot
                      details: null
        '405':
          description: Method Not Allowed
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Method Not Allowed Error:
                  value:
                    success: false
                    message: Failed to update conversation starter of the chatbot
                    data: null
                    error:
                      code: REQUEST_METHOD_NOT_ALLOWED
                      message: request method is not allowed
                      details: null
        '500':
          description: Internal Server Error
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Server Error:
                  value:
                    success: false
                    message: Failed to update follow-up prompt of the chatbot
                    data: null
                    error:
                      code: CHATBOT_UPDATE_QUICK_PROMPT_FAILED
                      message: Some technical error has occurred !!
                      details: null
      tags:
        - Chatbot Follow Up Prompts
      description: Update follow-up prompt of the chatbot
      operationId: update-follow-up-prompt
    delete:
      summary: Delete Follow Up Prompt
      parameters:
        - name: chatbotId
          description: Id of the chatbot
          in: path
          schema:
            type: string
          required: true
        - name: followUpPromptId
          description: Id of the follow-up promptId
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
          content:
            application/json:
              schema:
                type: object
                description: Success Response
                properties:
                  success:
                    type: boolean
                    description: >-
                      Indicates whether this is success response or error
                      response
                  message:
                    type: string
                    description: Overall message regarding the operation performed
                  data:
                    type: object
                    description: Data returned from the server
                    nullable: true
              examples:
                Success:
                  value:
                    success: true
                    message: Deleted follow-up prompt of the chatbot successfully
                    data: null
        '400':
          description: Bad Request
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Validation Error:
                  value:
                    success: false
                    message: Failed to delete conversation starter of the chatbot
                    data: null
                    error:
                      code: FOLLOW_UP_PROMPT_ID_REQUIRED
                      message: followUppromptId is required
                      details: null
        '401':
          description: Unauthorized
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Authentication Error:
                  value:
                    success: false
                    message: Failed to delete follow-up prompt of the chatbot
                    data: null
                    error:
                      code: API_KEY_NOT_VALID
                      message: Authorization header does not contain valid API key
                      details: null
        '403':
          description: Forbidden
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Forbidden Error:
                  value:
                    success: false
                    message: Failed to delete follow-up prompt of the chatbot
                    data: null
                    error:
                      code: CHATBOT_DELETE_FOLLOW_UP_PROMPT_FORBIDDEN
                      message: >-
                        You are not authorized to delete follow-up prompt of
                        this chatbot
                      details: null
        '404':
          description: Not Found
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Not Found Error:
                  value:
                    success: false
                    message: Failed to delete follow-up prompt of the chatbot
                    data: null
                    error:
                      code: CHATBOT_PROMPT_NOT_FOUND
                      message: Required follow-up prompt does not exist in this chatbot
                      details: null
        '405':
          description: Method Not Allowed
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Method Not Allowed Error:
                  value:
                    success: false
                    message: Failed to delete follow-up prompt of the chatbot
                    data: null
                    error:
                      code: REQUEST_METHOD_NOT_ALLOWED
                      message: request method is not allowed
                      details: null
        '500':
          description: Internal Server Error
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Server Error:
                  value:
                    success: false
                    message: Failed to delete follow-up prompt of the chatbot
                    data: null
                    error:
                      code: CHATBOT_DELETE_FOLLOW_UP_PROMPT_FAILED
                      message: Some technical error has occurred !!
                      details: null
      tags:
        - Chatbot Follow Up Prompts
      description: Delete follow-up prompt of the chatbot
      operationId: delete-follow-up-prompt
    parameters:
      - schema:
          type: string
        name: chatbotId
        in: path
        required: true
        description: Your Chatbot Id
      - schema:
          type: string
        name: followUpPromptId
        in: path
        required: true
        description: Your Follow Up Prompt Id
  /v0/chatbots/{chatbotId}/icons:
    parameters:
      - schema:
          type: string
        name: chatbotId
        in: path
        required: true
        description: Id of the chatbot
    post:
      tags:
        - Chatbot Icons
      summary: Update Chatbot Icons
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              description: Request Body
              properties:
                iconType:
                  example: CHAT_BUBBLE
                  description: Type of the icon
                  enum:
                    - BOT
                    - PERSON
                    - AGENT
                    - WATERMARK
                    - CHAT_BUBBLE
                iconSrc:
                  type: string
                  format: binary
                  description: Icon file
              required:
                - iconType
                - iconSrc
        description: Request body to add/update the chatbot icons
      parameters:
        - name: chatbotId
          description: Id of the chatbot
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                type: object
                description: Success Response
                properties:
                  success:
                    type: boolean
                    description: >-
                      Indicates whether this is success response or error
                      response
                  message:
                    type: string
                    description: Overall message regarding the operation performed
                  data:
                    type: object
                    description: Data returned from the server
                    nullable: true
              examples:
                Success:
                  value:
                    success: true
                    message: Updated the chatbot icon successfully
                    data: null
        '400':
          description: Bad Request
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Validation Error:
                  value:
                    success: false
                    message: Failed to update the chatbot icon
                    data: null
                    error:
                      code: CHATBOT_ID_REQUIRED
                      message: chatbotId is required
                      details: null
        '401':
          description: Unauthorized
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Authentication Error:
                  value:
                    success: false
                    message: Failed to update the chatbot icon
                    data: null
                    error:
                      code: API_KEY_NOT_VALID
                      message: Authorization header does not contain valid API key
                      details: null
        '403':
          description: Forbidden
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Forbidden Error:
                  value:
                    success: false
                    message: Failed to update the chatbot icon
                    data: null
                    error:
                      code: CHATBOT_ICONS_UPDATE_DELETE_FORBIDDEN
                      message: You are not authorized to add links to this chatbot
                      details: null
        '405':
          description: Method Not Allowed
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Method Not Allowed Error:
                  value:
                    success: false
                    message: Failed to update the chatbot icon
                    data: null
                    error:
                      code: REQUEST_METHOD_NOT_ALLOWED
                      message: PATCH request method is not allowed
                      details: null
        '500':
          description: Internal Server Error
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Server Error:
                  value:
                    success: false
                    message: Failed to update the chatbot icon
                    data: null
                    error:
                      code: CHATBOT_ICON_UPDATE_FAILED
                      message: Some technical error has occurred !!
                      details: null
      operationId: add-update-chatbot-icons
      description: >-
        Add or Update the chatbot icons (Bot Icon, Person Icon, Agent Icon,
        Watermark Icon, Chat Bubble Icon)
    delete:
      tags:
        - Chatbot Icons
      summary: Delete Chatbot Icons
      parameters:
        - name: chatbotId
          description: Id of the chatbot
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                description: Success Response
                properties:
                  success:
                    type: boolean
                    description: >-
                      Indicates whether this is success response or error
                      response
                  message:
                    type: string
                    description: Overall message regarding the operation performed
                  data:
                    type: object
                    description: Data returned from the server
                    nullable: true
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
        '400':
          description: Bad Request
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Validation Error:
                  value:
                    success: false
                    message: Failed to delete the chatbot icon
                    data: null
                    error:
                      code: CHATBOT_ID_REQUIRED
                      message: chatbotId is required
                      details: null
        '401':
          description: Unauthorized
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Authentication Error:
                  value:
                    success: false
                    message: Failed to delete the chatbot icon
                    data: null
                    error:
                      code: API_KEY_NOT_VALID
                      message: Authorization header does not contain valid API key
                      details: null
        '403':
          description: Forbidden
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Forbidden Error:
                  value:
                    success: false
                    message: Failed to delete the chatbot icon
                    data: null
                    error:
                      code: CHATBOT_ICONS_UPDATE_DELETE_FORBIDDEN
                      message: You are not authorized to add links to this chatbot
                      details: null
        '405':
          description: Method Not Allowed
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Method Not Allowed Error:
                  value:
                    success: false
                    message: Failed to delete the chatbot icon
                    data: null
                    error:
                      code: REQUEST_METHOD_NOT_ALLOWED
                      message: PATCH request method is not allowed
                      details: null
        '500':
          description: Internal Server Error
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Server Error:
                  value:
                    success: false
                    message: Failed to delete the chatbot icon
                    data: null
                    error:
                      code: CHATBOT_ICON_DELETE_FAILED
                      message: Some technical error has occurred !!
                      details: null
      description: Delete the chatbot icon
      operationId: delete-chatbot-icon
  /v0/chatbots/{chatbotId}/links:
    post:
      tags:
        - Chatbot Links
      summary: Add Links to Chatbot (v0)
      deprecated: true
      description: >-
        **⚠️ DEPRECATED**: This endpoint is deprecated and will be sunset on
        June 1, 2026.


        Please migrate to the v1 API endpoint (`/v1/chatbots/{chatbotId}/links`)
        for:

        - Advanced features (website crawling, sitemaps, YouTube)

        - Better performance and reliability

        - More granular control over content ingestion


        ---


        Add a list of URLs to the chatbot. This is the simplified v0 endpoint
        for backward compatibility.


        **Note:** The `urlType` field is optional and deprecated. ZENDESK and
        GITBOOK source types are no longer supported.


        **Migration Guide**: See `/v1/chatbots/{chatbotId}/links` endpoint
        documentation.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              description: Request Body
              properties:
                links:
                  type: array
                  description: >-
                    List of URLs to be added to the chatbot (max 1000 per
                    request)
                  minItems: 1
                  maxItems: 1000
                  items:
                    type: object
                    properties:
                      url:
                        type: string
                        format: uri
                        description: URL to be added
                      urlType:
                        description: >-
                          (DEPRECATED) Type of the URL. This field is accepted
                          for backward compatibility but ignored. ZENDESK and
                          GITBOOK are no longer supported.
                        enum:
                          - WEB
                          - ZENDESK
                          - GITBOOK
                    required:
                      - url
              required:
                - links
            examples:
              Request Body:
                value:
                  links:
                    - url: https://sitegpt.ai
                    - url: https://sitegpt.ai/pricing
                    - url: https://sitegpt.ai/docs
        description: Request body to add links to the chatbot
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                type: object
                description: Success Response
                properties:
                  success:
                    type: boolean
                    description: >-
                      Indicates whether this is success response or error
                      response
                  message:
                    type: string
                    description: Overall message regarding the operation performed
                  data:
                    type: object
                    description: Data returned from the server
              examples:
                Success:
                  value:
                    success: true
                    message: Added links to the chatbot successfully
                    data: {}
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Validation Error:
                  value:
                    success: false
                    message: Failed to add links to the chatbot
                    data: null
                    error:
                      code: CHATBOT_ID_REQUIRED
                      message: chatbotId is required
                      details: null
                Invalid Request Body:
                  value:
                    success: false
                    message: Failed to add links to the chatbot
                    data: null
                    error:
                      code: REQUEST_VALIDATION_FAILED
                      message: Request body is not valid
                      details:
                        - path:
                            - links
                            - 4
                            - urlType
                          message: >-
                            Invalid enum value. Expected `WEB` | `ZENDESK` |
                            `GITBOOK`, received `WE`
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Authentication Error:
                  value:
                    success: false
                    message: Failed to add links to the chatbot
                    data: null
                    error:
                      code: API_KEY_NOT_VALID
                      message: Authorization header does not contain valid API key
                      details: null
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Forbidden Error:
                  value:
                    success: false
                    message: Failed to add links to the chatbot
                    data: null
                    error:
                      code: CHATBOT_ADD_LINKS_FORBIDDEN
                      message: You are not authorized to add links to this chatbot
                      details: null
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
        '404':
          description: Not Found
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Not Found Error:
                  value:
                    success: false
                    message: Failed to add links to the chatbot
                    data: null
                    error:
                      code: CHATBOT_OWNER_NOT_FOUND
                      message: Chatbot owner doesnot exist for the chatbot
                      details: null
        '405':
          description: Method Not Allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Method Not Allowed Error:
                  value:
                    success: false
                    message: Failed to add links to the chatbot
                    data: null
                    error:
                      code: REQUEST_METHOD_NOT_ALLOWED
                      message: PATCH request method is not allowed
                      details: null
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
        '429':
          description: Too Many Requests - Quota Exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Links Limit Reached Error:
                  value:
                    success: false
                    message: Failed to add links to the chatbot
                    data: null
                    error:
                      code: CHATBOT_LINKS_LIMIT_REACHED
                      message: >-
                        You have reached your pages quota limit. Cannot add more
                        links.
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Server Error:
                  value:
                    success: false
                    message: Failed to add links to the chatbot
                    data: null
                    error:
                      code: CHATBOT_ADD_LINKS_FAILED
                      message: Some technical error has occurred !!
                      details: null
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
      operationId: add-links-to-chatbot-v0
    parameters:
      - schema:
          type: string
        name: chatbotId
        in: path
        required: true
        description: Id of the chatbot
  /v1/chatbots/{chatbotId}/links:
    post:
      tags:
        - Chatbot Links
      summary: Add Content to Chatbot
      description: >-
        Unified endpoint to add content to a chatbot. Supports multiple source
        types:

        - **URLS_LIST**: Add a list of URLs directly

        - **WEBSITE**: Crawl a website with configurable depth and filters

        - **SITEMAP**: Extract URLs from an XML sitemap

        - **YOUTUBE**: Add YouTube video or channel transcripts


        This endpoint provides full control over crawling behavior, scraping
        options, and auto-sync configuration.
      requestBody:
        required: true
        description: Request body with source type and configuration
        content:
          application/json:
            schema:
              oneOf:
                - type: object
                  description: Add URLs from a list
                  required:
                    - sourceType
                    - config
                  properties:
                    sourceType:
                      type: string
                      enum:
                        - URLS_LIST
                    config:
                      type: object
                      required:
                        - urls
                      properties:
                        urls:
                          type: array
                          minItems: 1
                          maxItems: 1000
                          items:
                            type: string
                            format: uri
                          description: List of URLs to add (max 1000)
                    scrapeOptions:
                      $ref: '#/components/schemas/ScrapeOptions'
                    syncFrequency:
                      $ref: '#/components/schemas/SyncFrequency'
                - type: object
                  description: Crawl a website
                  required:
                    - sourceType
                    - config
                  properties:
                    sourceType:
                      type: string
                      enum:
                        - WEBSITE
                    config:
                      type: object
                      required:
                        - url
                        - maxLinks
                      properties:
                        url:
                          type: string
                          format: uri
                          description: Starting URL for the website crawl
                        recursionDepth:
                          type: integer
                          minimum: 1
                          maximum: 5
                          default: 3
                          description: How many levels deep to crawl (1-5)
                        maxLinks:
                          type: integer
                          minimum: 1
                          description: Maximum number of pages to scrape
                        includePaths:
                          type: array
                          items:
                            type: string
                          description: Only include URLs matching these path patterns
                        excludePaths:
                          type: array
                          items:
                            type: string
                          description: Exclude URLs matching these path patterns
                        allowedDomains:
                          type: array
                          items:
                            type: string
                          description: Allow crawling these additional domains
                    scrapeOptions:
                      $ref: '#/components/schemas/ScrapeOptions'
                    syncFrequency:
                      $ref: '#/components/schemas/SyncFrequency'
                - type: object
                  description: Extract URLs from a sitemap
                  required:
                    - sourceType
                    - config
                  properties:
                    sourceType:
                      type: string
                      enum:
                        - SITEMAP
                    config:
                      type: object
                      required:
                        - url
                        - maxLinks
                      properties:
                        url:
                          type: string
                          format: uri
                          description: URL of the XML sitemap
                        maxLinks:
                          type: integer
                          minimum: 1
                          description: Maximum number of URLs to extract from sitemap
                        includePaths:
                          type: array
                          items:
                            type: string
                          description: Only include URLs matching these path patterns
                        excludePaths:
                          type: array
                          items:
                            type: string
                          description: Exclude URLs matching these path patterns
                    scrapeOptions:
                      $ref: '#/components/schemas/ScrapeOptions'
                    syncFrequency:
                      $ref: '#/components/schemas/SyncFrequency'
                    scanFrequency:
                      $ref: '#/components/schemas/SyncFrequency'
                - type: object
                  description: Add YouTube video or channel
                  required:
                    - sourceType
                    - config
                  properties:
                    sourceType:
                      type: string
                      enum:
                        - YOUTUBE
                    config:
                      type: object
                      required:
                        - url
                      properties:
                        url:
                          type: string
                          format: uri
                          description: YouTube video or channel URL
                    syncFrequency:
                      $ref: '#/components/schemas/SyncFrequency'
            examples:
              URLS_LIST:
                value:
                  sourceType: URLS_LIST
                  config:
                    urls:
                      - https://sitegpt.ai
                      - https://sitegpt.ai/pricing
                      - https://sitegpt.ai/docs
              WEBSITE:
                value:
                  sourceType: WEBSITE
                  config:
                    url: https://sitegpt.ai
                    recursionDepth: 3
                    maxLinks: 100
                    includePaths:
                      - /docs
                      - /blog
                    excludePaths:
                      - /admin
                  syncFrequency: WEEKLY
              SITEMAP:
                value:
                  sourceType: SITEMAP
                  config:
                    url: https://sitegpt.ai/sitemap.xml
                    maxLinks: 500
                  syncFrequency: DAILY
                  scanFrequency: DAILY
              YOUTUBE:
                value:
                  sourceType: YOUTUBE
                  config:
                    url: https://youtube.com/watch?v=dQw4w9WgXcQ
                  syncFrequency: NEVER
      responses:
        '200':
          description: OK - Content added successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
                  data:
                    type: object
                    properties:
                      ingestJobId:
                        type: string
                        description: ID of the ingestion job created
                      documentsQueued:
                        type: integer
                        description: Number of documents queued for processing
              examples:
                Success:
                  value:
                    success: true
                    message: Added links to the chatbot successfully
                    data:
                      ingestJobId: job_abc123
                      documentsQueued: 5
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Validation Error:
                  value:
                    success: false
                    message: Failed to add links to the chatbot
                    data: null
                    error:
                      code: REQUEST_VALIDATION_FAILED
                      message: Request body is not valid
                      details:
                        - path:
                            - config
                            - recursionDepth
                          message: Number must be greater than or equal to 1
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Authentication Error:
                  value:
                    success: false
                    message: Failed to add links to the chatbot
                    data: null
                    error:
                      code: API_KEY_NOT_VALID
                      message: Authorization header does not contain valid API key
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Forbidden Error:
                  value:
                    success: false
                    message: Failed to add links to the chatbot
                    data: null
                    error:
                      code: CHATBOT_ADD_LINKS_FORBIDDEN
                      message: You are not authorized to add links to this chatbot
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Not Found Error:
                  value:
                    success: false
                    message: Failed to add links to the chatbot
                    data: null
                    error:
                      code: CHATBOT_OWNER_NOT_FOUND
                      message: Chatbot owner does not exist for the chatbot
        '429':
          description: Too Many Requests - Quota Exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Quota Exceeded:
                  value:
                    success: false
                    message: Failed to add links to the chatbot
                    data: null
                    error:
                      code: CHATBOT_LINKS_LIMIT_REACHED
                      message: >-
                        You have reached your pages quota limit (500 pages).
                        Current usage: 500 pages.
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Server Error:
                  value:
                    success: false
                    message: Failed to add links to the chatbot
                    data: null
                    error:
                      code: CHATBOT_ADD_LINKS_FAILED
                      message: Some technical error has occurred !!
      operationId: add-content-to-chatbot-v1
    parameters:
      - schema:
          type: string
        name: chatbotId
        in: path
        required: true
        description: Id of the chatbot
  /v0/chatbots/{chatbotId}/message:
    post:
      summary: Send Message
      requestBody:
        content:
          application/json:
            schema:
              type: object
              description: Request Body
              properties:
                threadId:
                  type: string
                  description: >-
                    If provided, message will be sent to the thread with this
                    threadId. Otherwise, message will be sent to a new thread.
                    This is mandatory when from is AGENT.
                message:
                  type: string
                  description: Actual text containing the message
                from:
                  $ref: '#/components/schemas/ChatFrom'
                iconUrl:
                  type: string
                  description: >-
                    Icon url to be associated with the message in the
                    conversation thread
                agentName:
                  type: string
                  description: >-
                    Agent name to be associated with the message in the
                    conversation thread
                prompts:
                  type: array
                  description: >-
                    Prompts should be provided only when from is AGENT. This
                    provides user list of options to choose from after the
                    message is sent.
                  items:
                    type: object
                    properties:
                      title:
                        type: string
                        description: >-
                          Title of the prompt, this will be shown to the user in
                          the chatbot after the message
                      description:
                        type: string
                        description: >-
                          Description of the prompt, this will be sent to the
                          chatbot when user clicks on any one of the options
                          provided by the prompts
                includeSmartPrompts:
                  type: boolean
                  default: false
                  description: >-
                    Flag to decide whether to return smart followup questions
                    based on the AI response.
              required:
                - message
            examples:
              New Thread:
                value:
                  message: What can you do ?
                  from: USER
              Existing Thread:
                value:
                  threadId: xyz
                  message: What can you do ?
                  from: AGENT
                  iconUrl: https://sitegpt.ai/images/chat-icon.png
                  agentName: Test Agent
                  prompts:
                    - title: Contact us
                      description: How to contact you ?
                    - title: Query
                      description: What information do you want ?
        description: >-
          Request body to send a message to a particular thread or start a new
          thread
      parameters:
        - name: chatbotId
          description: Id of the chatbot
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                type: object
                description: Sucess Response
                properties:
                  success:
                    type: boolean
                    description: >-
                      Indicates whether this is success response or error
                      response
                  message:
                    type: string
                    description: Overall message regarding the operation performed
                  data:
                    type: object
                    description: Data returned from the server
                    properties:
                      message:
                        type: object
                        description: Message object
                        properties:
                          id:
                            type: string
                            description: Id of the message
                          chatbotId:
                            type: string
                            description: Id of the chatbot
                          threadId:
                            type: string
                            description: Id of the thread this message has been sent to
                          question:
                            $ref: '#/components/schemas/ChatQuestionAnswer'
                          answer:
                            $ref: '#/components/schemas/ChatQuestionAnswer'
                          sources:
                            type: array
                            description: Sources referred to provide the above answer
                            items:
                              type: string
                          gptModel:
                            $ref: '#/components/schemas/GPTModel'
                          messageType:
                            $ref: '#/components/schemas/MessageType'
                          iconUrl:
                            type: string
                            description: >-
                              Icon url associated with the message in the
                              conversation thread
                            nullable: true
                          agentName:
                            type: string
                            description: >-
                              Agent name associated with the message in the
                              conversation thread
                            nullable: true
                          prompts:
                            type: array
                            description: List of prompts of this message
                            items:
                              $ref: '#/components/schemas/QuickPrompt'
                          smartPrompts:
                            type: array
                            description: >-
                              Smart followup questions based on the AI response.
                              Only returned when includeSmartPrompts is true and
                              from is USER in the request.
                            items:
                              type: string
                          reaction:
                            $ref: '#/components/schemas/MessageReaction'
              examples:
                Success:
                  value:
                    success: true
                    message: Sent the message successfully
                    data:
                      message:
                        id: '376290410396385873'
                        question:
                          text: This is user!!
                          timestamp: '2023-08-03T11:43:52.037718Z'
                        answer:
                          text: This is agent!!
                          timestamp: '2023-08-03T11:19:19.041469Z'
                        sources: []
                        gptModel: gpt-3.5-turbo
                        reaction: NEUTRAL
                        threadId: 06b3b43c-5651-49a2-b618-d7f24667c1b6
                        messageType: AGENT_MESSAGE
                        iconUrl: >-
                          https://avatars.githubusercontent.com/u/17903466?s=48&v=4
                        agentName: Test Agent
                        prompts:
                          - id: 17e23880-386e-492f-960c-4394baec2977
                            title: Prompt 1
                            description: This is the prompt1 description
                          - id: ab0ba301-90c9-4ef2-8ca8-fa579a104386
                            title: Prompt 2
                            description: This is the prompt2 description
                        smartPrompts:
                          - First smart prompt
                          - Second smart prompt
                          - Third smart prompt
                        chatbotId: '365062873485935184'
        '400':
          description: Bad Request
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Validation Error:
                  value:
                    success: false
                    message: Failed to send the message
                    data: null
                    error:
                      code: REQUEST_BODY_INVALID
                      message: >-
                        AGENT cannot start a new thread. threadId field is
                        required when from is AGENT
                      details: null
                Invalid Request Body:
                  value:
                    success: false
                    message: Failed to send the message
                    data: null
                    error:
                      code: REQUEST_VALIDATION_FAILED
                      message: Request body is not valid
                      details:
                        - path:
                            - from
                          message: >-
                            Invalid enum value. Expected `USER` | `AGENT`,
                            received `X`
        '401':
          description: Unauthorized
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Authentication Error:
                  value:
                    success: false
                    message: Failed to send the message
                    error:
                      code: API_KEY_NOT_VALID
                      message: Authorization header does not contain valid API key
                      details: null
        '403':
          description: Forbidden
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Forbidden Error:
                  value:
                    success: false
                    message: Failed to send the message
                    data: null
                    error:
                      code: SEND_MESSAGE_FORBIDDEN
                      message: >-
                        You are not authorized to send message to this chatbot
                        thread
                      details: null
        '404':
          description: Not Found
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Not Found Error:
                  value:
                    success: false
                    message: Failed to send the message
                    data: null
                    error:
                      code: CHATBOT_THREAD_NOT_FOUND
                      message: Chatbot thread does not exist for threadId=1234567890
                      details: null
        '405':
          description: Method Not Allowed
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Method Not Allowed Error:
                  value:
                    success: false
                    message: Failed to send the message
                    data: null
                    error:
                      code: REQUEST_METHOD_NOT_ALLOWED
                      message: PATCH request method is not allowed
                      details: null
        '500':
          description: Internal Server Error
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Server Error:
                  value:
                    success: false
                    message: Failed to send the message
                    data: null
                    error:
                      code: SEND_MESSAGE_FAILED
                      message: Some technical error has occurred !!
                      details: null
                Messages Limit Reached Error:
                  value:
                    success: false
                    message: Failed to send the message
                    data: null
                    error:
                      code: CHATBOT_MESSAGES_LIMIT_REACHED
                      message: >-
                        Normal messages limit reached for the chatbot. You
                        cannot send any more normal messages
                GPT4 Messages Limit Reached Error:
                  value:
                    success: false
                    message: Failed to send the message
                    data: null
                    error:
                      code: CHATBOT_GPT4_MESSAGES_LIMIT_REACHED
                      message: >-
                        GPT-4.1 messages limit reached for the chatbot. You
                        cannot send any more GPT-4.1 messages
      tags:
        - Chatbot Messages
      operationId: send-message
      description: Send message to a particular thread or start a new thread
    parameters:
      - schema:
          type: string
        name: chatbotId
        in: path
        required: true
        description: Id of the chatbot
  /v0/chatbots/{chatbotId}/messages/{messageId}:
    parameters:
      - schema:
          type: string
        name: chatbotId
        in: path
        required: true
        description: Id of the chatbot that the message belong to
      - schema:
          type: string
        name: messageId
        in: path
        required: true
        description: Id of the message that has to be updated
    patch:
      summary: Update Message
      operationId: update-message
      description: >-
        Update message that belongs to a particular thread. You can only add
        reaction to the message for now.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              description: Request Body
              properties:
                threadId:
                  type: string
                  description: Id of the thread that the message belongs to
                reaction:
                  $ref: '#/components/schemas/MessageReaction'
            examples:
              Request Body:
                value:
                  threadId: dd56a3d0-dba7-4df0-b62b-58513230b053
                  reaction: POSITIVE
        description: Request Body to update message
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                type: object
                description: Success Response
                properties:
                  success:
                    type: boolean
                    description: >-
                      Indicates whether this is success response or error
                      response
                  message:
                    type: string
                    description: Overall message regarding the operation performed
                  data:
                    type: object
                    description: Data returned from the server
                    nullable: true
              examples:
                Success:
                  value:
                    success: true
                    message: Updated the message successfully
                    data: null
        '400':
          description: Bad Request
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Validation Error:
                  value:
                    success: false
                    message: Failed to update the message
                    data: null
                    error:
                      code: REQUEST_BODY_INVALID
                      message: chatbotId is requried
                      details: null
                Validation Error - 2:
                  value:
                    success: false
                    message: Failed to update the message
                    data: null
                    error:
                      code: REQUEST_VALIDATION_FAILED
                      message: Request body is not valid
                      details:
                        - path:
                            - reaction
                          message: Required
        '401':
          description: Unauthorized
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Authentication Error:
                  value:
                    success: false
                    message: Failed to update the message
                    error:
                      code: API_KEY_NOT_VALID
                      message: Authorization header does not contain valid API key
                      details: null
        '403':
          description: Forbidden
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Forbidden Error:
                  value:
                    success: false
                    message: Failed to update the message
                    data: null
                    error:
                      code: UPDATE_MESSAGE_FORBIDDEN
                      message: >-
                        You are not authorized to update message of this chatbot
                        thread
                      details: null
        '404':
          description: Not Found
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Not Found Error:
                  value:
                    success: false
                    message: Failed to update the message
                    data: null
                    error:
                      code: MESSAGE_NOT_FOUND
                      message: Message does not exist for the given chatbot and thread
                      details: null
        '405':
          description: Method Not Allowed
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Method Not Allowed Error:
                  value:
                    success: false
                    message: Failed to update the message
                    data: null
                    error:
                      code: REQUEST_METHOD_NOT_ALLOWED
                      message: POST request method is not allowed
                      details: null
        '500':
          description: Internal Server Error
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Server Error:
                  value:
                    success: false
                    message: Failed to update the message
                    data: null
                    error:
                      code: UPDATE_MESSAGE_FAILED
                      message: Some technical error has occurred !!
                      details: null
      tags:
        - Chatbot Messages
  /v0/chatbots/{chatbotId}/conversation-starters:
    get:
      summary: Fetch All Conversation Starters
      tags:
        - Chatbot Conversation Starters
      parameters:
        - name: chatbotId
          description: Id of the chatbot
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                type: object
                description: Success Response
                properties:
                  success:
                    type: boolean
                    description: >-
                      Indicates whether this is success response or error
                      response
                  message:
                    type: string
                    description: Overall message regarding the operation performed
                  data:
                    type: object
                    description: Data returned from the server
                    properties:
                      prompts:
                        type: array
                        description: Array containing conversation starters
                        items:
                          $ref: '#/components/schemas/QuickPrompt'
              examples:
                Success:
                  value:
                    success: true
                    message: Fetched conversation starters of the chatbot successfully
                    data:
                      prompts:
                        - id: 538aa9ca-ef69-4a1a-a6a2-ba1f62f05c43
                          title: Contact us
                          description: How to contact you?
                        - id: 40ffc3fe-9d74-439c-bfec-8b0d69a94836
                          title: Yo
                          description: Hey what's up?
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Validation Error:
                  value:
                    success: false
                    message: Failed to fetch conversation starters of the chatbot
                    data: null
                    error:
                      code: CHATBOT_ID_REQUIRED
                      message: chatbotId is required
                      details: null
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Authentication Error:
                  value:
                    success: false
                    message: Failed to fetch conversation starters of the chatbot
                    data: null
                    error:
                      code: API_KEY_NOT_VALID
                      message: Authorization header does not contain valid API key
                      details: null
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
        '403':
          description: Forbidden
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Forbidden Error:
                  value:
                    success: false
                    message: Failed to fetch conversation starters of the chatbot
                    data: null
                    error:
                      code: CHATBOT_FETCH_QUICK_PROMPTS_FORBIDDEN
                      message: >-
                        You are not authorized to fetch conversation starters of
                        this chatbot
                      details: null
        '405':
          description: Method Not Allowed
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Method Not Allowed Error:
                  value:
                    success: false
                    message: Failed to fetch conversation starters of the chatbot
                    data: null
                    error:
                      code: REQUEST_METHOD_NOT_ALLOWED
                      message: PATCH request method is not allowed
                      details: null
        '500':
          description: Internal Server Error
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Server Error:
                  value:
                    success: false
                    message: Failed to fetch conversation starters of the chatbot
                    data: null
                    error:
                      code: CHATBOT_FETCH_QUICK_PROMPTS_FAILED
                      message: Some technical error has occurred !!
                      details: null
      description: Fetch all conversation starters of a particular chatbot
      operationId: fetch-all-conversation-starters
    post:
      summary: Add Conversation Starter
      requestBody:
        content:
          application/json:
            schema:
              type: object
              description: Request Body
              properties:
                title:
                  type: string
                  description: >-
                    Title of the conversation-starter. This is the text that is
                    shown as button in the chatbot.
                link:
                  type: string
                  description: >-
                    Link of the conversation starter. If this link is added,
                    then when you click on the conversation starter in the
                    chatbot, this link will be opened instead of sending a
                    message to the chatbot.
                  nullable: true
                description:
                  type: string
                  description: >-
                    Description of the conversation-starter. This is the message
                    that will be sent to the chatbot when you click on the
                    conversation-starter inside the chatbot.
              required:
                - title
                - description
            examples:
              Request Body:
                value:
                  title: Contact us
                  link: ''
                  description: How to contact you?
          application/xml:
            schema:
              type: object
              properties: {}
          multipart/form-data:
            schema:
              type: object
              properties: {}
          text/html:
            schema:
              type: object
              properties: {}
        description: Request body to add a conversation starter
      parameters:
        - name: chatbotId
          description: Id of the chatbot
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                type: object
                description: Success Response
                properties:
                  success:
                    type: boolean
                    description: >-
                      Indicates whether this is success response or error
                      response
                  message:
                    type: string
                    description: Overall message regarding the operation performed
                  data:
                    type: object
                    description: Data returned from the server
              examples:
                Success:
                  value:
                    success: true
                    message: Added conversation starter to the chatbot successfully
                    data: {}
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Validation Error:
                  value:
                    success: false
                    message: Failed to add conversation starter to the chatbot
                    data: null
                    error:
                      code: CHATBOT_ID_REQUIRED
                      message: chatbotId is required
                      details: null
                Invalid Request Body:
                  value:
                    success: false
                    message: Failed to add conversation starter of the chatbot
                    data: null
                    error:
                      code: REQUEST_VALIDATION_FAILED
                      message: Request body is not valid
                      details:
                        - path:
                            - title
                          message: Required
          headers:
            Content-Body:
              schema:
                type: string
              description: application/json
        '401':
          description: Unauthorized
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Authentication Error:
                  summary: Authentication Error
                  value:
                    success: false
                    message: Failed to add conversation starter to the chatbot
                    data: null
                    error:
                      code: API_KEY_NOT_VALID
                      message: Authorization header does not contain valid API key
                      details: null
        '403':
          description: Forbidden
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Forbidden Error:
                  value:
                    success: false
                    message: Failed to add conversation starter to the chatbot
                    data: null
                    error:
                      code: CHATBOT_ADD_QUICK_PROMPT_FORBIDDEN
                      message: >-
                        You are not authorized to add conversation starter to
                        this chatbot
                      details: null
        '405':
          description: Method Not Allowed
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Method Not Allowed Error:
                  value:
                    success: false
                    message: Failed to add conversation starter to the chatbot
                    data: null
                    error:
                      code: REQUEST_METHOD_NOT_ALLOWED
                      message: PATCH request method is not allowed
                      details: null
        '500':
          description: Internal Server Error
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Server Error:
                  value:
                    success: false
                    message: Failed to add conversation starter to the chatbot
                    data: null
                    error:
                      code: CHATBOT_ADD_QUICK_PROMPT_FAILED
                      message: Some technical error has occurred !!
                      details: null
      tags:
        - Chatbot Conversation Starters
      description: Add a new Conversation Starter to a particular chatbot.
      operationId: add-conversation-starter
    parameters:
      - schema:
          type: string
        name: chatbotId
        in: path
        required: true
        description: Your Chatbot ID
  /v0/chatbots/{chatbotId}/conversation-starters/{promptId}:
    get:
      tags:
        - Chatbot Conversation Starters
      summary: Fetch Conversation Starter
      parameters:
        - name: chatbotId
          description: Id of the chatbot
          in: path
          schema:
            type: string
          required: true
        - name: promptId
          description: Id of the conversation starter
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                type: object
                description: Success Response
                properties:
                  success:
                    type: boolean
                    description: >-
                      Indicates whether this is success response or error
                      response
                  message:
                    type: string
                    description: Overall message regarding the operation performed
                  data:
                    $ref: '#/components/schemas/QuickPrompt'
              examples:
                Success:
                  value:
                    success: true
                    message: Fetched conversation starter of the chatbot successfully
                    data:
                      id: fd0bfc2d-2ea6-41dc-afb9-7a3ea7b2b729
                      title: Contact us
                      description: How to contact you?
                Success with Link:
                  value:
                    success: true
                    message: Fetched conversation starter of the chatbot successfully
                    data:
                      id: fd0bfc2d-2ea6-41dc-afb9-7a3ea7b2b729
                      title: Contact us
                      link: https://sitegpt.ai/contactus
                      description: How to contact you?
        '400':
          description: Bad Request
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                validation Error:
                  value:
                    success: false
                    message: Failed to fetch conversation starter of the chatbot
                    data: null
                    error:
                      code: PROMPT_ID_REQUIRED
                      message: promptId is required
                      details: null
        '401':
          description: Unauthorized
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Authentication Error:
                  value:
                    success: false
                    message: Failed to fetch conversation starter of the chatbot
                    data: null
                    error:
                      code: API_KEY_NOT_VALID
                      message: Authorization header does not contain valid API key
                      details: null
        '403':
          description: Forbidden
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Forbidden Error:
                  value:
                    success: false
                    message: Failed to fetch conversation starter of the chatbot
                    data: null
                    error:
                      code: CHATBOT_FETCH_QUICK_PROMPT_FORBIDDEN
                      message: >-
                        You are not authorized to fetch conversation starter of
                        this chatbot
                      details: null
        '404':
          description: Not Found
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Not Found Error:
                  value:
                    success: false
                    message: Failed to fetch conversation starter of the chatbot
                    data: null
                    error:
                      code: CHATBOT_PROMPT_NOT_FOUND
                      message: Required prompt does not exist in this chatbot
                      details: null
        '405':
          description: Method Not Allowed
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Method Not Allowed Error:
                  value:
                    success: false
                    message: Failed to update conversation starter of the chatbot
                    data: null
                    error:
                      code: REQUEST_METHOD_NOT_ALLOWED
                      message: PUT request method is not allowed
                      details: null
        '500':
          description: Internal Server Error
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Server Error:
                  value:
                    success: false
                    message: Failed to fetch conversation starter of the chatbot
                    data: null
                    error:
                      code: CHATBOT_FETCH_QUICK_PROMPT_FAILED
                      message: Some technical error has occurred !!
                      details: null
      description: Fetch conversation-starter of the chatbot
      operationId: fetch-conversation-starter
    patch:
      summary: Update Conversation Starter
      requestBody:
        content:
          application/json:
            schema:
              type: object
              description: Request body
              properties:
                title:
                  type: string
                  description: >-
                    Title of the conversation-starter. This is the text that is
                    shown as button in the chatbot.
                link:
                  type: string
                  description: >-
                    Link of the conversation starter. If this link is added,
                    then when you click on the conversation starter in the
                    chatbot, this link will be opened instead of sending a
                    message to the chatbot.
                  nullable: true
                description:
                  type: string
                  description: >-
                    Description of the conversation-starter. This is the message
                    that will be sent to the chatbot when you click on the
                    conversation-starter inside the chatbot.
            examples:
              Request Body:
                value:
                  title: conversation starter title
                  link: ''
                  description: conversation starter description
        description: Request body to update the conversation starter
      parameters:
        - name: chatbotId
          description: Id of the chatbot
          in: path
          schema:
            type: string
          required: true
        - name: promptId
          description: Id of the conversation-starter
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
          content:
            application/json:
              schema:
                type: object
                description: Success Response
                properties:
                  success:
                    type: boolean
                    description: >-
                      Indicates whether this is success response or error
                      response
                  message:
                    type: string
                    description: Overall message regarding the operation performed
                  data:
                    type: object
                    description: Data returned from the server
              examples:
                Success:
                  value:
                    success: true
                    message: Updated conversation starter of the chatbot successfully
                    data: {}
        '400':
          description: Bad Request
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Validation Error:
                  value:
                    success: false
                    message: Failed to update conversation starter of the chatbot
                    data: null
                    error:
                      code: PROMPT_ID_REQUIRED
                      message: promptId is required
                      details: null
                Invalid Request Body:
                  value:
                    success: false
                    message: Failed to update conversation starter of the chatbot
                    data: null
                    error:
                      code: REQUEST_VALIDATION_FAILED
                      message: Request body is not valid
                      details:
                        - path:
                            - title
                          message: Expected string, received number
        '401':
          description: Unauthorized
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Authentication Error:
                  value:
                    success: false
                    message: Failed to update conversation starter of the chatbot
                    data: null
                    error:
                      code: API_KEY_NOT_VALID
                      message: Authorization header does not contain valid API key
                      details: null
        '403':
          description: Forbidden
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Forbidden Error:
                  value:
                    success: false
                    message: Failed to update conversation starter of the chatbot
                    data: null
                    error:
                      code: CHATBOT_UPDATE_QUICK_PROMPT_FORBIDDEN
                      message: >-
                        You are not authorized to update conversation starter of
                        this chatbot
                      details: null
        '404':
          description: Not Found
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Not Found Error:
                  value:
                    success: false
                    message: Failed to update conversation starter of the chatbot
                    data: null
                    error:
                      code: CHATBOT_PROMPT_NOT_FOUND
                      message: Required prompt does not exist in this chatbot
                      details: null
        '405':
          description: Method Not Allowed
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Method Not Allowed Error:
                  value:
                    success: false
                    message: Failed to update conversation starter of the chatbot
                    data: null
                    error:
                      code: REQUEST_METHOD_NOT_ALLOWED
                      message: request method is not allowed
                      details: null
        '500':
          description: Internal Server Error
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Server Error:
                  value:
                    success: false
                    message: Failed to update conversation starter of the chatbot
                    data: null
                    error:
                      code: CHATBOT_UPDATE_QUICK_PROMPT_FAILED
                      message: Some technical error has occurred !!
                      details: null
      tags:
        - Chatbot Conversation Starters
      description: Update conversation-starter of the chatbot
      operationId: update-conversation-starter
    delete:
      summary: Delete Conversation Starter
      parameters:
        - name: chatbotId
          description: Id of the chatbot
          in: path
          schema:
            type: string
          required: true
        - name: promptId
          description: Id of the conversation-starter
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                type: object
                description: Success Response
                properties:
                  success:
                    type: boolean
                    description: >-
                      Indicates whether this is success response or error
                      response
                  message:
                    type: string
                    description: Overall message regarding the operation performed
                  data:
                    type: object
                    description: Data returned from the server
                    nullable: true
              examples:
                Success:
                  value:
                    success: true
                    message: Deleted conversation starter of the chatbot successfully
                    data: null
        '400':
          description: Bad Request
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Validation Error:
                  value:
                    success: false
                    message: Failed to delete conversation starter of the chatbot
                    data: null
                    error:
                      code: PROMPT_ID_REQUIRED
                      message: promptId is required
                      details: null
        '401':
          description: Unauthorized
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Authentication Error:
                  value:
                    success: false
                    message: Failed to delete conversation starter of the chatbot
                    data: null
                    error:
                      code: API_KEY_NOT_VALID
                      message: Authorization header does not contain valid API key
                      details: null
        '403':
          description: Forbidden
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Forbidden Error:
                  value:
                    success: false
                    message: Failed to delete conversation starter of the chatbot
                    data: null
                    error:
                      code: CHATBOT_DELETE_QUICK_PROMPT_FORBIDDEN
                      message: >-
                        You are not authorized to delete conversation starter of
                        this chatbot
                      details: null
        '404':
          description: Not Found
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Not Found Error:
                  value:
                    success: false
                    message: Failed to delete conversation starter of the chatbot
                    data: null
                    error:
                      code: CHATBOT_PROMPT_NOT_FOUND
                      message: Required prompt does not exist in this chatbot
                      details: null
        '405':
          description: Method Not Allowed
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Method Not Allowed Error:
                  value:
                    success: false
                    message: Failed to delete conversation starter of the chatbot
                    data: null
                    error:
                      code: REQUEST_METHOD_NOT_ALLOWED
                      message: request method is not allowed
                      details: null
        '500':
          description: Internal Server Error
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Server Error:
                  value:
                    success: false
                    message: Failed to delete conversation starter of the chatbot
                    data: null
                    error:
                      code: CHATBOT_DELETE_QUICK_PROMPT_FAILED
                      message: Some technical error has occurred !!
                      details: null
      tags:
        - Chatbot Conversation Starters
      description: Delete conversation-starter of the chatbot
      operationId: delete-conversation-starter
    parameters:
      - schema:
          type: string
        name: chatbotId
        in: path
        required: true
        description: Your Chatbot ID
      - schema:
          type: string
        name: promptId
        in: path
        required: true
        description: Your Conversation Starter ID
  /v0/chatbots/{chatbotId}/settings/advanced:
    patch:
      tags:
        - Chatbot Settings
      summary: Update Chatbot Settings - Advanced
      requestBody:
        content:
          application/json:
            schema:
              type: object
              description: Request Body
              properties:
                creativity:
                  $ref: '#/components/schemas/ChatbotCreativity'
                temperature:
                  type: number
                  minimum: 0
                  maximum: 2
                  multipleOf: 0.01
                  description: >-
                    Creativity meter of the chatbot. This is valid only when
                    creativity of the chatbot is custom
                topK:
                  type: integer
                  minimum: 1
                  maximum: 50
                  multipleOf: 1
                  description: >-
                    Number of relevant chunks to be fetched for answering the
                    question
                webhookUrl:
                  type: string
                  description: >-
                    All messages are sent to this global webhook url if webhook
                    url is not configured at thread level
                webhookToken:
                  type: string
                  description: >-
                    This is the global webhook token that is sent in header in
                    the calls made to the above webhook url for all messages if
                    token is not configured at thread level
            examples:
              Request Body:
                value:
                  creativity: conservative
                  temperature: 1
                  topK: 3
                  webhookUrl: https://example.com
                  webhookToken: abc123
        description: Request body to update advanced settings of the chatbot
      parameters:
        - name: chatbotId
          description: Id of the chatbot
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                type: object
                description: Success Response
                properties:
                  success:
                    type: boolean
                    description: >-
                      Indicates whether this is success response or error
                      response
                  message:
                    type: string
                    description: Overall message regarding the operation performed
                  data:
                    type: object
                    description: Data returned from the server
                    nullable: true
              examples:
                Success:
                  value:
                    success: true
                    message: Updated advanced settings of the chatbot successfully
                    data: {}
        '400':
          description: Bad Request
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Validation Error:
                  value:
                    success: false
                    message: Failed to update advanced settings of the chatbot
                    data: null
                    error:
                      code: CHATBOT_ID_REQUIRED
                      message: chatbotId is required
                      details: null
                Invalid Request Body:
                  value:
                    success: false
                    message: Failed to update advanced settings of the chatbot
                    data: null
                    error:
                      code: REQUEST_VALIDATION_FAILED
                      message: Request body is not valid
                      details:
                        - path:
                            - creativity
                          message: >-
                            Invalid enum value. Expected `restricted` |
                            `conservative` | `creative` | `custom`, received
                            `conservativ`
        '401':
          description: Unauthorized
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Authentication Error:
                  value:
                    success: false
                    message: Failed to update advanced settings of the chatbot
                    data: null
                    error:
                      code: API_KEY_NOT_VALID
                      message: Authorization header does not contain valid API key
                      details: null
        '403':
          description: Forbidden
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Forbidden Error:
                  value:
                    success: false
                    message: Failed to update advanced settings of the chatbot
                    data: null
                    error:
                      code: CHATBOT_ADVANCED_SETTINGS_UPDATE_FORBIDDEN
                      message: >-
                        You are not authorized to update advanced settings of
                        this chatbot
                      details: null
        '405':
          description: Method Not Allowed
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Method Not Allowed Error:
                  value:
                    success: false
                    message: Failed to update advanced settings of the chatbot
                    data: null
                    error:
                      code: REQUEST_METHOD_NOT_ALLOWED
                      message: POST request method is not allowed
                      details: null
        '500':
          description: Internal Server Error
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Server Error:
                  value:
                    success: false
                    message: Failed to update advanced settings of the chatbot
                    data: null
                    error:
                      code: CHATBOT_ADVANCED_SETTINGS_UPDATE_FAILED
                      message: Some technical error has occurred !!
                      details: null
      operationId: update-chatbot-advanced-settings
      description: Update advanced settings of the chatbot
  /v0/chatbots/{chatbotId}/settings/chat-mode:
    patch:
      tags:
        - Chatbot Settings
      summary: Update Chatbot Settings - Chat Mode
      requestBody:
        content:
          application/json:
            schema:
              type: object
              description: Request Body
              properties:
                chatMode:
                  $ref: '#/components/schemas/ChatMode'
            examples:
              Request Body:
                value:
                  chatMode: AI
        description: Request body to update chat-mode settings of the chatbot
      parameters:
        - name: chatbotId
          description: Id of the chatbot
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                type: object
                description: Success Response
                properties:
                  success:
                    type: boolean
                    description: >-
                      Indicates whether this is success response or error
                      response
                  message:
                    type: string
                    description: Overall message regarding the operation performed
                  data:
                    type: object
                    description: Data returned from the server
                    nullable: true
              examples:
                Success:
                  value:
                    success: true
                    message: Updated chat mode settings of the chatbot successfully
                    data: {}
        '400':
          description: Bad Request
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Validation Error:
                  value:
                    success: false
                    message: Failed to update chat-mode settings of the chatbot
                    data: null
                    error:
                      code: CHATBOT_ID_REQUIRED
                      message: chatbotId is required
                      details: null
                Invalid Request Body:
                  value:
                    success: false
                    message: Failed to update chat-mode settings of the chatbot
                    data: null
                    error:
                      code: REQUEST_VALIDATION_FAILED
                      message: Request body is not valid
                      details:
                        - path:
                            - chatMode
                          message: >-
                            Invalid enum value. Expected `AGENT` | `AI`,
                            received `A`
        '401':
          description: Unauthorized
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Authentication Error:
                  value:
                    success: false
                    message: Failed to update chat mode settings of the chatbot
                    data: null
                    error:
                      code: API_KEY_NOT_VALID
                      message: Authorization header does not contain valid API key
                      details: null
        '403':
          description: Forbidden
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Forbidden Error:
                  value:
                    success: false
                    message: Failed to update chat mode settings of the chatbot
                    data: null
                    error:
                      code: CHATBOT_CHAT_MODE_SETTINGS_UPDATE_FORBIDDEN
                      message: >-
                        You are not authorized to update chat mode settings of
                        this chatbot
                      details: null
        '405':
          description: Method Not Allowed
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Method Not Allowed Error:
                  value:
                    success: false
                    message: Failed to update chat mode settings of the chatbot
                    data: null
                    error:
                      code: REQUEST_METHOD_NOT_ALLOWED
                      message: POST request method is not allowed
                      details: null
        '500':
          description: Internal Server Error
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Server Error:
                  value:
                    success: false
                    message: Failed to update chat mode settings of the chatbot
                    data: null
                    error:
                      code: CHATBOT_CHAT_MODE_SETTINGS_UPDATE_FAILED
                      message: Some technical error has occurred !!
                      details: null
      operationId: update-chatbot-chat-mode-settings
      description: Update chat-mode settings of the chatbot
  /v0/chatbots/{chatbotId}/settings/general:
    patch:
      tags:
        - Chatbot Settings
      summary: Update Chatbot Settings - General
      requestBody:
        content:
          application/json:
            schema:
              type: object
              description: Request Body
              properties:
                chatbotDescription:
                  type: string
                  description: Description of the chatbot
                disableSmartFollowUpPrompts:
                  type: boolean
                  description: >-
                    Option to disable smart followup questions generated by
                    SiteGPT
                smartFollowUpPromptsCount:
                  type: integer
                  default: 3
                  minimum: 1
                  maximum: 5
                  multipleOf: 1
                  description: >-
                    Number of smart follow up questions to be shown when
                    enabled.
                disableLeadNotifications:
                  type: boolean
                  description: Option to disable email notifications for new lead captures.
                historyCount:
                  type: integer
                  minimum: 1
                  maximum: 5
                  multipleOf: 1
                  description: >-
                    Number of history messages to be considered when answering
                    the question
                gptModel:
                  $ref: '#/components/schemas/GPTModel'
                extraData:
                  type: string
                  description: Any extra data you want to add to your chatbot.
                metadata:
                  type: object
                  description: >-
                    Any metadata (key-value pairs) that you can assign to the
                    chatbot. Key should be string and Value could be anything.
            examples:
              Request Body:
                value:
                  chatbotDescription: This is a test chatbot
                  disableSmartFollowUpPrompts: false
                  smartFollowUpPromptsCount: 3
                  disableLeadNotifications: true
                  historyCount: 4
                  gptModel: gpt-3.5-turbo
        description: Request body to update general settings of the chatbot
      parameters:
        - name: chatbotId
          description: Id of the chatbot
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                type: object
                description: Success Response
                properties:
                  success:
                    type: boolean
                    description: >-
                      Indicates whether this is success response or error
                      response
                  message:
                    type: string
                    description: Overall message regarding the operation performed
                  data:
                    type: object
                    description: Data returned from the server
                    nullable: true
              examples:
                Success:
                  value:
                    success: true
                    message: Updated general settings of the chatbot successfully
                    data: {}
        '400':
          description: Bad Request
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Validation Error:
                  value:
                    success: false
                    message: Failed to update general settings of the chatbot
                    data: null
                    error:
                      code: CHATBOT_ID_REQUIRED
                      message: chatbotId is required
                      details: null
                Invalid Request Body:
                  value:
                    success: false
                    message: Failed to update general settings of the chatbot
                    data: null
                    error:
                      code: REQUEST_VALIDATION_FAILED
                      message: Request body is not valid
                      details:
                        - path:
                            - historyCount
                          message: Expected number, received string
        '401':
          description: Unauthorized
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Authentication Error:
                  value:
                    success: false
                    message: Failed to update general settings of the chatbot
                    data: null
                    error:
                      code: API_KEY_NOT_VALID
                      message: Authorization header does not contain valid API key
                      details: null
        '403':
          description: Forbidden
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Forbidden Error:
                  value:
                    success: false
                    message: Failed to update general settings of the chatbot
                    data: null
                    error:
                      code: CHATBOT_GENERAL_SETTINGS_UPDATE_FORBIDDEN
                      message: >-
                        You are not authorized to update general settings of
                        this chatbot
                      details: null
        '405':
          description: Method Not Allowed
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Method Not Allowed Error:
                  value:
                    success: false
                    message: Failed to update general settings of the chatbot
                    data: null
                    error:
                      code: REQUEST_METHOD_NOT_ALLOWED
                      message: POST request method is not allowed
                      details: null
        '500':
          description: Internal Server Error
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Server Error:
                  value:
                    success: false
                    message: Failed to update general settings of the chatbot
                    data: null
                    error:
                      code: CHATBOT_GENERAL_SETTINGS_UPDATE_FAILED
                      message: Some technical error has occurred !!
                      details: null
      operationId: update-chatbot-general-settings
      description: Update general settings of the chatbot
  /v0/chatbots/{chatbotId}/settings/localization:
    patch:
      tags:
        - Chatbot Settings
      summary: Update Chatbot Settings - Localization
      requestBody:
        content:
          application/json:
            schema:
              type: object
              description: >-
                Request Body. A group omitted from the body is reset to its
                defaults; a group that is present is merged key-by-key into the
                stored group. `locale` omitted or null resets to English.
              properties:
                locale:
                  type: string
                  description: >-
                    Language of the text the widget writes itself (relative
                    timestamps such as "just now"). A BCP-47 tag from the
                    supported list, for example `da`, `de`, `ja`, `pt`. Common
                    variants are accepted and stored canonically (`da-DK`
                    becomes `da`); an unsupported tag is a validation error.
                  nullable: true
                chatHome:
                  $ref: '#/components/schemas/ChatbotLocalizationChatHome'
                chatMessages:
                  $ref: '#/components/schemas/ChatbotLocalizationChatMessages'
                chatMessage:
                  $ref: '#/components/schemas/ChatbotLocalizationChatMessage'
                chatAccount:
                  $ref: '#/components/schemas/ChatbotLocalizationChatAccount'
            examples:
              Request Body:
                value:
                  locale: da
                  chatHome:
                    home: Home
                    addDetails: Add details
                    startConversation: Start a conversation
                    starting: Starting...
                  chatMessages:
                    messages: Messages
                    noMessages: No Messages
                    loginToSeeHistory: Verify your email to save your conversation history.
                    historyShowsUpHere: Your conversation history shows up here.
                    verifyEmail: Verify your email
                    startConversation: Start a conversation
                    starting: Starting...
                  chatMessage:
                    botName: Bot
                    yourName: You
                    agentName: Agent
                    escalationHeading: >-
                      Are you sure you want to escalate the chat to human
                      support?
                    escalationSubHeading: >-
                      This conversation will be shared with the human support
                      and they will get back to you as soon as they can.
                    yesContinue: Yes, continue
                    cancel: Cancel
                    conversationEscalated: 👨‍💼 Conversation changed to human mode
                  chatAccount:
                    account: Account
                    verifyEmail: Verify your email
                    loginToSeeHistory: Verify your email to save your chat history.
                    emailLabel: Email
                    nameLabel: Name
                    phoneLabel: Phone Number
                    sendingOtp: Sending OTP...
                    verifyOtp: Verify OTP
                    sentOtpToEmail: We sent the OTP to your email address
                    otp: OTP
                    verifyAndContinue: Verify & Continue
                    notReceivedOtpYet: Didn't receive OTP yet?
                    resend: Resend
                    editDetails: Edit Details
                    resetting: Resetting...
                    verifying: Verifying...
                    logout: Logout
                    loggingOut: Logging out...
                    verified: Verified
                    edit: Edit
                    update: Update
                    updating: Updating...
        description: Request body to update localization settings of the chatbot
      parameters:
        - name: chatbotId
          description: Id of the chatbot
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                type: object
                description: Success Response
                properties:
                  success:
                    type: boolean
                    description: >-
                      Indicates whether this is success response or error
                      response
                  message:
                    type: string
                    description: Overall message regarding the operation performed
                  data:
                    type: object
                    description: Data returned from the server
                    nullable: true
              examples:
                Success:
                  value:
                    success: true
                    message: Updated localization settings of the chatbot successfully
                    data: {}
        '400':
          description: Bad Request
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Validation Error:
                  value:
                    success: false
                    message: Failed to update localization settings of the chatbot
                    data: null
                    error:
                      code: CHATBOT_ID_REQUIRED
                      message: chatbotId is required
                      details: null
                Invalid Request Body:
                  value:
                    success: false
                    message: Failed to update localization settings of the chatbot
                    data: null
                    error:
                      code: REQUEST_VALIDATION_FAILED
                      message: Request body is not valid
                      details:
                        - path:
                            - chatHome
                            - home
                          message: Expected string, received number
        '401':
          description: Unauthorized
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Authentication Error:
                  value:
                    success: false
                    message: Failed to update localization settings of the chatbot
                    data: null
                    error:
                      code: API_KEY_NOT_VALID
                      message: Authorization header does not contain valid API key
                      details: null
        '403':
          description: Forbidden
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Forbidden Error:
                  value:
                    success: false
                    message: Failed to update localization settings of the chatbot
                    data: null
                    error:
                      code: CHATBOT_LOCALIZATION_SETTINGS_UPDATE_FORBIDDEN
                      message: >-
                        You are not authorized to update localization settings
                        of this chatbot
                      details: null
        '405':
          description: Method Not Allowed
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Method Not Allowed Error:
                  value:
                    success: false
                    message: Failed to update localization settings of the chatbot
                    data: null
                    error:
                      code: REQUEST_METHOD_NOT_ALLOWED
                      message: POST request method is not allowed
                      details: null
        '500':
          description: Internal Server Error
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Server Error:
                  value:
                    success: false
                    message: Failed to update localization settings of the chatbot
                    data: null
                    error:
                      code: CHATBOT_LOCALIZATION_SETTINGS_UPDATE_FAILED
                      message: Some technical error has occurred !!
                      details: null
      operationId: update-chatbot-localization-settings
      description: Update localization settings of the chatbot
  /v0/chatbots/{chatbotId}/settings/personas:
    parameters:
      - schema:
          type: string
        name: chatbotId
        in: path
        required: true
        description: Id of the chatbot
    get:
      summary: Fetch All Chatbot Personas
      tags:
        - Chatbot Personas
      operationId: fetch-all-chatbot-personas
      description: Fetch all the personas of the chatbot
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                type: object
                description: Success Response
                properties:
                  success:
                    type: boolean
                    description: >-
                      Indicates whether this is success response or error
                      response
                  message:
                    type: string
                    description: Overall message regarding the operation performed
                  data:
                    type: object
                    description: Data returned from the server
                    properties:
                      personas:
                        type: array
                        items:
                          $ref: '#/components/schemas/ChatbotPersona'
              examples:
                Success:
                  value:
                    success: true
                    message: >-
                      Fetched all the custom personas of the chatbot
                      successfully
                    data:
                      personas:
                        - id: 505263b4-6b2a-499d-83de-a776b9a5130a
                          title: Serious
                          description: Serious persona
                          instructions: >-
                            You are a serious AI assistant who answers
                            seriously.
                        - id: f0207221-8535-4712-884a-ad4fd73d42a6
                          title: Custom
                          description: Custom Persona
                          instructions: Answer in an engaging and interactive way.
        '400':
          description: Bad Request
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Validation Error:
                  value:
                    success: false
                    message: Failed to fetch all the custom personas of the chatbot
                    data: null
                    error:
                      code: CHATBOT_ID_REQUIRED
                      message: chatbotId is required
                      details: null
        '401':
          description: Unauthorized
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Authentication Error:
                  value:
                    success: false
                    message: Failed to fetch all the custom personas of the chatbot
                    data: null
                    error:
                      code: API_KEY_NOT_VALID
                      message: Authorization header does not contain valid API key
                      details: null
        '403':
          description: Forbidden
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Forbidden Error:
                  value:
                    success: false
                    message: Failed to fetch all the custom personas of the chatbot
                    data: null
                    error:
                      code: FETCH_CHATBOT_PERSONAS_FORBIDDEN
                      message: >-
                        You are not authorized to fetch custom personas of the
                        chatbot
                      details: null
        '405':
          description: Method Not Allowed
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Method Not Allowed Error:
                  value:
                    success: false
                    message: Failed to fetch all the custom personas of the chatbot
                    data: null
                    error:
                      code: REQUEST_METHOD_NOT_ALLOWED
                      message: POST request method is not allowed
                      details: null
        '500':
          description: Internal Server Error
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Server Error:
                  value:
                    success: false
                    message: Failed to fetch all the custom personas of the chatbot
                    data: null
                    error:
                      code: FETCH_CHATBOT_PERSONAS_FAILED
                      message: Some technical error has occurred !!
                      details: null
    post:
      summary: Add Chatbot Persona
      operationId: add-chatbot-persona
      description: Add a custom persona to the chatbot
      requestBody:
        content:
          application/json:
            schema:
              type: object
              description: Request body
              properties:
                title:
                  type: string
                  description: Title of the persona.
                description:
                  type: string
                  description: Short description about the persona.
                instructions:
                  type: string
                  description: >-
                    Actual instructions that will be specified to the AI while
                    generating the response.
              required:
                - title
                - description
                - instructions
        description: Request Body to add a custom persona to the chatbot
      tags:
        - Chatbot Personas
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                type: object
                description: Success Response
                properties:
                  success:
                    type: boolean
                    description: >-
                      Indicates whether this is success response or error
                      response
                  message:
                    type: string
                    description: Overall message regarding the operation performed
                  data:
                    type: object
                    description: Data returned from the server
                    properties:
                      persona:
                        $ref: '#/components/schemas/ChatbotPersona'
              examples:
                Success:
                  value:
                    success: true
                    message: Added a custom persona to the chatbot successfully
                    data:
                      persona:
                        id: 8224ca11-5ec3-434c-bfcc-880dcf3990c8
                        title: Custom
                        description: Custom Persona
                        instructions: Answer in an engaging and interactive way.
        '400':
          description: Bad Request
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Validation Error 1:
                  value:
                    success: false
                    message: Failed to add a custom persona to the chatbot
                    data: null
                    error:
                      code: CHATBOT_ID_REQUIRED
                      message: chatbotId is required
                      details: null
                Validation Error 2:
                  value:
                    success: false
                    message: Failed to add a custom persona to the chatbot
                    data: null
                    error:
                      code: REQUEST_VALIDATION_FAILED
                      message: Request body is not valid
                      details:
                        - path:
                            - instructions
                          message: instructions is required
        '401':
          description: Unauthorized
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Authentication Error:
                  value:
                    success: false
                    message: Failed to add a custom persona to the chatbot
                    data: null
                    error:
                      code: API_KEY_NOT_VALID
                      message: Authorization header does not contain valid API key
                      details: null
        '403':
          description: Forbidden
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Forbidden Error:
                  value:
                    success: false
                    message: Failed to add a custom persona to the chatbot
                    data: null
                    error:
                      code: ADD_CHATBOT_PERSONA_FORBIDDEN
                      message: >-
                        You are not authorized to add a custom persona to this
                        chatbot
                      details: null
        '405':
          description: Method Not Allowed
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Method Not Allowed Error:
                  value:
                    success: false
                    message: Failed to add a custom persona to the chatbot
                    data: null
                    error:
                      code: REQUEST_METHOD_NOT_ALLOWED
                      message: PATCH request method is not allowed
                      details: null
        '500':
          description: Internal Server Error
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Server Error:
                  value:
                    success: false
                    message: Failed to add a custom persona to the chatbot
                    data: null
                    error:
                      code: ADD_CHATBOT_PERSONA_FAILED
                      message: Some technical error has occurred !!
                      details: null
  /v0/chatbots/{chatbotId}/settings/personas/{personaId}:
    parameters:
      - schema:
          type: string
        name: chatbotId
        in: path
        required: true
        description: Id of the chatbot
      - schema:
          type: string
        name: personaId
        in: path
        required: true
        description: Id of the chatbot persona
    get:
      summary: Fetch Chatbot Persona
      tags:
        - Chatbot Personas
      operationId: fetch-chatbot-persona
      description: Fetch a persona of the chatbot
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                type: object
                description: Success Response
                properties:
                  success:
                    type: boolean
                    description: >-
                      Indicates whether this is success response or error
                      response
                  message:
                    type: string
                    description: Overall message regarding the operation performed
                  data:
                    type: object
                    description: Data returned from the server
                    properties:
                      persona:
                        $ref: '#/components/schemas/ChatbotPersona'
              examples:
                Success Response:
                  value:
                    success: true
                    message: Fetched the custom persona of the chatbot successfully
                    data:
                      persona:
                        id: 8224ca11-5ec3-434c-bfcc-880dcf3990c8
                        title: Custom
                        description: Custom Persona
                        instructions: Answer in an engaging and interactive way.
        '400':
          description: Bad Request
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Validation Error:
                  value:
                    success: false
                    message: Failed to fetch custom persona of the chatbot
                    data: null
                    error:
                      code: CHATBOT_ID_REQUIRED
                      message: chatbotId is required
                      details: null
        '401':
          description: Unauthorized
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Authentication Error:
                  value:
                    success: false
                    message: Failed to fetch custom persona of the chatbot
                    data: null
                    error:
                      code: API_KEY_NOT_VALID
                      message: Authorization header does not contain valid API key
                      details: null
        '403':
          description: Forbidden
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Forbidden Error:
                  value:
                    success: false
                    message: Failed to fetch custom persona of the chatbot
                    data: null
                    error:
                      code: FETCH_CHATBOT_PERSONA_FORBIDDEN
                      message: >-
                        You are not authorized to fetch custom persona of the
                        chatbot
                      details: null
        '404':
          description: Not Found
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Not Found Error:
                  value:
                    success: false
                    message: Failed to fetch custom persona of the chatbot
                    data: null
                    error:
                      code: FETCH_CHATBOT_PERSONA_PERSONA_NOT_FOUND
                      message: Chatbot persona does not exists
                      details: null
        '405':
          description: Method Not Allowed
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Method Not Allowed Error:
                  value:
                    success: false
                    message: Failed to fetch custom persona of the chatbot
                    data: null
                    error:
                      code: REQUEST_METHOD_NOT_ALLOWED
                      message: POST request method is not allowed
                      details: null
        '500':
          description: Internal Server Error
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Server Error:
                  value:
                    success: false
                    message: Failed to fetch custom persona of the chatbot
                    data: null
                    error:
                      code: FETCH_CHATBOT_PERSONA_FAILED
                      message: Some technical error has occurred !!
                      details: null
    patch:
      summary: Update Chatbot Persona
      operationId: update-chatbot-persona
      description: Update custom persona of the chatbot
      requestBody:
        content:
          application/json:
            schema:
              type: object
              description: Request body
              properties:
                title:
                  type: string
                  description: Title of the persona.
                  nullable: true
                description:
                  type: string
                  description: Short description about the persona.
                  nullable: true
                instructions:
                  type: string
                  description: >-
                    Actual instructions that will be specified to the AI while
                    generating the response.
                  nullable: true
        description: Request body to update custom persona of the chatbot
      tags:
        - Chatbot Personas
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                type: object
                description: Success response
                properties:
                  success:
                    type: boolean
                    description: >-
                      Indicates whether this is success response or error
                      response
                  message:
                    type: string
                    description: Overall message regarding the operation performed
                  data:
                    type: object
                    description: Data returned from the server
                    properties:
                      persona:
                        $ref: '#/components/schemas/ChatbotPersona'
              examples:
                Success Response:
                  value:
                    success: true
                    message: Updated custom persona of the chatbot successfully
                    data:
                      persona:
                        id: 8224ca11-5ec3-434c-bfcc-880dcf3990c8
                        title: Custom
                        description: Custom Persona
                        instructions: Answer in an engaging and interactive way.
        '400':
          description: Bad Request
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Validation Error:
                  value:
                    success: false
                    message: Failed to update custom persona of the chatbot
                    data: null
                    error:
                      code: CHATBOT_ID_REQUIRED
                      message: chatbotId is required
                      details: null
                Validation Error 2:
                  value:
                    success: false
                    message: Failed to update custom persona of the chatbot
                    data: null
                    error:
                      code: REQUEST_VALIDATION_FAILED
                      message: Request body is not valid
                      details:
                        - path:
                            - instructions
                          message: instructions is required
        '401':
          description: Unauthorized
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Authentication Error:
                  value:
                    success: false
                    message: Failed to update custom persona of the chatbot
                    data: null
                    error:
                      code: API_KEY_NOT_VALID
                      message: Authorization header does not contain valid API key
                      details: null
        '403':
          description: Forbidden
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Forbidden Error:
                  value:
                    success: false
                    message: Failed to update custom persona of the chatbot
                    data: null
                    error:
                      code: UPDATE_CHATBOT_PERSONA_FORBIDDEN
                      message: >-
                        You are not authorized to update custom persona of this
                        chatbot
                      details: null
        '404':
          description: Not Found
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Not Found Error:
                  value:
                    success: false
                    message: Failed to update custom persona of the chatbot
                    data: null
                    error:
                      code: UPDATE_CHATBOT_PERSONA_PERSONA_NOT_FOUND
                      message: Chatbot persona does not exists
                      details: null
        '405':
          description: Method Not Allowed
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Method Not Allowed Error:
                  value:
                    success: false
                    message: Failed to update custom persona of the chatbot
                    data: null
                    error:
                      code: REQUEST_METHOD_NOT_ALLOWED
                      message: POST request method is not allowed
                      details: null
        '500':
          description: Internal Server Error
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Server Error:
                  value:
                    success: false
                    message: Failed to update custom persona of the chatbot
                    data: null
                    error:
                      code: UPDATE_CHATBOT_PERSONA_FAILED
                      message: Some technical error has occurred !!
                      details: null
    delete:
      summary: Delete Chatbot Persona
      operationId: delete-chatbot-persona
      description: Delete custom persona of the chatbot
      tags:
        - Chatbot Personas
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                type: object
                description: Success Response
                properties:
                  success:
                    type: boolean
                    description: >-
                      Indicates whether this is success response or error
                      response
                  message:
                    type: string
                    description: Overall message regarding the operation performed
                  data:
                    type: object
                    description: Data returned from the server
                    nullable: true
              examples:
                Success Response:
                  value:
                    success: true
                    message: Deleted custom persona of the chatbot successfully
                    data: null
        '400':
          description: Bad Request
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Validation Error:
                  value:
                    success: false
                    message: Failed to delete custom persona of the chatbot
                    data: null
                    error:
                      code: CHATBOT_ID_REQUIRED
                      message: chatbotId is required
                      details: null
        '401':
          description: Unauthorized
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Authentication Error:
                  value:
                    success: false
                    message: Failed to delete custom persona of the chatbot
                    data: null
                    error:
                      code: API_KEY_NOT_VALID
                      message: Authorization header does not contain valid API key
                      details: null
        '403':
          description: Forbidden
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Forbidden Error:
                  value:
                    success: false
                    message: Failed to delete custom persona of the chatbot
                    data: null
                    error:
                      code: DELETE_CHATBOT_PERSONA_FORBIDDEN
                      message: >-
                        You are not authorized to delete custom persona of this
                        chatbot
                      details: null
        '404':
          description: Not Found
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Not Found Error:
                  value:
                    success: false
                    message: Failed to delete custom persona of the chatbot
                    data: null
                    error:
                      code: DELETE_CHATBOT_PERSONA_PERSONA_NOT_FOUND
                      message: Chatbot persona does not exists
                      details: null
        '405':
          description: Method Not Allowed
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Method Not Allowed Error:
                  value:
                    success: false
                    message: Failed to delete custom persona of the chatbot
                    data: null
                    error:
                      code: REQUEST_METHOD_NOT_ALLOWED
                      message: POST request method is not allowed
                      details: null
        '500':
          description: Internal Server Error
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Server Error:
                  value:
                    success: false
                    message: Failed to delete custom persona of the chatbot
                    data: null
                    error:
                      code: DELETE_CHATBOT_PERSONA_FAILED
                      message: Some technical error has occurred !!
                      details: null
  /v0/chatbots/{chatbotId}/settings/personas/{personaId}/assign:
    parameters:
      - schema:
          type: string
        name: chatbotId
        in: path
        required: true
        description: Id of the chatbot
      - schema:
          type: string
        name: personaId
        in: path
        required: true
        description: Id of the chatbot persona
    post:
      summary: Assign Persona to Chatbot
      tags:
        - Chatbot Personas
      operationId: assign-persona-to-chatbot
      description: Assign persona to the chatbot
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                type: object
                description: Success Response
                properties:
                  success:
                    type: boolean
                    description: >-
                      Indicates whether this is success response or error
                      response
                  message:
                    type: string
                    description: Overall message regarding the operation performed
                  data:
                    type: object
                    description: Data returned from the server
                    nullable: true
              examples:
                Success Response:
                  value:
                    success: true
                    message: Assigned persona to the chatbot successfully
                    data: null
        '400':
          description: Bad Request
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Validation Error:
                  value:
                    success: false
                    message: Failed to assign persona to the chatbot
                    data: null
                    error:
                      code: CHATBOT_ID_REQUIRED
                      message: chatbotId is required
                      details: null
        '401':
          description: Unauthorized
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Authentication Error:
                  value:
                    success: false
                    message: Failed to assign persona to the chatbot
                    data: null
                    error:
                      code: API_KEY_NOT_VALID
                      message: Authorization header does not contain valid API key
                      details: null
        '403':
          description: Forbidden
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Forbidden Error:
                  value:
                    success: false
                    message: Failed to assign persona to the chatbot
                    data: null
                    error:
                      code: ASSIGN_PERSONA_TO_CHATBOT_FORBIDDEN
                      message: You are not authorized to assign persona to the chatbot
                      details: null
        '404':
          description: Not Found
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Not Found Error:
                  value:
                    success: false
                    message: Failed to assign persona to the chatbot
                    data: null
                    error:
                      code: ASSIGN_PERSONA_TO_CHATBOT_PERSONA_NOT_FOUND
                      message: Chatbot persona does not exists
                      details: null
        '405':
          description: Method Not Allowed
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Method Not Allowed Error:
                  value:
                    success: false
                    message: Failed to assign persona to the chatbot
                    data: null
                    error:
                      code: REQUEST_METHOD_NOT_ALLOWED
                      message: PATCH request method is not allowed
                      details: null
        '500':
          description: Internal Server Error
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Server Error:
                  value:
                    success: false
                    message: Failed to assign persona to the chatbot
                    data: null
                    error:
                      code: ASSIGN_PERSONA_TO_CHATBOT_FAILED
                      message: Some technical error has occurred !!
                      details: null
  /v0/chatbots/{chatbotId}/settings/prompts:
    parameters:
      - schema:
          type: string
        name: chatbotId
        in: path
        required: true
        description: Id of the chatbot
    get:
      summary: Fetch All Chatbot Prompts
      tags:
        - Chatbot Prompts
      operationId: fetch-all-chatbot-prompts
      description: Fetch all the prompts of the chatbot
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                type: object
                description: Success Response
                properties:
                  success:
                    type: boolean
                    description: >-
                      Indicates whether this is success response or error
                      response
                  message:
                    type: string
                    description: Overall message regarding the operation performed
                  data:
                    type: object
                    description: Data returned from the server
                    properties:
                      prompts:
                        type: array
                        items:
                          $ref: '#/components/schemas/ChatbotPrompt'
              examples:
                Success:
                  value:
                    success: true
                    message: Fetched all the custom prompts of the chatbot successfully
                    data:
                      prompts:
                        - id: 78ac8ecd-d889-4700-8c8c-162c92731ff9
                          title: Custom
                          description: Custom Prompt
                          instructions: >-
                            You are an AI assistant which answers users
                            questions.
                          temperature: 0.3
                        - id: f7c45e2b-fbaf-479b-9f0b-e31a401bab3a
                          title: Custom Prompt
                          description: >-
                            This prompt has been created from your previous
                            system/user prompt
                          instructions: >-
                            You are an AI assistant which answers users
                            questions based on the website content. You should
                            summarize and rephrase from the content.

                            We have also configured some functions in this
                            chatbot. At any point of time, the user may try to
                            execute one of these functions. So, please execute
                            those functions accordingly whenever necessary.
                          temperature: 0.5
        '400':
          description: Bad Request
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Validation Error:
                  value:
                    success: false
                    message: Failed to fetch all the custom prompts of the chatbot
                    data: null
                    error:
                      code: CHATBOT_ID_REQUIRED
                      message: chatbotId is required
                      details: null
        '401':
          description: Unauthorized
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Authentication Error:
                  value:
                    success: false
                    message: Failed to fetch all the custom prompts of the chatbot
                    data: null
                    error:
                      code: API_KEY_NOT_VALID
                      message: Authorization header does not contain valid API key
                      details: null
        '403':
          description: Forbidden
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Forbidden Error:
                  value:
                    success: false
                    message: Failed to fetch all the custom prompts of the chatbot
                    data: null
                    error:
                      code: FETCH_CHATBOT_PROMPTS_FORBIDDEN
                      message: >-
                        You are not authorized to fetch custom prompts of the
                        chatbot
                      details: null
        '405':
          description: Method Not Allowed
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Method Not Allowed Error:
                  value:
                    success: false
                    message: Failed to fetch all the custom prompts of the chatbot
                    data: null
                    error:
                      code: REQUEST_METHOD_NOT_ALLOWED
                      message: POST request method is not allowed
                      details: null
        '500':
          description: Internal Server Error
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Server Error:
                  value:
                    success: false
                    message: Failed to fetch all the custom prompts of the chatbot
                    data: null
                    error:
                      code: FETCH_CHATBOT_PROMPTS_FAILED
                      message: Some technical error has occurred !!
                      details: null
    post:
      summary: Add Chatbot Prompt
      operationId: add-chatbot-prompt
      description: Add a custom prompt to the chatbot
      requestBody:
        content:
          application/json:
            schema:
              type: object
              description: Request body
              properties:
                title:
                  type: string
                  description: Title of the prompt.
                description:
                  type: string
                  description: Short description about the prompt.
                instructions:
                  type: string
                  description: >-
                    Actual instructions that will be specified to the AI while
                    generating the response.
                temperature:
                  type: string
                  description: >-
                    Decides creativity level of the chatbot response. 0 is more
                    focused and 1 is more creative/random.
              required:
                - title
                - description
                - instructions
                - temperature
        description: Request Body to add a custom prompt to the chatbot
      tags:
        - Chatbot Prompts
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                type: object
                description: Success Response
                properties:
                  success:
                    type: boolean
                    description: >-
                      Indicates whether this is success response or error
                      response
                  message:
                    type: string
                    description: Overall message regarding the operation performed
                  data:
                    type: object
                    description: Data returned from the server
                    properties:
                      prompt:
                        $ref: '#/components/schemas/ChatbotPrompt'
              examples:
                Success:
                  value:
                    success: true
                    message: Added a custom prompt to the chatbot successfully
                    data:
                      prompt:
                        id: c50191ee-85d0-4f46-9448-3ab74441c9fb
                        title: Random
                        description: Prompt for random replies
                        instructions: >-
                          You are an AI assistant who provides random answers
                          for all the questions asked.
                        temperature: 0.99
        '400':
          description: Bad Request
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Validation Error 1:
                  value:
                    success: false
                    message: Failed to add a custom prompt to the chatbot
                    data: null
                    error:
                      code: CHATBOT_ID_REQUIRED
                      message: chatbotId is required
                      details: null
                Validation Error 2:
                  value:
                    success: false
                    message: Failed to add a custom prompt to the chatbot
                    data: null
                    error:
                      code: REQUEST_VALIDATION_FAILED
                      message: Request body is not valid
                      details:
                        - path:
                            - temperature
                          message: Number must be less than or equal to 1
        '401':
          description: Unauthorized
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Authentication Error:
                  value:
                    success: false
                    message: Failed to add a custom prompt to the chatbot
                    data: null
                    error:
                      code: API_KEY_NOT_VALID
                      message: Authorization header does not contain valid API key
                      details: null
        '403':
          description: Forbidden
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Forbidden Error:
                  value:
                    success: false
                    message: Failed to add a custom prompt to the chatbot
                    data: null
                    error:
                      code: ADD_CHATBOT_PROMPT_FORBIDDEN
                      message: >-
                        You are not authorized to add a custom prompt to this
                        chatbot
                      details: null
        '405':
          description: Method Not Allowed
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Method Not Allowed Error:
                  value:
                    success: false
                    message: Failed to add a custom prompt to the chatbot
                    data: null
                    error:
                      code: REQUEST_METHOD_NOT_ALLOWED
                      message: PATCH request method is not allowed
                      details: null
        '500':
          description: Internal Server Error
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Server Error:
                  value:
                    success: false
                    message: Failed to add a custom prompt to the chatbot
                    data: null
                    error:
                      code: ADD_CHATBOT_PROMPT_FAILED
                      message: Some technical error has occurred !!
                      details: null
  /v0/chatbots/{chatbotId}/settings/prompts/{promptId}:
    parameters:
      - schema:
          type: string
        name: chatbotId
        in: path
        required: true
        description: Id of the chatbot
      - schema:
          type: string
        name: promptId
        in: path
        required: true
        description: Id of the chatbot prompt
    get:
      summary: Fetch Chatbot Prompt
      tags:
        - Chatbot Prompts
      operationId: fetch-chatbot-prompt
      description: Fetch a prompt of the chatbot
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                type: object
                description: Success Response
                properties:
                  success:
                    type: boolean
                    description: >-
                      Indicates whether this is success response or error
                      response
                  message:
                    type: string
                    description: Overall message regarding the operation performed
                  data:
                    type: object
                    description: Data returned from the server
                    properties:
                      prompt:
                        $ref: '#/components/schemas/ChatbotPrompt'
              examples:
                Success Response:
                  value:
                    success: true
                    message: Fetched the custom prompt of the chatbot successfully
                    data:
                      prompt:
                        id: 78ac8ecd-d889-4700-8c8c-162c92731ff9
                        title: Custom
                        description: Custom Prompt
                        instructions: You are an AI assistant which answers users questions.
                        temperature: 0.3
        '400':
          description: Bad Request
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Validation Error:
                  value:
                    success: false
                    message: Failed to fetch custom prompt of the chatbot
                    data: null
                    error:
                      code: CHATBOT_ID_REQUIRED
                      message: chatbotId is required
                      details: null
        '401':
          description: Unauthorized
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Authentication Error:
                  value:
                    success: false
                    message: Failed to fetch custom prompt of the chatbot
                    data: null
                    error:
                      code: API_KEY_NOT_VALID
                      message: Authorization header does not contain valid API key
                      details: null
        '403':
          description: Forbidden
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Forbidden Error:
                  value:
                    success: false
                    message: Failed to fetch custom prompt of the chatbot
                    data: null
                    error:
                      code: FETCH_CHATBOT_PROMPT_FORBIDDEN
                      message: >-
                        You are not authorized to fetch custom prompt of the
                        chatbot
                      details: null
        '404':
          description: Not Found
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Not Found Error:
                  value:
                    success: false
                    message: Failed to fetch custom prompt of the chatbot
                    data: null
                    error:
                      code: FETCH_CHATBOT_PROMPT_PROMPT_NOT_FOUND
                      message: Chatbot prompt does not exists
                      details: null
        '405':
          description: Method Not Allowed
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Method Not Allowed Error:
                  value:
                    success: false
                    message: Failed to fetch custom prompt of the chatbot
                    data: null
                    error:
                      code: REQUEST_METHOD_NOT_ALLOWED
                      message: POST request method is not allowed
                      details: null
        '500':
          description: Internal Server Error
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Server Error:
                  value:
                    success: false
                    message: Failed to fetch custom prompt of the chatbot
                    data: null
                    error:
                      code: FETCH_CHATBOT_PROMPT_FAILED
                      message: Some technical error has occurred !!
                      details: null
    patch:
      summary: Update Chatbot Prompt
      operationId: update-chatbot-prompt
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                type: object
                description: Success response
                properties:
                  success:
                    type: boolean
                    description: >-
                      Indicates whether this is success response or error
                      response
                  message:
                    type: string
                    description: Overall message regarding the operation performed
                  data:
                    type: object
                    description: Data returned from the server
                    properties:
                      prompt:
                        $ref: '#/components/schemas/ChatbotPrompt'
              examples:
                Success Response:
                  value:
                    success: true
                    message: Updated custom prompt of the chatbot successfully
                    data:
                      prompt:
                        id: c50191ee-85d0-4f46-9448-3ab74441c9fb
                        title: Random
                        description: Prompt for random replies
                        instructions: >-
                          You are an AI assistant who provides random answers
                          for all the questions asked.
                        temperature: 0.95
        '400':
          description: Bad Request
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Validation Error:
                  value:
                    success: false
                    message: Failed to update custom prompt of the chatbot
                    data: null
                    error:
                      code: CHATBOT_ID_REQUIRED
                      message: chatbotId is required
                      details: null
                Validation Error 2:
                  value:
                    success: false
                    message: Failed to update custom prompt of the chatbot
                    data: null
                    error:
                      code: REQUEST_VALIDATION_FAILED
                      message: Request body is not valid
                      details:
                        - path:
                            - temperature
                          message: Number must be less than or equal to 1
        '401':
          description: Unauthorized
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Authentication Error:
                  value:
                    success: false
                    message: Failed to update custom prompt of the chatbot
                    data: null
                    error:
                      code: API_KEY_NOT_VALID
                      message: Authorization header does not contain valid API key
                      details: null
        '403':
          description: Forbidden
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Forbidden Error:
                  value:
                    success: false
                    message: Failed to update custom prompt of the chatbot
                    data: null
                    error:
                      code: UPDATE_CHATBOT_PROMPT_FORBIDDEN
                      message: >-
                        You are not authorized to update custom prompt of this
                        chatbot
                      details: null
        '404':
          description: Not Found
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Not Found Error:
                  value:
                    success: false
                    message: Failed to update custom prompt of the chatbot
                    data: null
                    error:
                      code: CHATBOT_PROMPT_NOT_FOUND
                      message: Chatbot prompt does not exists
                      details: null
        '405':
          description: Method Not Allowed
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Method Not Allowed Error:
                  value:
                    success: false
                    message: Failed to update custom prompt of the chatbot
                    data: null
                    error:
                      code: REQUEST_METHOD_NOT_ALLOWED
                      message: PATCH request method is not allowed
                      details: null
        '500':
          description: Internal Server Error
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Server Error:
                  value:
                    success: false
                    message: Failed to update custom prompt of the chatbot
                    data: null
                    error:
                      code: UPDATE_CHATBOT_PROMPT_FAILED
                      message: Some technical error has occurred !!
                      details: null
      description: Update custom prompt of the chatbot
      requestBody:
        content:
          application/json:
            schema:
              type: object
              description: Request body
              properties:
                title:
                  type: string
                  description: Title of the prompt.
                  nullable: true
                description:
                  type: string
                  description: Short description about the prompt.
                  nullable: true
                instructions:
                  type: string
                  description: >-
                    Actual instructions that will be specified to the AI while
                    generating the response.
                  nullable: true
                temperature:
                  type: number
                  description: >-
                    Decides creativity level of the chatbot response. 0 is more
                    focused and 1 is more creative/random.
                  nullable: true
        description: Request body to update custom prompt of the chatbot
      tags:
        - Chatbot Prompts
    delete:
      summary: Delete Chatbot Prompt
      operationId: delete-chatbot-prompt
      description: Delete custom prompt of the chatbot
      tags:
        - Chatbot Prompts
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                type: object
                description: Success Response
                properties:
                  success:
                    type: boolean
                    description: >-
                      Indicates whether this is success response or error
                      response
                  message:
                    type: string
                    description: Overall message regarding the operation performed
                  data:
                    type: object
                    description: Data returned from the server
                    nullable: true
              examples:
                Success Response:
                  value:
                    success: true
                    message: Deleted custom prompt of the chatbot successfully
                    data: null
        '400':
          description: Bad Request
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Validation Error:
                  value:
                    success: false
                    message: Failed to delete custom prompt of the chatbot
                    data: null
                    error:
                      code: CHATBOT_ID_REQUIRED
                      message: chatbotId is required
                      details: null
        '401':
          description: Unauthorized
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Authentication Error:
                  value:
                    success: false
                    message: Failed to delete custom prompt of the chatbot
                    data: null
                    error:
                      code: API_KEY_NOT_VALID
                      message: Authorization header does not contain valid API key
                      details: null
        '403':
          description: Forbidden
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Forbidden Error:
                  value:
                    success: false
                    message: Failed to delete custom prompt of the chatbot
                    data: null
                    error:
                      code: DELETE_CHATBOT_PROMPT_FORBIDDEN
                      message: >-
                        You are not authorized to delete custom prompt of this
                        chatbot
                      details: null
        '404':
          description: Not Found
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Not Found Error:
                  value:
                    success: false
                    message: Failed to delete custom prompt of the chatbot
                    data: null
                    error:
                      code: CHATBOT_PROMPT_NOT_FOUND
                      message: Chatbot prompt does not exists
                      details: null
        '405':
          description: Method Not Allowed
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Method Not Allowed Error:
                  value:
                    success: false
                    message: Failed to delete custom prompt of the chatbot
                    data: null
                    error:
                      code: REQUEST_METHOD_NOT_ALLOWED
                      message: POST request method is not allowed
                      details: null
        '500':
          description: Internal Server Error
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Server Error:
                  value:
                    success: false
                    message: Failed to delete custom prompt of the chatbot
                    data: null
                    error:
                      code: DELETE_CHATBOT_PROMPT_FAILED
                      message: Some technical error has occurred !!
                      details: null
  /v0/chatbots/{chatbotId}/settings/prompts/{promptId}/assign:
    parameters:
      - schema:
          type: string
        name: chatbotId
        in: path
        required: true
        description: Id of the chatbot
      - schema:
          type: string
        name: promptId
        in: path
        required: true
        description: Id of the chatbot prompt
    post:
      summary: Assign Prompt to Chatbot
      tags:
        - Chatbot Prompts
      operationId: assign-prompt-to-chatbot
      description: Assign prompt to the chatbot
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                type: object
                description: Success Response
                properties:
                  success:
                    type: boolean
                    description: >-
                      Indicates whether this is success response or error
                      response
                  message:
                    type: string
                    description: Overall message regarding the operation performed
                  data:
                    type: object
                    description: Data returned from the server
                    nullable: true
              examples:
                Success Response:
                  value:
                    success: true
                    message: Assigned prompt to the chatbot successfully
                    data: null
        '400':
          description: Bad Request
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Validation Error:
                  value:
                    success: false
                    message: Failed to assign prompt to the chatbot
                    data: null
                    error:
                      code: CHATBOT_ID_REQUIRED
                      message: chatbotId is required
                      details: null
        '401':
          description: Unauthorized
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Authentication Error:
                  value:
                    success: false
                    message: Failed to assign prompt to the chatbot
                    data: null
                    error:
                      code: API_KEY_NOT_VALID
                      message: Authorization header does not contain valid API key
                      details: null
        '403':
          description: Forbidden
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Forbidden Error:
                  value:
                    success: false
                    message: Failed to assign prompt to the chatbot
                    data: null
                    error:
                      code: ASSIGN_PROMPT_TO_CHATBOT_FORBIDDEN
                      message: You are not authorized to assign prompt to the chatbot
                      details: null
        '404':
          description: Not Found
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Not Found Error:
                  value:
                    success: false
                    message: Failed to assign prompt to the chatbot
                    data: null
                    error:
                      code: ASSIGN_PROMPT_TO_CHATBOT_PROMPT_NOT_FOUND
                      message: Chatbot prompt does not exists
                      details: null
        '405':
          description: Method Not Allowed
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Method Not Allowed Error:
                  value:
                    success: false
                    message: Failed to assign prompt to the chatbot
                    data: null
                    error:
                      code: REQUEST_METHOD_NOT_ALLOWED
                      message: PATCH request method is not allowed
                      details: null
        '500':
          description: Internal Server Error
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Server Error:
                  value:
                    success: false
                    message: Failed to assign prompt to the chatbot
                    data: null
                    error:
                      code: ASSIGN_PROMPT_TO_CHATBOT_FAILED
                      message: Some technical error has occurred !!
                      details: null
  /v0/chatbots/{chatbotId}/settings/user-data:
    patch:
      tags:
        - Chatbot Settings
      summary: Update Chatbot Settings - User Data
      requestBody:
        content:
          application/json:
            schema:
              type: object
              description: Request Body
              properties:
                collectUserDetails:
                  $ref: '#/components/schemas/CollectUserDetails'
                collectName:
                  type: boolean
                  description: Indicates whether to collect user name or not
                collectPhone:
                  type: boolean
                  description: Indicates whether to collect user phone number or not
            examples:
              Request Body:
                value:
                  collectUserDetails: DO_NOT_COLLECT
                  collectName: false
                  collectPhone: false
        description: Request body to update user-data settings of the chatbot
      parameters:
        - name: chatbotId
          description: Id of the chatbot
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                type: object
                description: Success Response
                properties:
                  success:
                    type: boolean
                    description: >-
                      Indicates whether this is success response or error
                      response
                  message:
                    type: string
                    description: Overall message regarding the operation performed
                  data:
                    type: object
                    description: Data returned from the server
                    nullable: true
              examples:
                Success:
                  value:
                    success: true
                    message: Updated user-data settings of the chatbot successfully
                    data: {}
        '400':
          description: Bad Request
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Validation Error:
                  value:
                    success: false
                    message: Failed to update user-data settings of the chatbot
                    data: null
                    error:
                      code: CHATBOT_ID_REQUIRED
                      message: chatbotId is required
                      details: null
                Invalid Request Body:
                  value:
                    success: false
                    message: Failed to update user-data settings of the chatbot
                    data: null
                    error:
                      code: REQUEST_VALIDATION_FAILED
                      message: Request body is not valid
                      details:
                        - path:
                            - collectUserDetails
                          message: >-
                            Invalid enum value. Expected `MANDATORY` |
                            `OPTIONAL` | `DO_NOT_COLLECT`, received
                            `DO_NOT_COLLEC`
        '401':
          description: Unauthorized
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Authentication Error:
                  value:
                    success: false
                    message: Failed to update user-data settings of the chatbot
                    data: null
                    error:
                      code: API_KEY_NOT_VALID
                      message: Authorization header does not contain valid API key
                      details: null
        '403':
          description: Forbidden
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Forbidden Error:
                  value:
                    success: false
                    message: Failed to update user-data settings of the chatbot
                    data: null
                    error:
                      code: CHATBOT_USER_DATA_SETTINGS_UPDATE_FORBIDDEN
                      message: >-
                        You are not authorized to update user-data settings of
                        this chatbot
                      details: null
        '405':
          description: Method Not Allowed
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Method Not Allowed Error:
                  value:
                    success: false
                    message: Failed to update user-data settings of the chatbot
                    data: null
                    error:
                      code: REQUEST_METHOD_NOT_ALLOWED
                      message: POST request method is not allowed
                      details: null
        '500':
          description: Internal Server Error
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Server Error:
                  value:
                    success: false
                    message: Failed to update user-data settings of the chatbot
                    data: null
                    error:
                      code: CHATBOT_USER_DATA_SETTINGS_UPDATE_FAILED
                      message: Some technical error has occurred !!
                      details: null
      operationId: update-chatbot-user-data-settings
      description: Update user-data settings of the chatbot
  /v0/chatbots/{chatbotId}/threads:
    get:
      tags:
        - Chatbot Threads
      summary: Fetch All Threads
      parameters:
        - name: chatbotId
          description: Id of the chatbot
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                type: object
                description: Success Response
                properties:
                  success:
                    type: boolean
                    description: >-
                      Indicates whether this is success response or error
                      response
                  message:
                    type: string
                    description: Overall message regarding the operation performed
                  data:
                    type: object
                    description: Data returned from the server
                    properties:
                      threads:
                        type: array
                        description: List of threads of the chatbot
                        items:
                          $ref: '#/components/schemas/ThinThread'
              examples:
                Success:
                  value:
                    success: true
                    message: Fetched the chatbot threads successfully
                    data:
                      threads:
                        - threadId: 06b3b43c-5651-49a2-b618-d7f24667c1b6
                          startedAt: '2023-05-18T11:39:57.349750Z'
                          updatedAt: '2023-05-18T11:39:57.349750Z'
                          endedAt: '2023-05-18T11:39:57.349750Z'
                          chatUser: null
                          escalated: false
                          important: false
                          resolved: false
                          totalMessagesRead: 47
                          lastMessage:
                            answer:
                              text: This is agent!!
                              timestamp: '2023-07-10T14:41:46.808649Z'
                            sources: []
                            reaction: NEUTRAL
                            threadId: 06b3b43c-5651-49a2-b618-d7f24667c1b6
                            messageType: AGENT_MESSAGE
                            prompts:
                              - id: f3792c3c-5814-4dec-b530-55e1611951a9
                                title: Prompt 1
                                description: This is the prompt1 description
                              - id: 64d7fb10-847a-4dd7-8b5b-821fca199606
                                title: Prompt 2
                                description: This is the prompt2 description
                            messageId: '369876016179446353'
                            question: null
                            chatbotId: '365062873485935184'
                          totalMessages: 47
                          totalPositiveMessages: 0
                          totalNegativeMessages: 0
                          totalGpt4MessagesCount: 0
                        - threadId: 88d6c628-c108-4ca7-9578-0424461c0832
                          startedAt: '2023-05-19T14:33:08.252701Z'
                          updatedAt: '2023-05-19T14:33:08.252701Z'
                          endedAt: '2023-05-19T14:33:08.252701Z'
                          chatUser: null
                          escalated: false
                          important: false
                          resolved: false
                          totalMessagesRead: 0
                          lastMessage:
                            question:
                              text: This is bot
                              timestamp: '2023-05-19T14:33:08.771854Z'
                            sources: []
                            reaction: NEUTRAL
                            threadId: 88d6c628-c108-4ca7-9578-0424461c0832
                            messageType: USER_MESSAGE
                            iconUrl: >-
                              https://avatars.githubusercontent.com/u/17903466?s=48&v=4
                            messageId: '365164430725481040'
                            answer: null
                            chatbotId: '365062873485935184'
                            prompts: []
                          totalMessages: 1
                          totalPositiveMessages: 0
                          totalNegativeMessages: 0
                          totalGpt4MessagesCount: 0
                        - threadId: 1ca901e8-dab9-4e8f-ac24-80b557e89742
                          startedAt: '2023-05-18T11:47:48.313693Z'
                          updatedAt: '2023-05-18T11:47:48.313693Z'
                          endedAt: '2023-05-18T11:47:48.313693Z'
                          chatUser: null
                          escalated: false
                          important: false
                          resolved: false
                          totalMessagesRead: 0
                          lastMessage:
                            question:
                              text: Hello, what is this?
                              timestamp: '2023-05-18T11:47:57.194303Z'
                            answer:
                              text: >-
                                This is a website where you can find information
                                on various topics. Please browse our pages to
                                learn more.
                              timestamp: '2023-05-18T11:47:57.194303Z'
                            gptModel: gpt-3.5-turbo
                            sources: []
                            reaction: NEUTRAL
                            threadId: 1ca901e8-dab9-4e8f-ac24-80b557e89742
                            messageType: NORMAL_MESSAGE
                            messageId: '365063440720462416'
                            chatbotId: '365062873485935184'
                            prompts: []
                          totalMessages: 1
                          totalPositiveMessages: 0
                          totalNegativeMessages: 0
                          totalGpt4MessagesCount: 0
        '400':
          description: Bad Request
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Validation Error:
                  value:
                    success: false
                    message: Failed to fetch the chatbot threads
                    error:
                      code: CHATBOT_ID_REQUIRED
                      message: chatbotId field is required
                      details: null
        '401':
          description: Unauthorized
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Authentication Error:
                  value:
                    success: false
                    message: Failed to fetch the chatbot threads
                    error:
                      code: API_KEY_NOT_VALID
                      message: Authorization header does not contain valid API key
                      details: null
        '403':
          description: Forbidden
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Forbidden Error:
                  value:
                    success: false
                    message: Failed to fetch the chatbot threads
                    data: null
                    error:
                      code: FETCH_CHATBOT_THREADS_FORBIDDEN
                      message: You are not authorized to fetch this chatbot threads
                      details: null
        '405':
          description: Method Not Allowed
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Method Not Allowed Error:
                  value:
                    success: false
                    message: Failed to fetch the chatbot threads
                    data: null
                    error:
                      code: REQUEST_METHOD_NOT_ALLOWED
                      message: PATCH request method is not allowed
                      details: null
        '500':
          description: Internal Server Error
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Server Error:
                  value:
                    success: false
                    message: Failed to fetch the chatbot threads
                    data: null
                    error:
                      code: FETCH_CHATBOT_THREADS_FAILED
                      message: Some technical error has occurred !!
                      details: null
      operationId: fetch-all-chatbot-threads
      description: Fetch all threads of the chatbot
    parameters:
      - schema:
          type: string
        name: chatbotId
        in: path
        required: true
        description: Id of the chatbot
    post:
      summary: Create Thread
      tags:
        - Chatbot Threads
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: >-
                      Indicates whether this is success response or error
                      response
                  message:
                    type: string
                    description: Overall message regarding the operation performed
                  data:
                    type: object
                    description: Data returned from the server
                    properties:
                      thread:
                        $ref: '#/components/schemas/Thread'
              examples:
                Success Response:
                  value:
                    success: true
                    message: Created the chatbot thread successfully
                    data:
                      thread:
                        threadId: d2cd2d88-bac1-48de-a7b4-19797451f47g
                        mode: AI
                        messages: []
                        startedAt: '2024-05-07T06:26:01.674375Z'
                        updatedAt: '2024-05-07T06:26:01.674375Z'
                        chatUserId: null
                        chatbotId: '361628903185318481'
                        chatUser: null
        '400':
          description: Bad Request
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Validation Error - 1:
                  value:
                    success: false
                    message: Failed to create the chatbot thread
                    data: null
                    error:
                      code: CHATBOT_ID_REQUIRED
                      message: chatbotId field is required
                      details: null
                Validation Error - 2:
                  value:
                    success: false
                    message: Failed to create the chatbot thread
                    data: null
                    error:
                      code: REQUEST_VALIDATION_FAILED
                      message: Request body is not valid
                      details:
                        - path:
                            - chatUserEmail
                          message: Expected string, received number
        '401':
          description: Unauthorized
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Authentication Error:
                  value:
                    success: false
                    message: Failed to create the chatbot thread
                    error:
                      code: API_KEY_NOT_VALID
                      message: Authorization header does not contain valid API key
                      details: null
        '403':
          description: Forbidden
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Forbidden Error:
                  value:
                    success: false
                    message: Failed to create the chatbot thread
                    data: null
                    error:
                      code: CREATE_CHATBOT_THREAD_FORBIDDEN
                      message: You are not authorized to create the chatbot thread
                      details: null
        '405':
          description: Method Not Allowed
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Method Not Allowed Error:
                  value:
                    success: false
                    message: Failed to create the chatbot thread
                    data: null
                    error:
                      code: REQUEST_METHOD_NOT_ALLOWED
                      message: PATCH request method is not allowed
                      details: null
        '500':
          description: Internal Server Error
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Server Error - 1:
                  value:
                    success: false
                    message: Failed to create the chatbot thread
                    data: null
                    error:
                      code: CHATBOT_THREAD_ALREADY_EXISTS
                      message: Thread already exists for the chatbot with this threadId
                Server Error - 2:
                  value:
                    success: false
                    message: Failed to create the chatbot thread
                    data: null
                    error:
                      code: CREATE_CHATBOT_THREAD_FAILED
                      message: Some technical error has occurred !!
      operationId: create-chatbot-thread
      description: Create an empty thread of the chatbot.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                threadId:
                  type: string
                  description: >-
                    If you pass the threadId, new thread will be created with
                    this threadId. Otherwise, random threadId will be generated.
                  nullable: true
                mode:
                  $ref: '#/components/schemas/ChatMode'
                chatUserEmail:
                  type: string
                  description: Email of the user that is going to chat in the thread.
                  nullable: true
            examples:
              Request Body:
                value:
                  threadId: xyz
                  mode: AI
                  chatUserEmail: null
        description: Request Body
  /v0/chatbots/{chatbotId}/threads/{threadId}:
    get:
      summary: Fetch Thread
      parameters:
        - name: chatbotId
          description: Id of the chatbot
          in: path
          schema:
            type: string
          required: true
        - name: threadId
          description: Id of the chatbot thread
          in: path
          schema:
            type: string
          required: true
        - schema:
            type: boolean
          in: query
          name: skipMessages
          description: Parameter to identify if messages needs to be returned or not
        - schema:
            type: boolean
          in: query
          name: includeChatUser
          description: >-
            Parameter to identify if chat user details needs to be returned or
            not
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                type: object
                description: Success Response
                properties:
                  success:
                    type: boolean
                    description: >-
                      Indicates whether this is success response or error
                      response
                  message:
                    type: string
                    description: Overall message regarding the operation performed
                  data:
                    type: object
                    description: Data returned from the server
                    properties:
                      thread:
                        $ref: '#/components/schemas/Thread'
              examples:
                Success:
                  value:
                    success: true
                    message: Fetched the thread successfully
                    data:
                      thread:
                        threadId: 06b3b43c-5651-49a2-b618-d7f24667c1b6
                        mode: AI
                        messages:
                          - messageId: '365062948587045457'
                            question:
                              text: Hello, what is this?
                              timestamp: '2023-05-18T11:40:07.857030Z'
                            answer:
                              text: >-
                                Hello! I am an AI assistant designed to provide
                                information about the website's content. If you
                                have any specific questions, feel free to ask
                                and I will do my best to provide accurate
                                answers.
                              timestamp: '2023-05-18T11:40:07.857030Z'
                            reaction: NEUTRAL
                            sources: []
                            messageType: NORMAL_MESSAGE
                            systemMessageType: CONVERSATION_ESCALATED
                            iconUrl: null
                            prompts: []
                            gptModel: gpt-3.5-turbo
                          - messageId: '365064286366597712'
                            question:
                              text: Hi
                              timestamp: '2023-05-18T12:01:23.667033Z'
                            answer: null
                            reaction: NEUTRAL
                            sources: []
                            messageType: USER_MESSAGE
                            systemMessageType: CONVERSATION_ESCALATED
                            iconUrl: null
                            prompts: []
                            gptModel: gpt-3.5-turbo
                          - messageId: '365064310572974672'
                            question: null
                            answer:
                              text: YO
                              timestamp: '2023-05-18T12:01:46.751791Z'
                            reaction: NEUTRAL
                            sources: []
                            messageType: AGENT_MESSAGE
                            systemMessageType: CONVERSATION_ESCALATED
                            iconUrl: null
                            prompts: []
                            gptModel: gpt-3.5-turbo
                        startedAt: '2023-05-18T11:39:57.349750Z'
                        updatedAt: '2023-05-18T11:39:57.349750Z'
                        webhookUrl: https://hooks.zapier.com/hooks/catch/15695697/3hqs23e
                        totalMessagesRead: 47
                        chatUserId: null
                        chatbotId: '365062873485935184'
                        chatUser: null
        '400':
          description: Bad Request
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Validation Error:
                  value:
                    success: false
                    message: Failed to fetch the chatbot thread
                    data: null
                    error:
                      code: THREAD_ID_REQUIRED
                      message: threadId field is required
                      details: null
        '401':
          description: Unauthorized
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Authentication Error:
                  value:
                    success: false
                    message: Failed to fetch the chatbot thread
                    error:
                      code: API_KEY_NOT_VALID
                      message: Authorization header does not contain valid API key
                      details: null
        '403':
          description: Forbidden
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Forbidden Error:
                  value:
                    success: false
                    message: Failed to fetch the chatbot thread
                    data: null
                    error:
                      code: FETCH_CHATBOT_THREAD_FORBIDDEN
                      message: You are not authorized to fetch this chatbot thread
                      details: null
        '404':
          description: Not Found
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Not Found Error:
                  value:
                    success: false
                    message: Failed to fetch the chatbot thread
                    data: null
                    error:
                      code: CHATBOT_THREAD_NOT_FOUND
                      message: Chatbot thread does not exist for threadId=1234567890
                      details: null
        '405':
          description: Method Not Allowed
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Method Not Allowed Error:
                  value:
                    success: false
                    message: Failed to fetch the chatbot thread
                    data: null
                    error:
                      code: REQUEST_METHOD_NOT_ALLOWED
                      message: PATCH request method is not allowed
                      details: null
        '500':
          description: Internal Server Error
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Server Error:
                  value:
                    success: false
                    message: Failed to fetch the chatbot thread
                    data: null
                    error:
                      code: FETCH_CHATBOT_THREAD_FAILED
                      message: Some technical error has occurred !!
                      details: null
      description: Fetch a single thread of the chatbot
      operationId: fetch-chatbot-thread
      tags:
        - Chatbot Threads
    patch:
      tags:
        - Chatbot Threads
      summary: Update Thread
      requestBody:
        content:
          application/json:
            schema:
              type: object
              description: Request body
              properties:
                mode:
                  enum:
                    - AI
                    - AGENT
                  description: Chat mode of the thread
                webhookUrl:
                  type: string
                  description: >-
                    Webhook url for the thread where all messages are forwarded
                    to
                webhookToken:
                  type: string
                  description: >-
                    This token will be sent in headers to the webhook url for
                    all the messages
                chatUser:
                  type: object
                  description: Details of the user chatting in the thread
                  properties:
                    email:
                      type: string
                      description: Email of the chat user
                    name:
                      type: string
                      description: Name of the chat user
                    phoneNumber:
                      type: string
                      description: Phone number of the chat user
                  required:
                    - email
            examples:
              Request Body:
                value:
                  mode: AI
                  webhookUrl: https://example.com
                  webhookToken: xyz
                  chatUser:
                    email: abc@gmail.com
                    name: ABC
                    phoneNumber: XXXXXXXXXXX
        description: Request body to update chatbot thread
      parameters:
        - name: chatbotId
          description: Id of the chatbot
          in: path
          schema:
            type: string
          required: true
        - name: threadId
          description: Id of the chatbot thread
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                type: object
                description: Success Response
                properties:
                  success:
                    type: boolean
                    description: >-
                      Indicates whether this is success response or error
                      response
                  message:
                    type: string
                    description: Overall message regarding the operation performed
                  data:
                    type: object
                    description: Data returned from the server
                    nullable: true
              examples:
                Success:
                  value:
                    success: true
                    message: Updated the chatbot thread successfully
                    data: null
        '400':
          description: Bad Request
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Validation Error:
                  value:
                    success: false
                    message: Failed to update the chatbot thread
                    data: null
                    error:
                      code: THREAD_ID_REQUIRED
                      message: threadId field is required
                      details: null
                Invalid Request Body:
                  value:
                    success: false
                    message: Failed to update the chatbot thread
                    data: null
                    error:
                      code: REQUEST_VALIDATION_FAILED
                      message: Request body is not valid
                      details:
                        - path:
                            - mode
                          message: >-
                            Invalid enum value. Expected `AI` | `AGENT`,
                            received `A`
        '401':
          description: Unauthorized
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Authentication Error:
                  value:
                    success: false
                    message: Failed to update the chatbot thread
                    error:
                      code: API_KEY_NOT_VALID
                      message: Authorization header does not contain valid API key
                      details: null
        '403':
          description: Forbidden
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Forbidden Error:
                  value:
                    success: false
                    message: Failed to update the chatbot thread
                    data: null
                    error:
                      code: UPDATE_CHATBOT_THREAD_FORBIDDEN
                      message: You are not authorized to update this chatbot thread
                      details: null
        '404':
          description: Not Found
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Not Found Error:
                  value:
                    success: false
                    message: Failed to update the chatbot thread
                    data: null
                    error:
                      code: CHATBOT_THREAD_NOT_FOUND
                      message: Chatbot thread does not exist for threadId=1234567890
                      details: null
        '405':
          description: Method Not Allowed
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Method Not Allowed Error:
                  value:
                    success: false
                    message: Failed to update the chatbot thread
                    data: null
                    error:
                      code: REQUEST_METHOD_NOT_ALLOWED
                      message: POST request method is not allowed
                      details: null
        '500':
          description: Internal Server Error
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Server Error:
                  value:
                    success: false
                    message: Failed to update the chatbot thread
                    data: null
                    error:
                      code: UPDATE_CHATBOT_THREAD_FAILED
                      message: Some technical error has occurred !!
                      details: null
      operationId: update-chatbot-thread
      description: |-
        Update thread of the chatbot.
        The following thread properties can be updated.
        1. Mode
        2. Webhook url
        3. Webhook token
        4. Chat User details
    parameters:
      - schema:
          type: string
        name: chatbotId
        in: path
        required: true
        description: Id of the chatbot
      - schema:
          type: string
        name: threadId
        in: path
        required: true
        description: Id of the chatbot thread
  /v0/chatbots/{chatbotId}/threads/{threadId}/escalate:
    parameters:
      - schema:
          type: string
        name: chatbotId
        in: path
        required: true
        description: Id of the chatbot the thread belongs to
      - schema:
          type: string
        name: threadId
        in: path
        required: true
        description: Id of the thread that has to be escalated
    post:
      summary: Escalate Conversation
      operationId: escalate-conversation
      description: Escalate a particular thread/conversation
      requestBody:
        content:
          application/json:
            schema:
              type: object
              description: Request Body
              properties:
                escalationPrompt:
                  type: string
                  description: >-
                    Escalation prompt to be used while escalting the
                    conversation. Usually this is the description of the follow
                    up prompt that is configured to trigger escaltion.
            examples:
              Request Body:
                value:
                  escalationPrompt: >-
                    I want to talk to an actual human. Please escalate this
                    conversation.
        description: Request body to escalate a thread/conversation
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                type: object
                description: Success Response
                properties:
                  success:
                    type: boolean
                    description: >-
                      Indicates whether this is success response or error
                      response
                  message:
                    type: string
                    description: Overall message regarding the operation performed
                  data:
                    type: object
                    description: Data returned from the server
                    nullable: true
              examples:
                Success:
                  value:
                    success: true
                    message: Escalated the conversation successfully
                    data: null
        '400':
          description: Bad Request
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Validation Error:
                  value:
                    success: false
                    message: Failed to escalate the conversation
                    data: null
                    error:
                      code: REQUEST_BODY_INVALID
                      message: chatbotId is required
                      details: null
                Validation Error - 2:
                  value:
                    success: false
                    message: Failed to escalate the conversation
                    data: null
                    error:
                      code: REQUEST_VALIDATION_FAILED
                      message: Request body is not valid
                      details:
                        - path:
                            - escalationPrompt
                          message: Required
        '401':
          description: Unauthorized
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Authentication Error:
                  value:
                    success: false
                    message: Failed to escalate the conversation
                    error:
                      code: API_KEY_NOT_VALID
                      message: Authorization header does not contain valid API key
                      details: null
        '403':
          description: Forbidden
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Forbidden Error:
                  value:
                    success: false
                    message: Failed to escalate the conversation
                    data: null
                    error:
                      code: ESCALATE_CONVERSATION_FORBIDDEN
                      message: >-
                        You are not authorized to escalate conversation of this
                        chatbot
                      details: null
        '404':
          description: Not Found
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Not Found Error:
                  value:
                    success: false
                    message: Failed to escalate the conversation
                    data: null
                    error:
                      code: CHATBOT_THREAD_NOT_FOUND
                      message: Thread does not exist for the given chatbot
                      details: null
        '405':
          description: Method Not Allowed
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Method Not Allowed Error:
                  value:
                    success: false
                    message: Failed to escalate the conversation
                    data: null
                    error:
                      code: REQUEST_METHOD_NOT_ALLOWED
                      message: PATCH request method is not allowed
                      details: null
        '500':
          description: Internal Server Error
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Server Error:
                  value:
                    success: false
                    message: Failed to escalate the conversation
                    data: null
                    error:
                      code: ESCALATE_CONVERSATION_FAILED
                      message: Some technical error has occurred !!
                      details: null
      tags:
        - Chatbot Threads
  /v0/w/brands:
    get:
      summary: Fetch Whitelabel Brands
      deprecated: true
      tags:
        - Whitelabel
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: string
                    description: >-
                      Indicates whether this is success response or error
                      response
                  message:
                    type: string
                    description: Overall message regarding the operation performed
                  data:
                    type: object
                    description: Data returned from the server
                    properties:
                      brands:
                        type: array
                        items:
                          $ref: '#/components/schemas/WhitelabelBrand'
              examples:
                Success Response:
                  value:
                    success: string
                    message: string
                    data:
                      brands:
                        - id: '38591051554671453681'
                          name: PSDK
                          domain: app.brand.com
                          marketingDomain: brand.com
                          supportEmail: support@brand.com
                          color: '#000000'
                          createdAt: '2024-01-03T14:23:17.043394Z'
                          updatedAt: '2024-01-09T10:52:53.631589Z'
                          metaDetails:
                            title: Number One brand
                            description: Number One brand for everything
                            ogImage: >-
                              https://sitegpt.ai/cdn-cgi/imagedelivery/AIHFDBHjnhbc/vcedv443r-cr5t-3rf5-d863-dckljdcdkc3/square
                          terms: https://brand.com/terms
                          privacyPolicy: https://brand.com/privacy
                          ownedById: '360596271623302134'
                          logo: >-
                            https://sitegpt.ai/cdn-cgi/imagedelivery/hQTLE0NTlcNyb_tOYFnnyA/8d988e1f-2ea1-4b38-2d5d-1fc812560400/square
                          fullLogo: >-
                            https://sitegpt.ai/cdn-cgi/imagedelivery/hQTLE0NTlcNyb_tOYFnnyA/85052523-9a79-4dd8-f7d3-60a53175ef00/square
                          emailSettings:
                            resendApiKey: rs_api_12e2e2cvwev
                            fromName: Brand
                            fromEmail: login@resend.app.brand.com
                            replyToEmail: support@brand.com
                          defaultQuota:
                            chatbotsQuota: 1
                            linksQuota: 10
                            filesQuota: 5
                            combinedMessagesQuota: 20
                            membersQuota: 1
        '401':
          description: Unauthorized
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Authentication Error:
                  value:
                    success: false
                    message: Failed to fetch all the whitelabel brands
                    data: null
                    error:
                      code: API_KEY_NOT_VALID
                      message: Authorization header does not contain valid API key
                      details: null
        '403':
          description: Forbidden
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Forbidden Error:
                  value:
                    success: false
                    message: Failed to fetch all the whitelabel brands
                    data: null
                    error:
                      code: FETCH_WHITELABEL_BRANDS_FORBIDDEN
                      message: >-
                        You are not authorized to fetch all the whitelabel
                        brands
        '405':
          description: Method Not Allowed
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Method Not Allowed Error:
                  value:
                    success: false
                    message: Failed to fetch all the whitelabel brands
                    data: null
                    error:
                      code: REQUEST_METHOD_NOT_ALLOWED
                      message: PUT request method is not allowed
        '500':
          description: Internal Server Error
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Server Error:
                  value:
                    success: false
                    message: Failed to fetch all the whitelabel brands
                    data: null
                    error:
                      code: FETCH_WHITELABEL_BRANDS_FAILED
                      message: Some technical error has occurred !!
      operationId: get-whitelabel-brands
      description: Fetch all of your whitelabel brands
  /v0/w/brands/{brandId}:
    parameters:
      - schema:
          type: string
        name: brandId
        in: path
        required: true
        description: Id of the whitelabel brand
    get:
      summary: Fetch Whitelabel Brand
      deprecated: true
      tags:
        - Whitelabel
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: >-
                      Indicates whether this is success response or error
                      response
                  message:
                    type: string
                    description: Overall message regarding the operation performed
                  data:
                    type: object
                    description: Data returned from the server
                    properties:
                      brand:
                        $ref: '#/components/schemas/WhitelabelBrand'
              examples:
                Success Response:
                  value:
                    success: true
                    message: Fetched the whitelabel brand successfully
                    data:
                      brand:
                        id: '38591051554671453681'
                        name: PSDK
                        domain: app.brand.com
                        marketingDomain: brand.com
                        supportEmail: support@brand.com
                        color: '#000000'
                        createdAt: '2024-01-03T14:23:17.043394Z'
                        updatedAt: '2024-01-09T10:52:53.631589Z'
                        emailSettings:
                          resendApiKey: rs_api_12e2e2cvwev
                          fromName: Brand
                          fromEmail: login@resend.app.brand.com
                          replyToEmail: support@brand.com
                        metaDetails:
                          title: Number One brand
                          description: Number One brand for everything
                          ogImage: >-
                            https://sitegpt.ai/cdn-cgi/imagedelivery/AIHFDBHjnhbc/vcedv443r-cr5t-3rf5-d863-dckljdcdkc3/square
                        terms: https://brand.com/terms
                        privacyPolicy: https://brand.com/privacy
                        ownedById: '360596271623302134'
                        logo: >-
                          https://sitegpt.ai/cdn-cgi/imagedelivery/hQTLE0NTlcNyb_tOYFnnyA/8d988e1f-2ea1-4b38-2d5d-1fc812560400/square
                        fullLogo: >-
                          https://sitegpt.ai/cdn-cgi/imagedelivery/hQTLE0NTlcNyb_tOYFnnyA/85052523-9a79-4dd8-f7d3-60a53175ef00/square
                        defaultQuota:
                          chatbotsQuota: 1
                          linksQuota: 10
                          filesQuota: 5
                          combinedMessagesQuota: 20
                          membersQuota: 1
        '400':
          description: Bad Request
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Validation Error:
                  value:
                    success: false
                    message: Failed to fetch the whitelabel brand
                    data: null
                    error:
                      code: BRAND_ID_REQUIRED
                      message: brandId is required
                      details: null
        '401':
          description: Unauthorized
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Authentication Error:
                  value:
                    success: false
                    message: Failed to fetch the whitelabel brand
                    data: null
                    error:
                      code: API_KEY_NOT_VALID
                      message: Authorization header does not contain valid API key
                      details: null
        '403':
          description: Forbidden
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Forbidden Error:
                  value:
                    success: false
                    message: Failed to fetch the whitelabel brand
                    data: null
                    error:
                      code: FETCH_WHITELABEL_BRAND_FORBIDDEN
                      message: You are not authorized to fetch the whitelabel brand
        '404':
          description: Not Found
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Not Found Error:
                  value:
                    success: false
                    message: Failed to fetch the whitelabel brand
                    data: null
                    error:
                      code: FETCH_WHITELABEL_BRAND_NOT_FOUND
                      message: Whitelabel brand does not exist
        '405':
          description: Method Not Allowed
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Method Not Allowed Error:
                  value:
                    success: false
                    message: Failed to fetch the whitelabel brand
                    data: null
                    error:
                      code: REQUEST_METHOD_NOT_ALLOWED
                      message: PUT request method is not allowed
        '500':
          description: Internal Server Error
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Server Error:
                  value:
                    success: false
                    message: Failed to fetch the whitelabel brand
                    data: null
                    error:
                      code: FETCH_WHITELABEL_BRAND_FAILED
                      message: Some technical error has occurred !!
      operationId: get-whitelabel-brand
      description: Fetch the whitelabel brand
  /v0/w/brands/{brandId}/users:
    post:
      summary: Add Whitelabel User
      deprecated: true
      tags:
        - Whitelabel
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: >-
                      Indicates whether this is success response or error
                      response
                  message:
                    type: string
                    description: Overall message regarding the operation performed
                  data:
                    description: Data returned from the server
                    type: object
                    properties:
                      whitelabelUser:
                        $ref: '#/components/schemas/WhitelabelUser'
              examples:
                Success Response:
                  value:
                    success: true
                    message: Added new whitelabel user of your brand successfully
                    data:
                      whitelabelUser:
                        id: '332153612345906321'
                        brandId: '332110515123458123'
                        email: user@example.com
                        name: ''
                        profilePic: ''
                        chatbotsQuota: 1
                        linksQuota: 10
                        filesQuota: 5
                        combinedMessagesQuota: 10
                        membersQuota: 1
                        createdAt: '2024-02-10T14:30:21.828601Z'
                        updatedAt: '2024-02-10T14:30:21.828601Z'
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Validation Error:
                  value:
                    success: false
                    message: Failed to create the new whitelabel user
                    data: null
                    error:
                      code: REQUEST_VALIDATION_FAILED
                      message: Request body is not valid
                      details:
                        - path:
                            - chatbotsQuota
                          message: Required
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Authentication Error:
                  value:
                    success: false
                    message: Failed to add a new whitelabel user to the brand
                    data: null
                    error:
                      code: API_KEY_NOT_VALID
                      message: Authorization header does not contain valid API key
                      details: null
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Forbidden Error:
                  value:
                    success: false
                    message: Failed to add a new whitelabel user to the brand
                    data: null
                    error:
                      code: ADD_WHITELABEL_USER_FORBIDDEN
                      message: >-
                        You are not authorized to add a whitelabel user to the
                        brand
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Not Found Error:
                  value:
                    success: false
                    message: Failed to add a new whitelabel user to the brand
                    data: null
                    error:
                      code: ADD_WHITELABEL_USER_BRAND_NOT_FOUND
                      message: You don't have a whitelabel brand
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
        '405':
          description: Method Not Allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Method Not Allowed Error:
                  value:
                    success: false
                    message: Failed to add a new whitelabel user to the brand
                    data: null
                    error:
                      code: REQUEST_METHOD_NOT_ALLOWED
                      message: PUT request method is not allowed
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Server Error:
                  value:
                    success: false
                    message: Failed to add a new whitelabel user to the brand
                    data: null
                    error:
                      code: ADD_WHITELABEL_USER_FAILED
                      message: Some technical error has occurred !!
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
      operationId: add-whitelabel-user
      description: |-
        Add a new user to your whitelabel brand.

        Pre-requisities: 
        1. You have to be a whitelabel customer in SiteGPT.
        2. You need to create and configure your own brand in SiteGPT dashboard.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - email
                - chatbotsQuota
                - linksQuota
                - filesQuota
                - combinedMessagesQuota
                - membersQuota
              properties:
                email:
                  type: string
                  format: email
                  description: Email of the user you want to add to your whitelabel brand
                chatbotsQuota:
                  type: integer
                  minimum: 0
                  description: Chatbots quota to be assigned to the user
                linksQuota:
                  type: integer
                  minimum: 0
                  description: Links quota to be assigned to the user
                filesQuota:
                  type: integer
                  minimum: 0
                  description: Files quota to be assigned to the user
                combinedMessagesQuota:
                  type: integer
                  minimum: 0
                  description: Combined messages quota to be assigned to the user
                membersQuota:
                  type: integer
                  minimum: 0
                  description: Members quota to be assigned to the user
            examples:
              Request Body:
                value:
                  email: user@example.com
                  chatbotsQuota: 1
                  linksQuota: 100
                  filesQuota: 25
                  combinedMessagesQuota: 250
                  membersQuota: 2
        description: Request body to add a new whitelabel user to your brand.
    parameters:
      - schema:
          type: string
        name: brandId
        in: path
        required: true
        description: Id of the whitelabel brand to which user belongs to
  /v0/w/brands/{brandId}/users/{userId}:
    parameters:
      - schema:
          type: string
        name: userId
        in: path
        required: true
        description: Id of the whitelabel user
      - schema:
          type: string
        name: brandId
        in: path
        required: true
        description: Id of the whitelabel brand
    patch:
      summary: Update Whitelabel User
      deprecated: true
      tags:
        - Whitelabel
      operationId: update-whitelabel-user
      description: |-
        Update user of your whitelabel brand.

        Pre-requisities: 
        1. You have to be a whitelabel customer in SiteGPT.
        2. You need to create and configure your own brand in SiteGPT dashboard.
      requestBody:
        description: Request body to update the whitelabel user of your brand.
        content:
          application/json:
            schema:
              type: object
              properties:
                chatbotsQuota:
                  type: integer
                  description: Chatbots quota to be assigned to the user
                  minimum: 0
                linksQuota:
                  type: integer
                  description: Links quota to be assigned to the user
                  minimum: 0
                filesQuota:
                  type: integer
                  description: Files quota to be assigned to the user
                  minimum: 0
                combinedMessagesQuota:
                  type: integer
                  description: Combined messages quota to be assigned to the user
                  minimum: 0
                membersQuota:
                  type: integer
                  description: Members quota to be assigned to the user
                  minimum: 0
                features:
                  type: object
                  description: >-
                    Features to be enabled/disabled for the user. You can
                    enable/disable only those features which are enabled for the
                    whitelabel brand owner.
                  properties:
                    watermark:
                      type: boolean
                      description: >-
                        Indicates whether the watermark feature to be
                        enabled/disabled.


                        Pre Requisities:

                        1. Brand owner needs to have access to this feature.
                    api:
                      type: boolean
                      description: >-
                        Indicates whether the api feature to be
                        enabled/disabled.


                        Pre Requisities:

                        1. Brand owner needs to have access to this feature.
                    webhooks:
                      type: boolean
                      description: >-
                        Indicates whether the webhooks feature to be
                        enabled/disabled.


                        Pre Requisities:

                        1. Brand owner needs to have access to this feature.
                    functions:
                      type: boolean
                      description: >-
                        Indicates whether the functions feature to be
                        enabled/disabled.


                        Pre Requisities:

                        1. Brand owner needs to have access to this feature.
                    integrations:
                      type: boolean
                      description: >-
                        Indicates whether the integrations feature to be
                        enabled/disabled.


                        Pre Requisities:

                        1. Brand owner needs to have access to this feature.

                        2. API key needs to be generated.

                        3. API feature flag should be enabled.
                    googleChatIntegration:
                      type: boolean
                      description: >-
                        Indicates whether the google chat feature to be
                        enabled/disabled.


                        Pre Requisities:

                        1. Brand owner needs to have access to this feature.

                        2. Integrations feature should be enabled.
                    messengerChatIntegration:
                      type: boolean
                      description: >-
                        Indicates whether the messenger chat feature to be
                        enabled/disabled.


                        Pre Requisities:

                        1. Brand owner needs to have access to this feature.

                        2. Integrations feature should be enabled.
                    crispChatIntegration:
                      type: boolean
                      description: >-
                        Indicates whether the crisp chat feature to be
                        enabled/disabled.


                        Pre Requisities:

                        1. Brand owner needs to have access to this feature.

                        2. Integrations feature should be enabled.
                    slackChatIntegration:
                      type: boolean
                      description: >-
                        Indicates whether the slack chat feature to be
                        enabled/disabled.


                        Pre Requisities:

                        1. Brand owner needs to have access to this feature.

                        2. Integrations feature should be enabled.
                    zendeskChatIntegration:
                      type: boolean
                      description: >-
                        Indicates whether the zendesk chat feature to be
                        enabled/disabled.


                        Pre Requisities:

                        1. Brand owner needs to have access to this feature.

                        2. Integrations feature should be enabled.
            examples:
              Request Body:
                value:
                  chatbotsQuota: 1
                  linksQuota: 100
                  filesQuota: 25
                  combinedMessagesQuota: 250
                  membersQuota: 2
                  features:
                    api: true
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: >-
                      Indicates whether this is success response or error
                      response
                  message:
                    type: string
                    description: Overall message regarding the operation performed
                  data:
                    type: object
                    description: Data returned from the server
                    properties:
                      whitelabelUser:
                        $ref: '#/components/schemas/WhitelabelUser'
              examples:
                Success Response:
                  value:
                    success: true
                    message: Updated the whitelabel user of the brand successfully
                    data:
                      whitelabelUser:
                        id: '332153612345906321'
                        brandId: '332110515123458123'
                        email: user@example.com
                        name: ''
                        profilePic: ''
                        chatbotsQuota: 2
                        linksQuota: 20
                        filesQuota: 5
                        combinedMessagesQuota: 25
                        membersQuota: 2
                        features:
                          watermark: false
                          api: true
                          webhooks: false
                          functions: false
                          integrations: false
                          googleChatIntegration: false
                          messengerChatIntegration: false
                          crispChatIntegration: false
                          slackChatIntegration: false
                          zendeskChatIntegration: false
                        createdAt: '2024-02-05T13:35:44.155845Z'
                        updatedAt: '2024-02-05T13:35:44.155845Z'
        '400':
          description: Bad Request
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Validation Error:
                  value:
                    success: false
                    message: Failed to update the whitelabel user of the brand
                    data: null
                    error:
                      code: REQUEST_VALIDATION_FAILED
                      message: Request body is not valid
                      details:
                        - path:
                            - brandId
                          message: Required
        '401':
          description: Unauthorized
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Authentication Error:
                  value:
                    success: false
                    message: Failed to update the whitelabel user of the brand
                    data: null
                    error:
                      code: API_KEY_NOT_VALID
                      message: Authorization header does not contain valid API key
                      details: null
        '403':
          description: Forbidden
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Forbidden Error 1:
                  value:
                    success: false
                    message: Failed to update the whitelabel user of the brand
                    data: null
                    error:
                      code: UPDATE_WHITELABEL_USER_FORBIDDEN
                      message: >-
                        You are not authorized to update the whitelabel user of
                        the brand
                Forbidden Error 2:
                  value:
                    success: false
                    message: Failed to update the whitelabel user of the brand
                    data: null
                    error:
                      code: UPDATE_WHITELABEL_USER_FEATURE_ACCESS_FORBIDDEN
                      message: >-
                        You are not authorized to update api feature for the
                        whitelabel user
        '404':
          description: Not Found
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Not Found Error:
                  value:
                    success: false
                    message: Failed to update the whitelabel user of the brand
                    data: null
                    error:
                      code: UPDATE_WHITELABEL_USER_BRAND_NOT_FOUND
                      message: Whitelabel brand not found
        '405':
          description: Method Not Allowed
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Method Not Allowed Error:
                  value:
                    success: false
                    message: Failed to update the whitelabel user of the brand
                    data: null
                    error:
                      code: REQUEST_METHOD_NOT_ALLOWED
                      message: POST request method is not allowed
        '500':
          description: Internal Server Error
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Server Error:
                  value:
                    success: false
                    message: Failed to update the whitelabel user of the brand
                    data: null
                    error:
                      code: UPDATE_WHITELABEL_USER_FAILED
                      message: Some technical error has occurred !!
    get:
      summary: Fetch Whitelabel User
      deprecated: true
      tags:
        - Whitelabel
      operationId: fetch-whitelabel-user
      description: |-
        Fetch an user of your whitelabel brand.

        Pre-requisities: 
        1. You have to be a whitelabel customer in SiteGPT.
        2. You need to create and configure your own brand in SiteGPT dashboard.
      parameters:
        - schema:
            type: boolean
            default: false
          in: query
          name: includeApiKey
          description: Option to decide whether to include API key in the response or not
        - schema:
            type: boolean
            default: false
          in: query
          name: includeFeatures
          description: Option to decide whether to include features in the response or not
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: >-
                      Indicates whether this is success response or error
                      response
                  message:
                    type: string
                    description: Overall message regarding the operation performed
                  data:
                    type: object
                    description: Data returned from the server
                    properties:
                      whitelabelUser:
                        $ref: '#/components/schemas/WhitelabelUser'
              examples:
                Success Response:
                  value:
                    success: true
                    message: Fetched the whitelabel user successfully
                    data:
                      whitelabelUser:
                        id: '401577831134278614'
                        brandId: '401537586571228250'
                        email: dheeraj@sitegpt.ai
                        name: ''
                        profilePic: ''
                        chatbotsQuota: 1
                        linksQuota: 25
                        filesQuota: 10
                        combinedMessagesQuota: 25
                        membersQuota: 1
                        apiKey: 7f488a50-8a5a-9e34-9a04-1dad5bd548c3
                        features:
                          watermark: false
                          api: true
                          webhooks: false
                          functions: false
                          integrations: false
                          googleChatIntegration: false
                          messengerChatIntegration: false
                          crispChatIntegration: false
                          slackChatIntegration: false
                          zendeskChatIntegration: false
                        createdAt: '2024-06-24T11:38:34.228989Z'
                        updatedAt: '2024-06-27T13:42:38.046991Z'
        '400':
          description: Bad Request
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Validation Error:
                  value:
                    success: false
                    message: Failed to fetch the whitelabel user
                    data: null
                    error:
                      code: REQUEST_VALIDATION_FAILED
                      message: Request body is not valid
                      details:
                        - path:
                            - brandId
                          message: Required
        '401':
          description: Unauthorized
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Authentication Error:
                  value:
                    success: false
                    message: Failed to fetch the whitelabel user
                    data: null
                    error:
                      code: API_KEY_NOT_VALID
                      message: Authorization header does not contain valid API key
                      details: null
        '403':
          description: Forbidden
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Forbidden Error:
                  value:
                    success: false
                    message: Failed to fetch the whitelabel user
                    data: null
                    error:
                      code: FETCH_WHITELABEL_USER_FORBIDDEN
                      message: You are not authorized to fetch the whitelabel user
        '404':
          description: Not Found
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Not Found Error:
                  value:
                    success: false
                    message: Failed to fetch the whitelabel user
                    data: null
                    error:
                      code: FETCH_WHITELABEL_USER_USER_NOT_FOUND
                      message: Whitelabel user not found
        '405':
          description: Method Not Allowed
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Method Not Allowed Error:
                  value:
                    success: false
                    message: Failed to fetch the whitelabel user
                    data: null
                    error:
                      code: REQUEST_METHOD_NOT_ALLOWED
                      message: POST request method is not allowed
        '500':
          description: Internal Server Error
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Server Error:
                  value:
                    success: false
                    message: Failed to fetch the whitelabel user
                    data: null
                    error:
                      code: FETCH_WHITELABEL_USER_FAILED
                      message: Some technical error has occurred !!
  /v0/w/brands/{brandId}/users/{userId}/api-key:
    parameters:
      - schema:
          type: string
        name: brandId
        in: path
        required: true
        description: Id of the whitelabel brand
      - schema:
          type: string
        name: userId
        in: path
        required: true
        description: Id of the whitelabel user
    patch:
      summary: Generate API key for Whitelabel User
      deprecated: true
      tags:
        - Whitelabel
      operationId: generate-api-key-for-whitelabel-user
      description: |-
        Generate API key for a user of your whitelabel brand.

        Pre-requisities: 
        1. You have to be a whitelabel customer in SiteGPT.
        2. You need to create and configure your own brand in SiteGPT dashboard.
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: >-
                      Indicates whether this is success response or error
                      response
                  message:
                    type: string
                    description: Overall message regarding the operation performed
                  data:
                    type: object
                    description: Data returned from the server
                    properties:
                      userId:
                        type: string
                        description: Id of the whitelabel user
                      userEmail:
                        type: string
                        description: Email of the whitelabel user
                      apiKey:
                        type: string
                        description: API key of the whitelabel user
              examples:
                Success Response:
                  value:
                    success: true
                    message: Generated API key of the whitelabel user successfully
                    data:
                      userId: '401577831134278614'
                      userEmail: test@gmail.com
                      apiKey: 7f488a50-8a5a-9e34-9a04-1dad5bd548c3
        '400':
          description: Bad Request
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Validation Error:
                  value:
                    success: false
                    message: Failed to generate API key of the whitelabel user
                    data: null
                    error:
                      code: REQUEST_VALIDATION_FAILED
                      message: Request body is not valid
                      details:
                        - path:
                            - brandId
                          message: Required
        '401':
          description: Unauthorized
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Authentication Error:
                  value:
                    success: false
                    message: Failed to generate API key of the whitelabel user
                    data: null
                    error:
                      code: API_KEY_NOT_VALID
                      message: Authorization header does not contain valid API key
                      details: null
        '403':
          description: Forbidden
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Forbidden Error:
                  value:
                    success: false
                    message: Failed to generate API key of the whitelabel user
                    data: null
                    error:
                      code: GENERATE_API_KEY_FORBIDDEN
                      message: >-
                        You are not authorized to generate API key of the
                        whitelabel user
        '404':
          description: Not Found
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Not Found Error:
                  value:
                    success: false
                    message: Failed to generate API key of the whitelabel user
                    data: null
                    error:
                      code: GENERATE_API_KEY_USER_NOT_FOUND
                      message: Whitelabel user not found
        '405':
          description: Method Not Allowed
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Method Not Allowed Error:
                  value:
                    success: false
                    message: Failed to generate API key of the whitelabel user
                    data: null
                    error:
                      code: REQUEST_METHOD_NOT_ALLOWED
                      message: POST request method is not allowed
        '500':
          description: Internal Server Error
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Server Error:
                  value:
                    success: false
                    message: Failed to generate API key of the whitelabel user
                    data: null
                    error:
                      code: GENERATE_API_KEY_FAILED
                      message: Some technical error has occurred !!
