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

# Rename App Variable

> Rename a variable for a specific app.



## OpenAPI

````yaml patch /apps/{app_id}/variables/{key}
openapi: 3.0.0
info:
  version: 1.0.0
  title: API
servers: []
security: []
paths:
  /apps/{app_id}/variables/{key}:
    patch:
      summary: Rename App Variable
      description: Rename a variable for a specific app.
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the app
          name: app_id
          in: path
        - schema:
            type: string
          required: true
          description: The key of the variable to rename.
          name: key
          in: path
      requestBody:
        description: The new variable information.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAppVariableSchema'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/UpdateAppVariableSchema'
      responses:
        '200':
          description: The updated app variables.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppVariableSchema'
components:
  schemas:
    UpdateAppVariableSchema:
      type: object
      properties:
        key:
          type: string
          maxLength: 128
          pattern: ^[a-zA-Z_][a-zA-Z_0-9]*$
          description: The key of the app variable
        value:
          type: string
          maxLength: 2048
          description: The value of the app variable
        secret:
          type: boolean
          description: Indicates if the variable is a secret
          example: true
      description: Detailed information about a variable in your app
    AppVariableSchema:
      type: object
      properties:
        key:
          type: string
          maxLength: 128
          pattern: ^[a-zA-Z_][a-zA-Z_0-9]*$
          description: The key of the app variable
        value:
          type: string
          maxLength: 2048
          description: The value of the app variable
        secret:
          type: boolean
          description: Indicates if the variable is a secret
          example: true
      required:
        - key
      description: Detailed information about a variable in your app

````