Overview
Returns all environment variables for a specific project and environment. When called from inside a task, theprojectRef and env arguments can be omitted and are inferred automatically from the task’s runtime context.
Supports both secret key and Personal Access Token authentication.
Endpoint
Path parameters
The project reference (e.g.
proj_yubjwjsfkxnylobaqvqz). Find it in your dashboard URL or project settings.The target environment:
dev, staging, prod, or preview.Response
Returns an array of environment variable objects.The name of the environment variable (e.g.
SLACK_API_KEY).The value of the environment variable.
Examples
Response example
Preview branches
When listing env vars for thepreview environment and you want to target a specific branch, include the x-trigger-branch header (HTTP) or the previewBranch SDK option.
- SDK
- cURL