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

# Create project environment variables

> Create one or more encrypted project environment variables.



## OpenAPI

````yaml https://api.tembo.io/public-api/openapi/public post /v1/projects/{projectId}/environment-variables
openapi: 3.1.0
info:
  title: Tembo Public API
  description: Public API Endpoints for Tembo
  version: 1.0.0
servers:
  - url: https://api.tembo.io
    description: Tembo API
  - url: https://{deployment-origin}/api/public-api
    description: Self-hosted Tembo
    variables:
      deployment-origin:
        default: tembo.example.com
        description: Hostname of your self-hosted Tembo deployment
security: []
paths:
  /v1/projects/{projectId}/environment-variables:
    post:
      tags:
        - Projects
      summary: Create project environment variables
      description: Create one or more encrypted project environment variables.
      operationId: createProjectEnvironmentVariables
      parameters:
        - in: path
          name: projectId
          schema:
            type: string
            minLength: 1
            maxLength: 255
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                secrets:
                  type: array
                  items:
                    type: object
                    properties:
                      key:
                        type: string
                        pattern: ^[A-Za-z_][A-Za-z0-9_]*$
                      value:
                        type: string
                        minLength: 1
                        maxLength: 10000
                    required:
                      - key
                      - value
                    additionalProperties: false
                  minItems: 1
                  maxItems: 100
              required:
                - secrets
              additionalProperties: false
      responses:
        '201':
          description: Create project environment variables
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        key:
                          type: string
                          pattern: ^[A-Za-z_][A-Za-z0-9_]*$
                      required:
                        - key
                      additionalProperties: false
                required:
                  - items
                additionalProperties: false
        '400':
          description: Validation error or missing resource scope
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '404':
          description: Project resource not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '409':
          description: Project resource conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '500':
          description: Project operation failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
      security:
        - apiKey: []
components:
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer

````