---
title: "Get a masked environment variable"
method: GET
path: "/project/{project-slug}/envvar/{name}"
tags: ["Project"]
---

# Get a masked environment variable

`GET /project/{project-slug}/envvar/{name}`

## Request

- Base URL: `https://circleci.com/api/v2`
- URL: `https://circleci.com/api/v2/project/{project-slug}/envvar/{name}`
- Auth: one of:
  - API key in header `Circle-Token`
  - HTTP bearer
  - HTTP basic
  - API key in query parameter `circle-token`

Returns the masked value of environment variable :name.

## Path parameters

- `project-slug` string, required
- `name` string, required

## Response `200`

The environment variable.

- object: An environment variable is a map containing a value and an optional timestamp.
  - `name` string, required: The name of the environment variable.
  - `value` string, required: The value of the environment variable.
  - `created-at` string: The creation timestamp of the environment variable.

## Other responses

- `default`: Error response.

---

[API](https://skmtc.dev/circleci/apis/circleci-api.md) - [All operations](https://skmtc.dev/circleci/apis/circleci-api/llms.txt) - [OpenAPI document](https://skmtc.dev/circleci/apis/circleci-api/revisions/b9c0e0c24058?raw)
