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

# Get deployment environment variable

> Returns one provider environment variable, including its decrypted value.



## OpenAPI

````yaml https://raw.githubusercontent.com/InsForge/InsForge/main/openapi/deployments.yaml get /api/deployments/env-vars/{id}
openapi: 3.0.3
info:
  title: Insforge Deployments API
  version: 1.0.0
  description: >-
    Frontend deployment sessions, source uploads, environment variables, and
    custom domains.
servers: []
security: []
paths:
  /api/deployments/env-vars/{id}:
    get:
      tags:
        - Admin
      summary: Get deployment environment variable
      description: >-
        Returns one provider environment variable, including its decrypted
        value.
      parameters:
        - $ref: '#/components/parameters/EnvVarId'
      responses:
        '200':
          description: Environment variable with value
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetEnvVarResponse'
        '401':
          description: Unauthorized
        '403':
          description: Admin access required
        '404':
          $ref: '#/components/responses/Error'
        '500':
          $ref: '#/components/responses/Error'
        '503':
          description: Deployment provider is not configured
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
        - apiKey: []
components:
  parameters:
    EnvVarId:
      name: id
      in: path
      required: true
      schema:
        type: string
      description: Provider environment variable ID.
  schemas:
    GetEnvVarResponse:
      type: object
      required:
        - envVar
      properties:
        envVar:
          $ref: '#/components/schemas/DeploymentEnvVarWithValue'
    ErrorResponse:
      type: object
      required:
        - error
        - message
        - statusCode
      properties:
        error:
          type: string
          description: Error code for programmatic handling.
        message:
          type: string
          description: Human-readable error message.
        statusCode:
          type: integer
        nextActions:
          type: string
          description: Suggested action to resolve the error.
    DeploymentEnvVarWithValue:
      allOf:
        - $ref: '#/components/schemas/DeploymentEnvVar'
        - type: object
          required:
            - value
          properties:
            value:
              type: string
    DeploymentEnvVar:
      type: object
      required:
        - id
        - key
        - type
      properties:
        id:
          type: string
        key:
          type: string
        type:
          type: string
          enum:
            - plain
            - encrypted
            - secret
            - sensitive
            - system
        updatedAt:
          type: integer
          description: Unix timestamp in milliseconds.
  responses:
    Error:
      description: Error response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Project admin JWT or an API key passed as a Bearer token.
    apiKey:
      type: apiKey
      in: header
      name: x-api-key

````