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

# Update Variable

> Update a variable or secret.



## OpenAPI

````yaml patch /v1/variables/{variable_id}
openapi: 3.1.0
info:
  title: Noxus Backend
  description: >-
    Backend API for the Noxus Platform. More information can be found at
    https://docs.noxus.ai
  version: 1.1.0
servers: []
security: []
paths:
  /v1/variables/{variable_id}:
    patch:
      tags:
        - V1 - Variables
      summary: Update Variable
      description: Update a variable or secret.
      operationId: update_variable
      parameters:
        - name: variable_id
          in: path
          required: true
          schema:
            type: string
            title: Variable Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VariablePatchRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                title: Response Update Variable
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    VariablePatchRequest:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        value_type:
          anyOf:
            - type: string
              enum:
                - string
                - number
                - boolean
                - json
                - datetime
                - file
            - type: 'null'
          title: Value Type
        source:
          anyOf:
            - type: string
              enum:
                - inline
                - vault
                - environment
            - type: 'null'
          title: Source
        inline_value:
          anyOf:
            - type: string
            - type: 'null'
          title: Inline Value
        vault_credential_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Vault Credential Id
        vault_path:
          anyOf:
            - type: string
            - type: 'null'
          title: Vault Path
        vault_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Vault Key
        env_var_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Env Var Name
      type: object
      title: VariablePatchRequest
      description: Partial-update payload — same shape, all fields optional.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````