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

# List environment variables



## OpenAPI

````yaml https://api.specular.dev/openapi.json get /branches/{id}/env-vars
openapi: 3.0.0
info:
  title: Specular API
  description: Backend-as-a-Service API for managing projects and branches
  version: 1.0.0
servers:
  - url: https://api.specular.dev
    description: Production server
  - url: http://localhost:3000
    description: Development server
security:
  - bearerAuth: []
paths:
  /branches/{id}/env-vars:
    get:
      tags:
        - Branches
      summary: List environment variables
      parameters:
        - schema:
            type: string
          in: path
          name: id
          required: true
          description: Branch ID
      responses:
        '200':
          description: Environment variables list
          content:
            application/json:
              schema:
                description: Environment variables list
                type: object
                properties:
                  environmentVariables:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        value:
                          type: string
                        createdAt:
                          type: string
                          format: date-time
                        updatedAt:
                          type: string
                          format: date-time
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                description: Authentication required
                type: object
                properties:
                  error:
                    type: string
        '404':
          description: Branch not found
          content:
            application/json:
              schema:
                description: Branch not found
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: 'Bearer authentication with API key (format: Bearer sk_xxx)'

````