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

# Add Variable



## OpenAPI

````yaml POST /io.pocketenv.variable.addVariable
openapi: 3.1.0
info:
  title: AT Protocol XRPC API
  summary: >-
    An unofficial conversion of AT Protocol's lexicons to OpenAPI's schema
    format.
  version: 0.0.0
  license:
    name: MIT License
    identifier: MIT
servers:
  - url: https://api.pocketenv.io/xrpc/
    description: AT Protocol PDS XRPC server
  - url: https://api.pocketenv.io/xrpc/
    description: AT Protocol AppView XRPC server
security: []
tags:
  - name: io.pocketenv.actor
  - name: app.bsky.actor
  - name: io.pocketenv.file
  - name: io.pocketenv.port
  - name: io.pocketenv.publicKey
  - name: io.pocketenv.sandbox
  - name: io.pocketenv.secret
  - name: io.pocketenv.service
  - name: com.atproto.repo
  - name: io.pocketenv.variable
  - name: io.pocketenv.volume
paths:
  /io.pocketenv.variable.addVariable:
    post:
      tags:
        - io.pocketenv.variable
      operationId: io.pocketenv.variable.addVariable
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - variable
              properties:
                variable:
                  $ref: '#/components/schemas/io.pocketenv.variable.defs.variable'
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                  - message
                properties:
                  error:
                    type: string
                    oneOf:
                      - const: InvalidRequest
                      - const: ExpiredToken
                      - const: InvalidToken
                  message:
                    type: string
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                  - message
                properties:
                  error:
                    const: AuthMissing
                  message:
                    type: string
      security:
        - Bearer: []
components:
  schemas:
    io.pocketenv.variable.defs.variable:
      type: object
      required:
        - name
        - value
      properties:
        sandboxId:
          type: string
          description: >-
            The ID of the sandbox to which the environment variable belongs.
            This is used to associate the variable with a specific sandbox
            environment.
        name:
          type: string
          description: Name of the environment variable, e.g. 'NODE_ENV', 'PORT', etc.
        value:
          type: string
          description: >-
            Value of the environment variable. This will be visible in API
            responses and should not contain sensitive information.
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer

````