> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flextell.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Update chat settings

> Validated fields in the request body are merged with chat settings and related general fields where applicable.



## OpenAPI

````yaml https://dev.flextell.ai/docs/api.json put /v1/settings/chat
openapi: 3.1.0
info:
  title: Flextell API
  version: 0.0.1
  description: '## Flextell API'
servers:
  - url: https://dev.flextell.ai/api
security:
  - oauth2: []
  - bearer: []
paths:
  /v1/settings/chat:
    put:
      tags:
        - Settings
      summary: Update chat settings
      description: >-
        Validated fields in the request body are merged with chat settings and
        related general fields where applicable.
      operationId: settings.updateChat
      parameters:
        - name: X-Tenant
          in: header
          required: true
          description: >-
            Tenant identifier. Send the Tenant ID in the `X-Tenant` header to
            scope API requests to a specific tenant.
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChatSettingsUpdateRequest'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: string
                  data:
                    type: object
                    properties:
                      prefix:
                        type: string
                        const: chat
                      settings:
                        type: array
                        items: {}
                    required:
                      - prefix
                      - settings
                required:
                  - success
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    ChatSettingsUpdateRequest:
      type: object
      properties:
        password:
          type: string
          description: The password.
        pre_booking_requirements:
          type: object
          description: The pre booking requirements.
          properties:
            enabled:
              type: boolean
              description: The pre booking requirements.enabled.
        customer_forms:
          type: object
          description: The customer forms.
          properties:
            default_template_id:
              type:
                - integer
                - 'null'
              description: The customer forms.default template ID.
        ai_reply_windows:
          type:
            - array
            - 'null'
          description: The ai reply windows.
          items:
            type: object
            properties:
              day:
                type: string
                description: The ai reply windows.*.day.
                enum:
                  - monday
                  - tuesday
                  - wednesday
                  - thursday
                  - friday
                  - saturday
                  - sunday
              start_time:
                type: string
                description: The ai reply windows.*.start time.
              end_time:
                type: string
                description: The ai reply windows.*.end time.
              mode:
                $ref: '#/components/schemas/AiReplyMode'
                description: The ai reply windows.*.mode.
          minItems: 1
      required:
        - password
      title: ChatSettingsUpdateRequest
    AiReplyMode:
      type: string
      enum:
        - auto
        - semi_auto
        - closed
      title: AiReplyMode
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://dev.flextell.ai/oauth/authorize
          tokenUrl: https://dev.flextell.ai/oauth/token
          scopes:
            '*': all
    bearer:
      type: http
      scheme: bearer

````