---
title: "Apply a label to a dataset"
method: PUT
path: "/v1/datasets/{dataset_identifier}/labels/{label_id}"
tags: ["datasets"]
---

# Apply a label to a dataset

`PUT /v1/datasets/{dataset_identifier}/labels/{label_id}`

Apply an existing label to a dataset. This operation is idempotent: applying a label that is already applied is a no-op that returns the label.

## Path parameters

- `dataset_identifier` string, required — The dataset identifier: either the dataset ID (GlobalID) or its name.
- `label_id` string, required — The ID of the dataset label to apply

## Response `200`

Successful Response

- AddDatasetLabelToDatasetResponseBody
  - `data` DatasetLabel, required
    - `id` string, required
    - `name` string, required
    - `description` string, nullable, required
    - `color` string, required

## Other responses

- `403` — Forbidden
- `404` — Dataset or dataset label not found
- `422` — Invalid dataset identifier or dataset label ID

---

[API](https://skmtc.net/arize-ai/apis/arize-phoenix-rest-api.md) · [All operations](https://skmtc.net/arize-ai/apis/arize-phoenix-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/arize-ai/arize-phoenix-rest-api/versions/a14d8ad6f708/schema)
