Vers env_vars API

The env_vars API from Vers — 2 operation(s) for env_vars.

Operations 3

GET /api/v1/env_vars #
PUT /api/v1/env_vars #
DELETE /api/v1/env_vars/{key} #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/vers-env-vars-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

vers-env-vars-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Orchestrator Control Plane commit_tags Env Vars API
  description: ''
  license:
    name: ''
  version: 0.1.0
servers:
- url: https://api.vers.sh
  description: Base URL declared by the provider in apis.yml (roadmap#122).
tags:
- name: env_vars
paths:
  /api/v1/env_vars:
    get:
      tags:
      - env_vars
      operationId: list_env_vars
      responses:
        '200':
          description: Current environment variables
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvVarsResponse'
        '401':
          description: Unauthorized
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
      - bearer_auth: []
    put:
      tags:
      - env_vars
      operationId: set_env_vars
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetEnvVarsRequest'
        required: true
      responses:
        '200':
          description: Environment variables updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvVarsResponse'
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
      - bearer_auth: []
  /api/v1/env_vars/{key}:
    delete:
      tags:
      - env_vars
      operationId: delete_env_var
      parameters:
      - name: key
        in: path
        description: Environment variable key to delete
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Environment variable deleted
        '401':
          description: Unauthorized
        '404':
          description: Environment variable not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
      - bearer_auth: []
components:
  schemas:
    SetEnvVarsRequest:
      type: object
      description: 'Request body for PUT /env_vars — sets (upserts) one or more environment variables.


        # Lifecycle model


        Environment variables are written to `/etc/environment` inside a VM **once

        at boot time** via a vsock `WriteFile` request. They are **not** live-synced

        to running VMs. This is intentional: VMs are ephemeral (create → use →

        destroy/branch), so env var changes naturally take effect on the next VM.


        The `replace` flag exists so callers can atomically express "I want exactly

        these variables and nothing else" without having to DELETE each stale key

        individually. Without it, the only way to remove a variable from future VMs

        is a separate `DELETE /env_vars/{key}` call per key.'
      required:
      - vars
      properties:
        replace:
          type: boolean
          description: 'If true, delete all existing variables before writing the new set.

            This gives "set exactly these vars" semantics. Default: false (upsert).'
        vars:
          type: object
          description: 'Key-value pairs to set. Keys must be valid shell identifiers

            (`^[A-Za-z_][A-Za-z0-9_]*$`, max 256 chars). Values max 8192 chars.


            When `replace` is false (default): existing keys are overwritten, keys

            not mentioned are left untouched (upsert semantics).


            When `replace` is true: all existing variables are deleted first, then

            only the provided vars are stored (replace-all semantics).'
          additionalProperties:
            type: string
          propertyNames:
            type: string
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Reason of error
        success:
          type: boolean
          description: 'Is always: false'
    EnvVarsResponse:
      type: object
      description: Response body for GET /env_vars and PUT /env_vars.
      required:
      - vars
      properties:
        vars:
          type: object
          description: All environment variables currently set for the authenticated user.
          additionalProperties:
            type: string
          propertyNames:
            type: string
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer
      bearerFormat: Token