---
title: "Remove label from environment"
method: DELETE
path: "/environments/{id}/labels/{key}"
tags: ["environments"]
---

# Remove label from environment

`DELETE /environments/{id}/labels/{key}`

Remove label from environment

## Path parameters

- `id` string, id, required
- `key` string, non-empty, required

## Response `200`

Remove label from environment

- Environment
  - `appliedIntentsCount` integer, required
  - `id` string, required
  - `labels` Label[]
    - `key` string, required
    - `value` string
  - `name` string, required
  - `namespaces` object[], required
    - `id` string, required
  - `serviceCount` integer, required

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `408` — Request Timeout
- `409` — Conflict
- `422` — Unprocessable Entity
- `500` — Internal Server Error
- `default`

## Changes

- **2025-04-16** `6b4369907cb8` — 1 info
  - added the non-success response with the status `408`
- **2023-11-13** `eb0110bd4dd2` — 1 breaking, 2 warning
  - for the `path` request parameter `key`, the type/format was changed from `string`/`label-name` to `string`/`non-empty`
  - changed the pattern of the `path` request parameter `id` from `^[A-Za-z]+_[a-z0-9]+$` to `^[A-Za-z_]+_[a-z0-9]+$`
  - changed the pattern of the `path` request parameter `key` from `^[a-z][a-z0-9-]{0,61}[a-z0-9]$` to `.+`
- **2023-02-20** `97ccc14f493c` — 1 breaking
  - for the `path` request parameter `id`, the type/format was changed from `string`/`ouid` to `string`/`id`
- **2023-02-08** `76634bc9add8` — 4 breaking, 1 info
  - added the pattern `^[A-Za-z]+_[a-z0-9]+$` to the `path` request parameter `id`
  - added the pattern `^[a-z][a-z0-9-]{0,61}[a-z0-9]$` to the `path` request parameter `key`
  - for the `path` request parameter `id`, the type/format was changed from `string`/`` to `string`/`ouid`
  - for the `path` request parameter `key`, the type/format was changed from `string`/`` to `string`/`label-name`
  - …1 more
- **2023-01-31** `015a13c6e1c3` — 1 breaking, 1 info
  - api path removed without deprecation
  - endpoint added

[Full history](https://skmtc.dev/otterize/apis/otterize-api-server/changes/environments/:id/labels/:key/delete.md)

---

[API](https://skmtc.dev/otterize/apis/otterize-api-server.md) · [All operations](https://skmtc.dev/otterize/apis/otterize-api-server/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/otterize/otterize-api-server/revisions/ec9167824493/schema)
