---
title: "Modify the labels for the deployment applying the given instructions."
method: PATCH
path: "/events/deployment/{name}/labels"
tags: ["events", "default"]
---

# Modify the labels for the deployment applying the given instructions.

`PATCH /events/deployment/{name}/labels`

## Request

- Base URL: `{{ server_url }}/v1`
- URL: `{{ server_url }}/v1/events/deployment/{name}/labels`
- Auth: API key in header `X-API-Key`
- TypeScript: <https://skmtc.dev/athenian/apis/title/docs/events/deployment/:name/labels/patch.ts> (a function with typed inputs; its response is checked against the schema)

## Request body

- DeploymentModifyLabelsRequest: Request to modify the labels associated with the deployment. Each property in this object represents a command to execute.
  - `delete` string[]: Delete the labels with the given keys. Unexisting labels are ignored.
  - `upsert` object: Arbitrary key-value metadata that associates with the deployment.

## Response `200`

The labels now associated with the deployment.

- object
  - `labels` DeploymentLabels, required: Arbitrary key-value metadata that associates with the deployment.

## Other responses

- `400`: The request is invalid.
- `404`: A deployment with the given name was not found.

## Changes

- **2023-03-27** `110b0b0b86d3`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/athenian/apis/title/changes/events/deployment/:name/labels/patch.md)

---

[API](https://skmtc.dev/athenian/apis/title.md) - [All operations](https://skmtc.dev/athenian/apis/title/llms.txt) - [OpenAPI document](https://skmtc.dev/athenian/apis/title/revisions/110c9f7cffdd?raw)
