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

# Upsert Environment Variables

> Create or update one or more environment variables.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v2/external/environment-variables/
openapi: 3.1.0
info:
  title: Lyceum Cloud Execution API
  version: 0.1.0
servers: []
security: []
paths:
  /api/v2/external/environment-variables/:
    post:
      tags:
        - Environment Variables
      summary: Upsert Environment Variables
      description: Create or update one or more environment variables.
      operationId: upsert_environment_variables_api_v2_external_environment_variables__post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnvironmentVariableUpsert'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvironmentVariableUpsertResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    EnvironmentVariableUpsert:
      properties:
        environment_variables:
          items:
            $ref: '#/components/schemas/EnvironmentVariableCreate'
          type: array
          minItems: 1
          title: Environment Variables
          description: List of environment variables to create or update
      type: object
      required:
        - environment_variables
      title: EnvironmentVariableUpsert
    EnvironmentVariableUpsertResponse:
      properties:
        environment_variables:
          items:
            $ref: '#/components/schemas/EnvironmentVariableResponse'
          type: array
          title: Environment Variables
      type: object
      required:
        - environment_variables
      title: EnvironmentVariableUpsertResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    EnvironmentVariableCreate:
      properties:
        name:
          type: string
          minLength: 1
          title: Name
          description: Environment variable name
        value:
          type: string
          title: Value
          description: Environment variable value
      type: object
      required:
        - name
        - value
      title: EnvironmentVariableCreate
    EnvironmentVariableResponse:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        value:
          type: string
          title: Value
        is_sensitive:
          type: boolean
          title: Is Sensitive
          default: true
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - id
        - name
        - value
        - created_at
        - updated_at
      title: EnvironmentVariableResponse
    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

````