Skip to content

List environment variables

GET/v1/deployments/{uid}/env-vars

Returns the deployment's environment variables, sorted by key. Values are never returned here; masked_value is always ••••••••. To read one value, use Reveal an environment variable.

Requires a workspace role that can read secrets (viewers cannot).

Authentication

Send your API key as Authorization: Bearer <token>. The request is scoped to the workspace in X-Workspace-Slug.

Path parameters

uidstringRequired

The deployment's uid.

Headers

X-Workspace-SlugstringRequired

Slug of the workspace the request acts on. You can also pass it as the workspace_slug query parameter.

Response

200

The environment variables, without values.

successbooleanRequired

true when the request succeeded.

messagestringRequired

Human-readable status message.

dataarray of objects
Show item attributes
uidstringRequired

Unique identifier of the variable.

keystringRequired

Variable name.

scopestringRequired

Always build. Every variable is available at build time and at runtime.

is_secretbooleanRequired

Whether the value is marked secret.

masked_valuestringRequired

Always ••••••••. The value is never returned here.

created_atstring (date-time)Required

When the variable was created.

updated_atstring (date-time)Required

When it was last changed.

Errors

StatusMeaning
401The API key is missing, invalid, expired or revoked.
403You cannot access the workspace, your role does not allow this action, or the account is suspended.
404The resource does not exist or you cannot access it.

Errors use the standard error format.