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

# Export a bot



## OpenAPI

````yaml https://megastream25-api.closebot.com/swagger/v1/swagger.json get /bot/{id}/export
openapi: 3.0.1
info:
  title: CloseBot API
  version: v1
servers:
  - url: https://api.closebot.com
    description: CloseBot API Endpoint
security:
  - Key: []
paths:
  /bot/{id}/export:
    get:
      tags:
        - Bot
      summary: Export a bot
      parameters:
        - name: id
          in: path
          description: The bot ID.
          required: true
          style: simple
          schema:
            type: string
        - name: botVersion
          in: query
          description: >-
            The bot version (x.y.z). If not provided, the latest version is
            exported.
          style: form
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ExportBotResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ExportBotResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ExportBotResponse'
components:
  schemas:
    ExportBotResponse:
      type: object
      properties:
        id:
          type: string
          description: The bot ID
          nullable: true
        kdl:
          type: string
          description: The KDL for the bot
          nullable: true
        version:
          type: string
          description: The version of the bot
          nullable: true
      additionalProperties: false
  securitySchemes:
    Key:
      type: apiKey
      description: CloseBot API Key Authorization
      name: X-CB-KEY
      in: header

````