List all environment variables via API
This method allows you to list all environment variables for a project.
URL
/projects/<permalink>/environment_variables
- Replace
<permalink>with the permalink of the project.
HTTP Method
GET
Example cURL request
curl -H "Content-type: application/json" \
-H "Accept: application/json" \
--user your-email@example.com:your-api-key \
-X GET \
https://your-account.deployhq.com/projects/your-project/environment_variables
Example response
[
{
"identifier": 123,
"name": "DATABASE_URL",
"masked_value": "••••••••",
"locked": false,
"build_pipeline": true,
"created_at": "2025-01-27T12:00:00.000Z",
"updated_at": "2025-01-27T12:00:00.000Z"
},
{
"identifier": 124,
"name": "API_KEY",
"masked_value": "••••••••",
"locked": true,
"build_pipeline": true,
"created_at": "2025-01-27T12:05:00.000Z",
"updated_at": "2025-01-27T12:05:00.000Z"
}
]
Response Fields
identifier- The unique ID of the environment variablename- The variable namemasked_value- The encrypted value (always shown as ••••••••)locked- Whether the variable is locked and immutablebuild_pipeline- Whether the variable is available in the Build Pipelinecreated_at- When the variable was createdupdated_at- When the variable was last updated