v66

OpenAPI 3.1.0raw.githubusercontent.com2026-08-0174265626.3 KB
environments

List environment variables

Retrieve the environment variables for an environment.

Identify the environment by its project, app, and environment identifiers. Results are ordered by variable id and paginated; when hasMore is true, pass the returned cursor to fetch the next page.

recoverable variables are returned with their decrypted plaintext value. writeonly variables never expose a value: only the key, kind, and description are returned.

Required Permissions

Your root key must have one of the following permissions:

  • environment.*.read_environment_variables (for any environment)
  • environment.<environment_id>.read_environment_variables (for a specific environment)
post/v2/environments.listEnvironmentVariables

Request body

projectstring required

Identifies a resource by either its unique ID or its slug. Accepts a prefixed ID (such as 'proj_' or 'app_') or a slug.

appstring required

Identifies a resource by either its unique ID or its slug. Accepts a prefixed ID (such as 'proj_' or 'app_') or a slug.

environmentstring required

Identifies a resource by either its unique ID or its slug. Accepts a prefixed ID (such as 'proj_' or 'app_') or a slug.

limitinteger

Maximum number of variables to return per request.

cursorstring

Pagination cursor from a previous response to fetch the next page. Use when hasMore: true in the previous response.

Example request

{
  "project": "proj_1234abcd",
  "app": "proj_1234abcd",
  "environment": "proj_1234abcd"
}

Response

Successfully retrieved a page of environment variables.

Example response

{
  "meta": {
    "requestId": "req_123"
  },
  "data": [
    {
      "key": "DATABASE_URL",
      "kind": "writeonly",
      "value": "postgresql://user:pass@host:5432/db",
      "description": "Primary database connection string",
      "createdAt": 1704067200000
    }
  ],
  "pagination": {
    "cursor": "eyJrZXkiOiJrZXlfMTIzNCIsInRzIjoxNjk5Mzc4ODAwfQ==",
    "hasMore": true
  }
}