projects

Retrieve the environment variables of a project by id or name

Changed on

Retrieve the environment variables for a given project by passing either the project id or name in the URL.

get/v10/projects/{idOrName}/env

Request

  • Base URL: https://api.vercel.com
  • URL: https://api.vercel.com/v10/projects/{idOrName}/env
  • Auth: HTTP bearer

Path parameters

idOrNamestring required

The unique project identifier or the project name

Example:prj_XLKmu1DyR1eY7zq8UgeRKbA7yVLA

Query parameters

gitBranchstring

If defined, the git branch of the environment variable to filter the results (must have target=preview)

Example:feature-1
decrypt'true' | 'false'

If true, the environment variable value will be decrypted

Example:true
sourcestring

The source that is calling the endpoint.

Example:vercel-cli:pull
customEnvironmentIdstring

The unique custom environment identifier within the project

Example:env_123abc4567
customEnvironmentSlugstring

The custom environment slug (name) within the project

Example:my-custom-env
teamIdstring
Example:team_1a2b3c4d5e6f7g8h9i0j1k2l

The Team identifier to perform the request on behalf of.

slugstring
Example:my-team-url-slug

The Team slug to perform the request on behalf of.

Response

The list of environment variables for the given project

OR
OR

Example response

{
  "pagination": {
    "count": 20,
    "next": 1540095775951,
    "prev": 1540095775951
  }
}

Changes

    • breaking

      added subschema #1 subschema #2 subschema #3 to the response body oneOf list for the response status

    • info

      removed subschema #1 subschema #2 subschema #3 from the response body oneOf list for the response status

    • info

      added the non-success response with the status