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

> Creates a bot template for the Client ID provided in the request.

One Client ID can register up to five bot templates. A bot based on a template will be automatically created on the license when the application is installed. Such a bot will have the same ID as the bot template. If the application is already installed on the license, the bot will be created only if `affect_existing_installations` is set to `true`.

**Required scopes:** `bots.templates:rw`


## OpenAPI

````yaml /api/configuration/v3.5/openapi.json post /action/create_bot_template
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/create_bot_template:
    post:
      tags:
        - Bots
      summary: Create bot template
      description: >-
        Creates a bot template for the Client ID provided in the request.


        One Client ID can register up to five bot templates. A bot based on a
        template will be automatically created on the license when the
        application is installed. Such a bot will have the same ID as the bot
        template. If the application is already installed on the license, the
        bot will be created only if `affect_existing_installations` is set to
        `true`.
      operationId: create-bot-template
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateBotTemplateRequest'
            example:
              name: Bot Name
              owner_client_id: 238ac5c3c3628210aca289c6d700d2c1
      responses:
        '200':
          description: Bot template created successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BotSecretResponse'
              example:
                id: 5c9871d5372c824cbf22d860a707a578
                secret: 641e2ae6d997d2009a3ac92a05f37fc3
components:
  schemas:
    CreateBotTemplateRequest:
      type: object
      required:
        - name
        - owner_client_id
      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.
        owner_client_id:
          type: string
          description: >-
            The Client ID that will own the bot template. Must be owned by your
            organization.
        affect_existing_installations:
          type: boolean
          description: >-
            If set to `true`: a bot based on this template will be created on
            all licenses that have the given application installed. If set to
            `false`: only new installations will trigger bot creation.
    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.
  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

````