> ## 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.

## `ai_reply_windows` — AI Yanıt Penceresi Programı

Flat array. Her item ya **tüm gün varsayılanı** ya da **saat istisnası**dır.

**Tüm gün varsayılanı** — `start_time` ve `end_time` null gönderilir:
```json
{ "day": "thursday", "start_time": null, "end_time": null, "mode": "auto" }
```
O gün boyunca geçerli olur. Aynı güne en fazla bir tüm gün varsayılanı tanımlanabilir.

**Saat istisnası** — `start_time` ve `end_time` dolu gönderilir (UTC, HH:mm):
```json
{ "day": "thursday", "start_time": "07:10", "end_time": "07:15", "mode": "semi_auto" }
```
Aynı gün birden fazla istisna olabilir; saatleri çakışmamalıdır.

**Öncelik:** saat istisnası > tüm gün varsayılanı > Kapalı

**Panel karşılığı:** her günün dropdown'u tüm gün varsayılanını, alt satırlar saat istisnalarını temsil eder.



## OpenAPI

````yaml put /v1/settings/chat
openapi: 3.1.0
info:
  title: Flextell API
  version: 0.0.1
  description: >-
    Flextell REST API referansı. Kimlik doğrulama, scope ve istek kuralları için
    API sekmesindeki rehberlere bakın.
servers:
  - url: https://app.flextell.ai/api
    description: Üretim
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.


        ## `ai_reply_windows` — AI Yanıt Penceresi Programı


        Flat array. Her item ya **tüm gün varsayılanı** ya da **saat
        istisnası**dır.


        **Tüm gün varsayılanı** — `start_time` ve `end_time` null gönderilir:

        ```json

        { "day": "thursday", "start_time": null, "end_time": null, "mode":
        "auto" }

        ```

        O gün boyunca geçerli olur. Aynı güne en fazla bir tüm gün varsayılanı
        tanımlanabilir.


        **Saat istisnası** — `start_time` ve `end_time` dolu gönderilir (UTC,
        HH:mm):

        ```json

        { "day": "thursday", "start_time": "07:10", "end_time": "07:15", "mode":
        "semi_auto" }

        ```

        Aynı gün birden fazla istisna olabilir; saatleri çakışmamalıdır.


        **Öncelik:** saat istisnası > tüm gün varsayılanı > Kapalı


        **Panel karşılığı:** her günün dropdown'u tüm gün varsayılanını, alt
        satırlar saat istisnalarını temsil eder.
      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'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    ChatSettingsUpdateRequest:
      type: object
      properties:
        password:
          type: string
          description: The password.
        ai_reply_windows:
          type:
            - array
            - 'null'
          items:
            type: object
            properties:
              day:
                type: string
                enum:
                  - monday
                  - tuesday
                  - wednesday
                  - thursday
                  - friday
                  - saturday
                  - sunday
              start_time:
                type:
                  - string
                  - 'null'
              end_time:
                type:
                  - string
                  - 'null'
              mode:
                $ref: '#/components/schemas/AiReplyMode'
                description: The ai reply windows.*.mode.
        intake_requirements:
          type: object
          description: The pre-booking (intake) requirements.
          properties:
            enabled:
              type: boolean
              description: >-
                Whether the bot collects the default form before booking; true
                needs an active default form template.
        pre_booking_requirements:
          type: object
          description: >-
            Old name of `intake_requirements`; ignored when
            `intake_requirements` is sent.
          properties:
            enabled:
              type: boolean
              description: Old name of `intake_requirements.enabled`.
        customer_forms:
          type: object
          description: The customer forms.
          properties:
            default_template_id:
              type:
                - integer
                - 'null'
              description: The customer forms.default template ID.
        message_notification_roles:
          type: array
          description: The tenant roles that receive new message notifications.
          items:
            type: string
            description: A tenant role name that receives new message notifications.
      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
    AuthorizationException:
      description: Authorization error
      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

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.