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

# Set

> Set environment variables in a batch — existing keys in the addressed environment (production by default) are overwritten.



## OpenAPI

````yaml /openapi.json put /v1/orgs/{orgId}/projects/{projectId}/env
openapi: 3.1.0
info:
  title: Korve API
  version: 0.1.0
  description: >-
    Typed control plane for deploying applications and explicitly provisioning
    their managed infrastructure.
servers:
  - url: https://api.korve.dev
security: []
paths:
  /v1/orgs/{orgId}/projects/{projectId}/env:
    put:
      tags:
        - env
      summary: Set
      description: >-
        Set environment variables in a batch — existing keys in the addressed
        environment (production by default) are overwritten.
      operationId: env.set
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
          description: The organization's id (UUID) or slug — either form is accepted.
        - name: projectId
          in: path
          required: true
          schema:
            type: string
          description: The project's id (UUID) or slug — either form is accepted.
        - name: environment
          in: query
          required: false
          schema:
            type: string
            pattern: ^[a-z][a-z0-9-]{0,38}$
          description: >-
            Environment slug to scope this operation to. Defaults to
            "production". An environment that does not exist on the project
            answers 404. Writes land only in the addressed environment.
      requestBody:
        required: true
        x-korve-max-bytes: 1048576
        content:
          application/json:
            schema:
              type: object
              properties:
                vars:
                  type: array
                  minItems: 1
                  maxItems: 100
                  items:
                    type: object
                    properties:
                      key:
                        type: string
                        pattern: ^[A-Z][A-Z0-9_]{0,63}$
                        maxLength: 128
                      value:
                        type: string
                        maxLength: 65536
                    required:
                      - key
                      - value
              required:
                - vars
      responses:
        '200':
          description: Variables stored.
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                required:
                  - count
        '402':
          description: Organization billing is not active.
        '404':
          description: No such project or environment in this organization.
        '422':
          description: Invalid variable key or value.
      security:
        - apiKey: []
        - session: []
components:
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: korve_api_key
    session:
      type: apiKey
      in: cookie
      name: korve.session_token

````