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

# Update a source variable



## OpenAPI

````yaml https://megastream25-api.closebot.com/swagger/v1/swagger.json post /botVariables/{botId}/{sourceId}
openapi: 3.0.1
info:
  title: CloseBot API
  version: v1
servers:
  - url: https://api.closebot.com
    description: CloseBot API Endpoint
security:
  - Key: []
paths:
  /botVariables/{botId}/{sourceId}:
    post:
      tags:
        - BotSourceVariable
      summary: Update a source variable
      parameters:
        - name: botId
          in: path
          description: The bot ID.
          required: true
          style: simple
          schema:
            type: string
        - name: sourceId
          in: path
          description: The source ID.
          required: true
          style: simple
          schema:
            type: string
      requestBody:
        description: The list of variables to update.
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/BotVariableUpdateInput'
          text/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/BotVariableUpdateInput'
          application/*+json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/BotVariableUpdateInput'
      responses:
        '200':
          description: Success
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
components:
  schemas:
    BotVariableUpdateInput:
      type: object
      properties:
        id:
          type: string
          nullable: true
        value:
          type: string
          nullable: true
      additionalProperties: false
    ProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
      additionalProperties: {}
  securitySchemes:
    Key:
      type: apiKey
      description: CloseBot API Key Authorization
      name: X-CB-KEY
      in: header

````