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

# Create bot

> Creates a new bot. To make the bot available for receiving chats or webhooks, use the Set Routing Status method. Can be [sent in batch](/api/configuration/v3.7/batch-requests).

**Required scopes:** `agents-bot--my:rw`


## OpenAPI

````yaml /api/configuration/v3.7/openapi.json post /action/create_bot
openapi: 3.1.0
info:
  title: Configuration API
  version: v3.7
servers:
  - url: https://api.livechatinc.com/v3.7/configuration
security:
  - PersonalAccessToken: []
  - OAuth2BearerToken: []
paths:
  /action/create_bot:
    post:
      tags:
        - Bots
      summary: Create bot
      description: >-
        Creates a new bot. To make the bot available for receiving chats or
        webhooks, use the Set Routing Status method. Can be [sent in
        batch](/api/configuration/v3.7/batch-requests).
      operationId: create-bot
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateBotRequest'
            example:
              name: Bot Name
              owner_client_id: 238ac5c3c3628210aca289c6d700d2c1
      responses:
        '200':
          description: Bot created successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BotSecretResponse'
              example:
                id: 5c9871d5372c824cbf22d860a707a578
                secret: 641e2ae6d997d2009a3ac92a05f37fc3
components:
  schemas:
    CreateBotRequest:
      type: object
      required:
        - name
      properties:
        name:
          type: string
          description: The display name.
        avatar:
          type: string
          description: The avatar URL.
        max_chats_count:
          type: integer
          description: The maximum number of incoming chats that can be routed to the bot.
          maximum: 500
          default: 6
        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.
        groups:
          type: array
          items:
            $ref: '#/components/schemas/BotGroup'
          description: Groups the bot belongs to.
        type:
          type: string
          description: A custom value to categorize or identify the bot.
          default: chatbot
        work_scheduler:
          $ref: '#/components/schemas/WorkScheduler'
          description: The work scheduler options to set for the new bot.
        owner_client_id:
          type: string
          description: >-
            The Client ID that will own the bot. Required only when authorizing
            via Personal Access Tokens. When provided with a Bearer Token, the
            `client_id` associated with the Bearer Token will be ignored.
    BotSecretResponse:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the created bot or bot template.
        secret:
          type: string
          description: The secret used to issue bot tokens via the Issue Bot Token method.
    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: A 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

````