HTTP API

Official SDKs

Do not hand-roll a client. @goenvless/sdk for TypeScript, envless-sdk for Python and Ruby, and envless/sdk for PHP are typed clients covering 100% of this API.

Everything on the following pages is reachable over plain HTTP, and everything on the following pages already has a typed method in @goenvless/sdk for TypeScript, in envless-sdk for Python and for Ruby, and in envless/sdk for PHP. Unless you are working in a language none of them covers, use an SDK.

npm install @goenvless/sdk
import { createClient } from '@goenvless/sdk'

const envless = createClient({ token: process.env.ENVLESS_TOKEN })

const workspace = await envless.workspace.get()

for await (const project of envless.projects.iterate()) {
    console.log(project.slug)
}

What it saves you

Doing it by handWith the SDK
Unwrap the { success, code, message, error, data } envelope on every responseMethods resolve to data, or throw
Parse error.code out of a failure body yourselfEnvlessApiError with code, resource, field, requestId
Walk limit and offset until hasMore is falselist, listAll, iterate on every collection
Decide which methods are safe to retryGET, HEAD, PUT and DELETE retry on 408, 429, 500, 502, 503 and 504, with backoff and a numeric Retry-After honoured. POST and PATCH never retry
Implement PBKDF2 and AES-GCM to the exact recipeencryptValue, decryptValue, ENCRYPTION_PARAMETERS
Re-encrypt version history by hand when rotating a passphraserotateWorkspacePassphrase walks live values and history
Hand-roll HMAC verification for incoming webhooksverifyWebhookSignature

The Python SDK has every one of these under its snake_case name, list_all, encrypt_value, rotate_workspace_passphrase and verify_webhook_signature, with request_id on its errors and an AsyncEnvless for asyncio and trio.

The Ruby SDK has them under the same snake_case names too, with request_id and predicates such as not_found? on Envless::ApiError, an Enumerator from iterate, and RBS types for every call.

The PHP SDK keeps the TypeScript names exactly, with encryptValue, rotateWorkspacePassphrase and verifyWebhookSignature as static methods on Envless\Envless, errorCode and requestId on Envless\Exception\ApiException, a Generator from iterate, and PHPStan and Psalm types for every call.

Coverage is enforced, not claimed. The TypeScript SDK runs a parity check against this openapi.json on every build and fails if any documented operation lacks a method, or any method points at an operation that does not exist. The Python, Ruby and PHP SDKs each run their own check, which replays every method against the requests the TypeScript SDK sends and fails on any difference.

The packages and their jobs

PackageJob
@goenvless/sdkAdministers a workspace from TypeScript. Authenticates with an API key.
envless-sdkAdministers a workspace from Python, sync or async. The same methods, on PyPI.
envless-sdkAdministers a workspace from Ruby. The same methods, on RubyGems.
envless/sdkAdministers a workspace from PHP. The same methods, on Packagist.
@goenvless/envLoads variables into a running app. Library only, no terminal command.
envless-envLoads variables into a running Python app. The same loader, on PyPI.
envless/envLoads variables into a running PHP app. The same loader, on Packagist.
@goenvless/cliShips the envless terminal binary. Nothing importable.
This HTTP APIThe wire protocol underneath all of them.