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

# Update bot

> Updates an existing bot. Can be [sent in batch](/api/configuration/v3.5/batch-requests).

**Required scopes:** `agents-bot--my:rw`, <Tooltip tip="To update other bots within the same license.">`agents-bot--all:rw`</Tooltip>


## OpenAPI

````yaml /api/configuration/v3.5/openapi.json post /action/update_bot
openapi: 3.1.0
info:
  title: Configuration API
  version: v3.5
servers:
  - url: https://api.livechatinc.com/v3.5/configuration
security:
  - PersonalAccessToken: []
  - OAuth2BearerToken: []
paths:
  /action/update_bot:
    post:
      tags:
        - Bots
      summary: Update bot
      description: >-
        Updates an existing bot. Can be [sent in
        batch](/api/configuration/v3.5/batch-requests).
      operationId: update-bot
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateBotRequest'
            example:
              id: ce54714e3d2b53adbfff09dbdbdd56e9
              name: New Bot Name
      responses:
        '200':
          description: Bot updated successfully.
components:
  schemas:
    UpdateBotRequest:
      type: object
      required:
        - id
      properties:
        id:
          type: string
          description: The bot ID.
        name:
          type: string
          description: The display name.
        avatar:
          type: string
          description: The avatar URL.
        max_chats_count:
          type: integer
          description: The maximum incoming chats that can be routed to the bot.
          maximum: 500
        groups:
          type: array
          items:
            $ref: '#/components/schemas/BotGroup'
          description: Groups the bot belongs to.
        default_group_priority:
          type: string
          enum:
            - first
            - normal
            - last
            - supervisor
          description: >-
            The default routing priority for a group without a defined priority.


            - `first` — The highest chat routing priority. bots get chats before
            others from the same group. Corresponds to the **bot** priority
            option in the Text app.

            - `normal` — The medium chat routing priority. bots get chats before
            `last`-priority agents when no `first`-priority agents with free
            slots are available. Corresponds to the **Primary** priority option
            in the Text app.

            - `last` — The lowest chat routing priority. bots get chats when no
            agents with `first` or `normal` priority and free slots are
            available. Corresponds to the **Secondary** priority option in the
            Text app.

            - `supervisor` — Bots with the `supervisor` priority will not get
            any chats assigned automatically.
        job_title:
          type: string
          description: The bot's job title.
        work_scheduler:
          $ref: '#/components/schemas/WorkScheduler'
          description: The work scheduler options to set for the bot.
    BotGroup:
      type: object
      required:
        - id
        - priority
      properties:
        id:
          type: integer
          description: The group ID. Required when `groups` is provided.
        priority:
          type: string
          enum:
            - first
            - normal
            - last
            - supervisor
          description: >-
            The bot's priority in a group. Required when `groups` is provided.


            - `first` — The highest chat routing priority. bots get chats before
            others from the same group. Corresponds to the **bot** priority
            option in the Text app.

            - `normal` — The medium chat routing priority. bots get chats before
            `last`-priority agents when no `first`-priority agents with free
            slots are available. Corresponds to the **Primary** priority option
            in the Text app.

            - `last` — The lowest chat routing priority. bots get chats when no
            agents with `first` or `normal` priority and free slots are
            available. Corresponds to the **Secondary** priority option in the
            Text app.

            - `supervisor` — Bots with the `supervisor` priority will not get
            any chats assigned automatically.
    WorkScheduler:
      type: object
      required:
        - timezone
        - schedule
      properties:
        timezone:
          type: string
          description: >-
            The timezone for the work scheduler. Falls back to the agent's
            timezone if empty. Required when `schedule` is not empty.
        schedule:
          type: array
          items:
            $ref: '#/components/schemas/WorkScheduleDay'
          description: The list of agent's working hours.
    WorkScheduleDay:
      type: object
      required:
        - day
        - enabled
        - start
        - end
      properties:
        day:
          type: string
          enum:
            - sunday
            - monday
            - tuesday
            - wednesday
            - thursday
            - friday
            - saturday
          description: The day for which the working hours are set.
        enabled:
          type: boolean
          description: 'If set to `true`: the given set of working hours is enabled.'
        start:
          type: string
          description: The time when the working hours start.
        end:
          type: string
          description: The time when the working hours end.
  securitySchemes:
    PersonalAccessToken:
      type: http
      scheme: basic
      description: >-
        Use your `account ID` as the username and your personal access token
        (PAT) as the password, or pass a Base64-encoded value directly in the
        Authorization header. For more information, see the <a
        href="/authentication/personal-access-tokens">personal access tokens
        guide</a>.
    OAuth2BearerToken:
      type: http
      scheme: bearer
      description: Authenticate using an OAuth 2.0 Bearer token.
      x-example: us-south1:MQraNrGCsoJvtxD7KNJQB1kM3d5

````