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

# Save a bot



## OpenAPI

````yaml https://megastream25-api.closebot.com/swagger/v1/swagger.json post /bot/{id}/save
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}/save:
    post:
      tags:
        - Bot
      summary: Save a bot
      parameters:
        - name: id
          in: path
          description: The bot ID.
          required: true
          style: simple
          schema:
            type: string
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SaveBotInput'
          text/json:
            schema:
              $ref: '#/components/schemas/SaveBotInput'
          application/*+json:
            schema:
              $ref: '#/components/schemas/SaveBotInput'
      responses:
        '200':
          description: Success
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/SaveBotResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/SaveBotResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/SaveBotResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/SaveBotResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/SaveBotResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/SaveBotResponse'
components:
  schemas:
    SaveBotInput:
      type: object
      properties:
        botSteps: {}
        layoutOnly:
          type: boolean
      additionalProperties: false
    SaveBotResponse:
      type: object
      properties:
        version:
          type: string
          nullable: true
        invalidPaths:
          type: array
          items:
            type: string
          nullable: true
        message:
          type: string
          nullable: true
      additionalProperties: false
  securitySchemes:
    Key:
      type: apiKey
      description: CloseBot API Key Authorization
      name: X-CB-KEY
      in: header

````