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

# Post environmentvariables

> Create a new environment variable



## OpenAPI

````yaml /schema.json post /environment/variables
openapi: 3.1.0
info:
  version: 01KVQG1C20MKD0B8FDPE4RHEDH
  title: Alumio API
  description: Access Alumio through OpenAPI v3.1.
servers:
  - url: /api/v1
security: []
paths:
  /environment/variables:
    post:
      tags:
        - Environment
      description: Create a new environment variable
      operationId: createEnvironmentVariable
      parameters:
        - name: space
          in: query
          description: Space Identifier
          required: false
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnvironmentVariablePayload'
      responses:
        '201':
          description: Created environment variable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvironmentVariableResult'
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    EnvironmentVariablePayload:
      type: object
      properties:
        name:
          $ref: '#/components/schemas/EnvironmentVariableName'
        description:
          title: Description
          type: string
          maxLength: 150
          ui:
            ui:placeholder: Enter a short description (up to 150 characters).
        value:
          type: string
          ui:
            ui:widget: textarea
        encrypted:
          title: Encrypted
          type: boolean
          ui:
            ui:help: Encrypts the environment variable. Value is hidden in logs.
      required:
        - name
        - value
    EnvironmentVariableResult:
      type: object
      properties:
        object:
          $ref: '#/components/schemas/EnvironmentVariable'
    Error:
      type: object
      properties:
        status:
          type: string
        context:
          type: object
        type:
          type: string
        title:
          type: string
        detail:
          type: string
        violations:
          type: array
          items:
            type: object
            properties:
              title:
                type: string
              propertyPath:
                type: string
              type:
                type: string
    EnvironmentVariableName:
      title: Name
      type: string
      pattern: ^[a-zA-Z0-9_-]+$
    EnvironmentVariable:
      type: object
      properties:
        name:
          $ref: '#/components/schemas/EnvironmentVariableName'
        description:
          title: Description
          type: string
          maxLength: 150
        value:
          title: Value
          type: string
        encrypted:
          title: Encrypted
          type: boolean
        default:
          type: boolean
      required:
        - name

````