---
title: "Retrieve an environment variable"
method: GET
path: "/v1/variables/{key}"
tags: ["Environment variables"]
---

# Retrieve an environment variable

`GET /v1/variables/{key}`

Show details of a specific environment variable. Uses the "key" field for selection.

## Path parameters

- `key` string, required — The key of the environment variable (this value cannot be changed).

## Headers

- `x-checkly-account` string, uuid — Your Checkly account ID, you can find it at https://app.checklyhq.com/settings/account/general

## Response `200`

Successful

- EnvironmentVariablesV1ReadResponse
  - `key` string, required — The key of the environment variable (this value cannot be changed).
  - `value` string, nullable, required — The value of the environment variable. Secret values are always returned as null.
  - `locked` boolean, required — Used only in the UI to hide the value like a password.
  - `secret` boolean, required — Whether the environment variable is stored as a secret.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `429` — Too Many Requests

---

[API](https://skmtc.net/checklyhq/apis/checkly-public-api.md) · [All operations](https://skmtc.net/checklyhq/apis/checkly-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/checklyhq/checkly-public-api/revisions/87d29dc7b4fe/schema)
