> ## Documentation Index
> Fetch the complete documentation index at: https://botpress-ak-docs-20-document-updating-variables-from-outsid.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# updateBot

> Update bot



## OpenAPI

````yaml admin-openapi.json put /v1/admin/bots/{id}
openapi: 3.0.0
info:
  title: Botpress Admin API
  description: API for Botpress Cloud Manager
  version: 1.52.1
servers:
  - url: https://api.botpress.cloud
security:
  - BearerAuth: []
tags:
  - name: documented
  - name: experimental
paths:
  /v1/admin/bots/{id}:
    put:
      tags:
        - Endpoints
      description: Update bot
      operationId: updateBot
      parameters:
        - name: id
          in: path
          description: Bot ID
          required: true
          schema:
            type: string
        - name: x-workspace-id
          in: header
          description: Workspace ID
          required: true
          schema:
            type: string
        - name: x-multiple-integrations
          in: header
          description: >-
            Whether the client supports bots with multiple instances of the same
            integration. Set to "true" to receive integration instances keyed by
            their alias instead of their id. This header will be removed in the
            future, and the API will always return multiple instances keyed by
            alias.
          required: false
          schema:
            type: string
      requestBody:
        $ref: '#/components/requestBodies/updateBotBody'
      responses:
        '200':
          $ref: '#/components/responses/updateBotResponse'
        default:
          $ref: '#/components/responses/updateBotResponse'
components:
  requestBodies:
    updateBotBody:
      description: Bot metadata
      content:
        application/json:
          schema:
            type: object
            properties:
              url:
                type: string
                description: URL of the [Bot](#schema_bot); Only available for dev bots
              authentication:
                type: string
                enum:
                  - iam
                description: Type of the [Bot](#schema_bot) authentication (`iam`)
              configuration:
                type: object
                properties:
                  data:
                    type: object
                    additionalProperties: true
                    description: Configuration data
                  schema:
                    type: object
                    additionalProperties: true
                    description: >-
                      Schema of the configuration in the `JSON schema` format.
                      The configuration data is validated against this `JSON
                      schema`.
                additionalProperties: false
              tags:
                type: object
                additionalProperties:
                  type: string
                  maxLength: 500
                description: Optional attributes of the [Bot](#schema_bot)
              blocked:
                type: boolean
              maxExecutionTime:
                type: integer
                description: Maximum execution time (in seconds).
              alwaysAlive:
                type: boolean
                description: >-
                  Indicates if the [Bot](#schema_bot) should be in always alive
                  mode
              user:
                type: object
                properties:
                  tags:
                    type: object
                    additionalProperties:
                      type: object
                      properties:
                        title:
                          type: string
                          maxLength: 64
                          description: Title of the tag
                        description:
                          type: string
                          maxLength: 256
                          description: Description of the tag
                      description: Definition of a tag that can be provided on the object
                      nullable: true
                      additionalProperties: false
                additionalProperties: false
              message:
                type: object
                properties:
                  tags:
                    type: object
                    additionalProperties:
                      type: object
                      properties:
                        title:
                          type: string
                          maxLength: 64
                          description: Title of the tag
                        description:
                          type: string
                          maxLength: 256
                          description: Description of the tag
                      description: Definition of a tag that can be provided on the object
                      nullable: true
                      additionalProperties: false
                additionalProperties: false
              conversation:
                type: object
                properties:
                  tags:
                    type: object
                    additionalProperties:
                      type: object
                      properties:
                        title:
                          type: string
                          maxLength: 64
                          description: Title of the tag
                        description:
                          type: string
                          maxLength: 256
                          description: Description of the tag
                      description: Definition of a tag that can be provided on the object
                      nullable: true
                      additionalProperties: false
                additionalProperties: false
              events:
                type: object
                additionalProperties:
                  type: object
                  properties:
                    title:
                      type: string
                      maxLength: 64
                      description: Title of the event
                    description:
                      type: string
                      maxLength: 256
                      description: Description of the event
                    schema:
                      type: object
                      additionalProperties: true
                    attributes:
                      type: object
                      additionalProperties:
                        type: string
                        maxLength: 200
                        nullable: true
                      description: >-
                        Optional attributes. Set attributes to null to remove
                        them
                  required:
                    - schema
                  nullable: true
                  additionalProperties: false
              actions:
                type: object
                additionalProperties:
                  type: object
                  properties:
                    title:
                      type: string
                      maxLength: 64
                      description: Title of the action
                    description:
                      type: string
                      maxLength: 256
                      description: Description of the action
                    billable:
                      type: boolean
                    cacheable:
                      type: boolean
                    input:
                      type: object
                      properties:
                        schema:
                          type: object
                          additionalProperties: true
                      required:
                        - schema
                      additionalProperties: false
                    output:
                      type: object
                      properties:
                        schema:
                          type: object
                          additionalProperties: true
                      required:
                        - schema
                      additionalProperties: false
                    attributes:
                      type: object
                      additionalProperties:
                        type: string
                        maxLength: 200
                        nullable: true
                      description: >-
                        Optional attributes. Set attributes to null to remove
                        them
                  required:
                    - input
                    - output
                  nullable: true
                  additionalProperties: false
              states:
                type: object
                additionalProperties:
                  type: object
                  properties:
                    type:
                      type: string
                      enum:
                        - conversation
                        - user
                        - bot
                        - task
                      description: >-
                        Type of the [State](#schema_state) (`conversation`,
                        `user`, `bot` or `task`)
                    schema:
                      type: object
                      additionalProperties: true
                      description: >-
                        Schema of the [State](#schema_state) in the `JSON
                        schema` format. This `JSON schema` is going to be used
                        for validating the state data.
                    expiry:
                      type: number
                      minimum: 1
                      description: >-
                        Expiry of the [State](#schema_state) in milliseconds.
                        The state will expire if it is idle for the configured
                        value. By default, a state doesn't expire.
                  required:
                    - type
                    - schema
                  nullable: true
                  additionalProperties: false
              recurringEvents:
                type: object
                additionalProperties:
                  type: object
                  properties:
                    schedule:
                      type: object
                      properties:
                        cron:
                          type: string
                          maxLength: 200
                      required:
                        - cron
                      additionalProperties: false
                    type:
                      type: string
                      maxLength: 200
                    payload:
                      type: object
                      additionalProperties: true
                  required:
                    - schedule
                    - type
                    - payload
                  nullable: true
                  additionalProperties: false
              integrations:
                type: object
                additionalProperties:
                  type: object
                  properties:
                    enabled:
                      type: boolean
                    integrationId:
                      type: string
                      description: >-
                        Integration's definition ID. If defined, the record's
                        key is treated as an alias for the integration instance.
                    configurationType:
                      type: string
                      nullable: true
                      description: >-
                        Integration's configuration type. Set to default if
                        null.
                    configuration:
                      type: object
                      additionalProperties: true
                    disabledChannels:
                      type: array
                      items:
                        type: string
                        description: Channel name
                      description: Disabled channels for this integration
                  nullable: true
                  additionalProperties: false
              plugins:
                type: object
                additionalProperties:
                  type: object
                  properties:
                    id:
                      type: string
                    enabled:
                      type: boolean
                    configuration:
                      type: object
                      additionalProperties: true
                    interfaces:
                      type: object
                      additionalProperties:
                        type: object
                        properties:
                          integrationId:
                            type: string
                          integrationAlias:
                            type: string
                            description: >-
                              When an alias is provided, the plugin will use the
                              integration corresponding to this alias. If not
                              provided, the first integration matching the
                              integrationId will be used.
                          integrationInterfaceAlias:
                            type: string
                            description: >-
                              When an alias is provided, the plugin will use the
                              integration interface corresponding to this alias.
                        required:
                          - integrationId
                        additionalProperties: false
                      description: >-
                        A mapping of plugin interface aliases to their backing
                        integrations
                    integrations:
                      type: object
                      additionalProperties:
                        type: object
                        properties:
                          integrationId:
                            type: string
                          integrationAlias:
                            type: string
                        required:
                          - integrationId
                          - integrationAlias
                        additionalProperties: false
                      description: >-
                        A mapping of plugin integration aliases to their backing
                        integrations
                  required:
                    - id
                  nullable: true
                  additionalProperties: false
                description: A mapping of plugin aliases to their configuration
              subscriptions:
                type: object
                properties:
                  events:
                    type: object
                    additionalProperties:
                      type: object
                      nullable: true
                      additionalProperties: false
                    nullable: true
                required:
                  - events
                additionalProperties: false
              code:
                type: string
                description: JavaScript code of the bot
              name:
                type: string
                minLength: 1
                description: >-
                  Optional name for the bot, if not provided will be
                  auto-generated
              medias:
                type: array
                items:
                  type: object
                  properties:
                    url:
                      type: string
                    name:
                      type: string
                  required:
                    - url
                    - name
                description: Media files associated with the [Bot](#schema_bot)
              layers:
                type: array
                items:
                  type: string
              shouldMergePlugins:
                type: boolean
                description: >-
                  UNUSED. Please ignore this field. It will be removed in the
                  near future.
            title: updateBotBody
            additionalProperties: false
  responses:
    updateBotResponse:
      description: Success
      content:
        application/json:
          schema:
            type: object
            properties:
              bot:
                $ref: '#/components/schemas/Bot'
            required:
              - bot
            title: updateBotResponse
            additionalProperties: false
  schemas:
    Bot:
      type: object
      properties:
        id:
          type: string
          minLength: 28
          maxLength: 36
          description: Id of the [Bot](#schema_bot)
        createdAt:
          type: string
          format: date-time
          description: Creation date of the [Bot](#schema_bot) in ISO 8601 format
        updatedAt:
          type: string
          format: date-time
          description: Updating date of the [Bot](#schema_bot) in ISO 8601 format
        signingSecret:
          type: string
          maxLength: 2000
          description: Signing secret of the [Bot](#schema_bot)
        integrations:
          type: object
          additionalProperties:
            type: object
            properties:
              enabled:
                type: boolean
              name:
                type: string
                maxLength: 200
                description: Name of the [Integration](#schema_integration)
              version:
                type: string
                maxLength: 200
                description: Version of the [Integration](#schema_integration)
              webhookUrl:
                type: string
                maxLength: 2000
              webhookId:
                type: string
                maxLength: 200
              identifier:
                type: string
                maxLength: 2000
              configurationType:
                type: string
                maxLength: 200
                nullable: true
              configuration:
                type: object
                additionalProperties: true
              status:
                type: string
                enum:
                  - registration_pending
                  - registered
                  - registration_failed
                  - unregistration_pending
                  - unregistered
                  - unregistration_failed
              statusReason:
                type: string
                maxLength: 2000
                nullable: true
              disabledChannels:
                type: array
                items:
                  type: string
                  description: Channel name
                description: Disabled channels for this integration
              id:
                type: string
                minLength: 28
                maxLength: 36
                description: ID of the [Integration](#schema_integration)
              createdAt:
                type: string
                format: date-time
                description: >-
                  Creation date of the [Integration](#schema_integration) in ISO
                  8601 format
              updatedAt:
                type: string
                format: date-time
                description: >-
                  Updating date of the [Integration](#schema_integration) in ISO
                  8601 format
              title:
                type: string
                minLength: 1
                maxLength: 64
                description: >-
                  Title of the integration. This is the name that will be
                  displayed in the UI
              description:
                type: string
                maxLength: 256
                description: >-
                  Description of the integration. This is the description that
                  will be displayed in the UI
              iconUrl:
                type: string
                description: >-
                  URL of the icon of the integration. This is the icon that will
                  be displayed in the UI
              public:
                type: boolean
                description: >-
                  [DEPRECATED] Indicates whether the integration is public.
                  Please use the "visibility" parameter instead.
                deprecated: true
              visibility:
                type: string
                enum:
                  - public
                  - private
                  - unlisted
                description: >-
                  The integration's visibility. Public integrations are
                  available to all and cannot be updated without creating a new
                  version. Unlisted integrations behave identically to public
                  integrations, but they are not listed in the integration hub.
                  By default, integrations are private and only accessible to
                  the workspace that created them.
              verificationStatus:
                type: string
                enum:
                  - unapproved
                  - pending
                  - approved
                  - rejected
                description: Status of the integration version verification
            required:
              - enabled
              - name
              - version
              - webhookUrl
              - webhookId
              - configurationType
              - configuration
              - status
              - statusReason
              - disabledChannels
              - id
              - createdAt
              - updatedAt
              - title
              - description
              - iconUrl
              - public
              - visibility
              - verificationStatus
            additionalProperties: false
          description: >-
            A mapping of integrations to their configuration. If the
            `x-multiple-integrations` header is present, this object is keyed by
            integration aliases. Otherwise, this object is keyed by integration
            ids.
        plugins:
          type: object
          additionalProperties:
            type: object
            properties:
              enabled:
                type: boolean
              name:
                type: string
                maxLength: 200
                description: Name of the [Plugin](#schema_plugin)
              version:
                type: string
                maxLength: 200
                description: Version of the [Plugin](#schema_plugin)
              configuration:
                type: object
                additionalProperties: true
              interfaces:
                type: object
                additionalProperties:
                  type: object
                  properties:
                    integrationId:
                      type: string
                      minLength: 28
                      maxLength: 36
                    integrationAlias:
                      type: string
                      maxLength: 200
                    integrationInterfaceAlias:
                      type: string
                      maxLength: 200
                    interfaceId:
                      type: string
                      minLength: 28
                      maxLength: 36
                  required:
                    - integrationId
                    - integrationAlias
                    - interfaceId
                  additionalProperties: false
                description: >-
                  A mapping of plugin interface aliases to their backing
                  integrations
              integrations:
                type: object
                additionalProperties:
                  type: object
                  properties:
                    integrationId:
                      type: string
                      minLength: 28
                      maxLength: 36
                    integrationAlias:
                      type: string
                      maxLength: 200
                  required:
                    - integrationId
                    - integrationAlias
                  additionalProperties: false
                description: >-
                  A mapping of plugin integration aliases to their backing
                  integrations
              id:
                type: string
                minLength: 28
                maxLength: 36
                description: ID of the [Plugin](#schema_plugin)
              createdAt:
                type: string
                format: date-time
                description: >-
                  Creation date of the [Plugin](#schema_plugin) in ISO 8601
                  format
              updatedAt:
                type: string
                format: date-time
                description: >-
                  Updating date of the [Plugin](#schema_plugin) in ISO 8601
                  format
              title:
                type: string
                minLength: 1
                maxLength: 64
                description: >-
                  Title of the plugin. This is the name that will be displayed
                  in the UI
              description:
                type: string
                maxLength: 256
                description: >-
                  Description of the plugin. This is the description that will
                  be displayed in the UI
              iconUrl:
                type: string
                description: >-
                  URL of the icon of the plugin. This is the icon that will be
                  displayed in the UI
              readmeUrl:
                type: string
                description: >-
                  URL of the readme of the plugin. This is the readme that will
                  be displayed in the UI
              public:
                type: boolean
                description: >-
                  Indicates if the plugin is public. Public plugins are
                  available to all and cannot be updated without creating a new
                  version.
            required:
              - enabled
              - name
              - version
              - configuration
              - id
              - createdAt
              - updatedAt
              - title
              - description
              - iconUrl
              - readmeUrl
              - public
            additionalProperties: false
          description: A mapping of plugin aliases to their configuration
        maxExecutionTime:
          type: number
          description: Maximum execution time of the bot (in seconds).
        user:
          type: object
          properties:
            tags:
              type: object
              additionalProperties:
                type: object
                properties:
                  title:
                    type: string
                    maxLength: 64
                    description: Title of the tag
                  description:
                    type: string
                    maxLength: 256
                    description: Description of the tag
                description: Definition of a tag that can be provided on the object
                additionalProperties: false
          required:
            - tags
          description: User object configuration
          additionalProperties: false
        conversation:
          type: object
          properties:
            tags:
              type: object
              additionalProperties:
                type: object
                properties:
                  title:
                    type: string
                    maxLength: 64
                    description: Title of the tag
                  description:
                    type: string
                    maxLength: 256
                    description: Description of the tag
                description: Definition of a tag that can be provided on the object
                additionalProperties: false
          required:
            - tags
          description: Conversation object configuration
          additionalProperties: false
        message:
          type: object
          properties:
            tags:
              type: object
              additionalProperties:
                type: object
                properties:
                  title:
                    type: string
                    maxLength: 64
                    description: Title of the tag
                  description:
                    type: string
                    maxLength: 256
                    description: Description of the tag
                description: Definition of a tag that can be provided on the object
                additionalProperties: false
          required:
            - tags
          description: Message object configuration
          additionalProperties: false
        states:
          type: object
          additionalProperties:
            type: object
            properties:
              type:
                type: string
                enum:
                  - conversation
                  - user
                  - bot
                  - task
                description: >-
                  Type of the [State](#schema_state) (`conversation`, `user`,
                  `bot` or `task`)
              schema:
                type: object
                additionalProperties: true
                description: >-
                  Schema of the [State](#schema_state) in the `JSON schema`
                  format. This `JSON schema` is going to be used for validating
                  the state data.
              expiry:
                type: number
                minimum: 1
                description: >-
                  Expiry of the [State](#schema_state) in milliseconds. The
                  state will expire if it is idle for the configured value. By
                  default, a state doesn't expire.
            required:
              - type
              - schema
            additionalProperties: false
          description: A mapping of states to their definition
        configuration:
          type: object
          properties:
            data:
              type: object
              additionalProperties: true
              description: Configuration data
            schema:
              type: object
              additionalProperties: true
              description: >-
                Schema of the configuration in the `JSON schema` format. The
                configuration data is validated against this `JSON schema`.
          required:
            - data
            - schema
          description: Configuration of the bot
          additionalProperties: false
        events:
          type: object
          additionalProperties:
            type: object
            properties:
              title:
                type: string
                maxLength: 64
                description: Title of the event
              description:
                type: string
                maxLength: 256
                description: Description of the event
              schema:
                type: object
                additionalProperties: true
              attributes:
                type: object
                additionalProperties:
                  type: string
                  maxLength: 200
                description: Optional attributes
            required:
              - schema
            description: Event Definition
            additionalProperties: false
          description: Events definition
        recurringEvents:
          type: object
          additionalProperties:
            type: object
            properties:
              schedule:
                type: object
                properties:
                  cron:
                    type: string
                    maxLength: 200
                required:
                  - cron
                additionalProperties: false
              type:
                type: string
                maxLength: 200
              payload:
                type: object
                additionalProperties: true
              failedAttempts:
                type: number
                description: >-
                  The number of times the recurring event failed to run. This
                  counter resets once the recurring event runs successfully.
              lastFailureReason:
                type: string
                maxLength: 2000
                description: >-
                  The reason why the recurring event failed to run in the last
                  attempt.
                nullable: true
            required:
              - schedule
              - type
              - payload
              - failedAttempts
              - lastFailureReason
            additionalProperties: false
          description: Recurring events
        subscriptions:
          type: object
          properties:
            events:
              type: object
              additionalProperties:
                type: object
                additionalProperties: false
              nullable: true
              description: >-
                Events that the bot is currently subscribed on (ex:
                "slack:reactionAdded"). If null, the bot is subscribed to all
                events.
          required:
            - events
          description: Subscriptions of the bot
          additionalProperties: false
        actions:
          type: object
          additionalProperties:
            type: object
            properties:
              title:
                type: string
                maxLength: 64
                description: Title of the action
              description:
                type: string
                maxLength: 256
                description: Description of the action
              billable:
                type: boolean
              cacheable:
                type: boolean
              input:
                type: object
                properties:
                  schema:
                    type: object
                    additionalProperties: true
                required:
                  - schema
                additionalProperties: false
              output:
                type: object
                properties:
                  schema:
                    type: object
                    additionalProperties: true
                required:
                  - schema
                additionalProperties: false
              attributes:
                type: object
                additionalProperties:
                  type: string
                  maxLength: 200
                description: Optional attributes
            required:
              - input
              - output
            description: Action definition
            additionalProperties: false
          description: Actions definition
        tags:
          type: object
          additionalProperties:
            type: string
          description: Tags of [Bot](#schema_bot)
        name:
          type: string
          description: Name of the [Bot](#schema_bot)
        deployedAt:
          type: string
          format: date-time
          description: >-
            Last deployment date of the [Bot](#schema_bot) in the ISO 8601
            format
        dev:
          type: boolean
          description: >-
            Indicates if the [Bot](#schema_bot) is a development bot;
            Development bots run locally and can install dev integrations
        createdBy:
          type: string
          description: Id of the user that created the bot
        alwaysAlive:
          type: boolean
          description: Indicates if the [Bot](#schema_bot) should be in always alive mode
        status:
          type: string
          enum:
            - active
            - deploying
          description: Status of the bot
        medias:
          type: array
          items:
            type: object
            properties:
              url:
                type: string
                description: URL of the media file
              name:
                type: string
                description: Name of the media file
            required:
              - url
              - name
          description: Media files associated with the [Bot](#schema_bot)
      required:
        - id
        - createdAt
        - updatedAt
        - signingSecret
        - integrations
        - plugins
        - user
        - conversation
        - message
        - states
        - configuration
        - events
        - recurringEvents
        - subscriptions
        - actions
        - tags
        - name
        - dev
        - alwaysAlive
        - status
        - medias
      additionalProperties: false
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````