---
title: "Get Environment Variable"
method: GET
path: "/projects/{projectId}/env-vars/{environmentVariableId}"
tags: ["projects"]
---

# Get Environment Variable

`GET /projects/{projectId}/env-vars/{environmentVariableId}`

Retrieves a specific environment variable for a given project by its ID, including its value.

## Path parameters

- `projectId` string, required
- `environmentVariableId` string, required

## Query parameters

- `decrypted` 'true' | 'false' — Whether to return decrypted values. Defaults to false (encrypted).

## Response `200`

Success

- object
  - `object` 'environment_variable', required
  - `data` EnvironmentVariableDetailSchema, required — Detailed information for an environment variable including its value.
    - `id` string, required — A unique identifier for the environment variable.
    - `object` 'environment_variable', required — The object type.
    - `key` string, required — The name of the environment variable.
    - `value` string, required — The value of the environment variable.
    - `decrypted` boolean, required — Whether the value is decrypted or encrypted.
    - `createdAt` number, required — The timestamp when the environment variable was created.
    - `updatedAt` number — The timestamp when the environment variable was last updated.

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `409` — Conflict
- `413` — Payload Too Large
- `422` — Unprocessable Entity
- `429` — Too Many Requests
- `500` — Internal Server Error

---

[API](https://skmtc.dev/vercel/apis/v0-platform-api-beta.md) · [All operations](https://skmtc.dev/vercel/apis/v0-platform-api-beta/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/vercel/v0-platform-api-beta/revisions/fd6d8c3bee8a/schema)
