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

# Delete an environment variable

`DELETE /v1/variables/{key}`

Permanently removes an environment variable. Uses the "key" field as the ID for deletion.

## 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 `204`

No Content

## Other responses

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

## Changes

- **2026-08-12** `87d29dc7b4fe` — 2 breaking, 2 warning, 11 info
  - for the `path` request parameter `key`, the minLength was increased from `0` to `1`
  - for the `header` request parameter `x-checkly-account`, the type/format was changed from `string`/`` to `string`/`uuid`
  - removed the optional property `attributes` from the response with the `401` status
  - removed the optional property `attributes` from the response with the `429` status
  - …11 more

[Change history](https://skmtc.dev/checklyhq/apis/checkly-public-api/changes/v1/variables/:key/delete.md)

---

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