Skip to main content
GET
/
v1
/
projects
/
{idOrName}
/
env
/
{id}
getProjectEnv
import { Vercel } from "@vercel/sdk";

const vercel = new Vercel({
  bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await vercel.projects.getProjectEnv({
    idOrName: "prj_XLKmu1DyR1eY7zq8UgeRKbA7yVLA",
    id: "<id>",
    teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
    slug: "my-team-url-slug",
  });

  console.log(result);
}

run();
{
  "decrypted": true,
  "type": "system",
  "key": "<string>",
  "target": [
    "production"
  ],
  "sunsetSecretId": "<string>",
  "id": "<string>",
  "configurationId": "<string>",
  "createdAt": 123,
  "updatedAt": 123,
  "createdBy": "<string>",
  "updatedBy": "<string>",
  "gitBranch": "<string>",
  "edgeConfigId": "<string>",
  "edgeConfigTokenId": "<string>",
  "contentHint": {
    "type": "redis-url",
    "storeId": "<string>"
  },
  "internalContentHint": {
    "type": "flags-secret",
    "encryptedValue": "<string>"
  },
  "comment": "<string>",
  "customEnvironmentIds": [
    "<string>"
  ]
}

Authorizations

Authorization
string
header
required

Default authentication mechanism

Path Parameters

idOrName
string
required

The unique project identifier or the project name The unique project identifier or the project name

Example:

"prj_XLKmu1DyR1eY7zq8UgeRKbA7yVLA"

id
string
required

The unique ID for the environment variable to get the decrypted value. The unique ID for the environment variable to get the decrypted value.

Query Parameters

teamId
string

The Team identifier to perform the request on behalf of.

Example:

"team_1a2b3c4d5e6f7g8h9i0j1k2l"

slug
string

The Team slug to perform the request on behalf of.

Example:

"my-team-url-slug"

Response

  • Option 1
  • Option 2
  • Option 3
decrypted
boolean
required
type
enum<string>
required
Available options:
system,
encrypted,
plain,
sensitive,
secret
key
string
required
target
Available options:
production,
preview,
development,
preview,
development
sunsetSecretId
string

This is used to identiy variables that have been migrated from type secret to sensitive.

id
string
configurationId
string | null
createdAt
number
updatedAt
number
createdBy
string | null
updatedBy
string | null
gitBranch
string
edgeConfigId
string | null
edgeConfigTokenId
string | null
contentHint
object
  • Option 1
  • Option 2
  • Option 3
  • Option 4
  • Option 5
  • Option 6
  • Option 7
  • Option 8
  • Option 9
  • Option 10
  • Option 11
  • Option 12
  • Option 13
  • Option 14
  • Option 15
internalContentHint
object

Similar to contentHints, but should not be exposed to the user.

comment
string
customEnvironmentIds
string[]