---
title: "Update a dataset label"
method: POST
path: "/api/v2/teams/{team_slug}/datasets/labels/batch"
tags: ["Dataset Labels"]
---

# Update a dataset label

`POST /api/v2/teams/{team_slug}/datasets/labels/batch`

## Request

- Base URL: `https://darwin.v7labs.com`
- URL: `https://darwin.v7labs.com/api/v2/teams/{team_slug}/datasets/labels/batch`
- Auth: one of:
  - HTTP bearer
  - API key in header `Authorization`

Update a dataset label for a given team.

## Path parameters

- `team_slug` string, required

## Request body

- DatasetsDatasetLabelBatchUpdateDatasetLabelsRequest: Schema for batch updating multiple dataset labels at once
  - `dataset_labels` DatasetsDatasetLabelBatchUpdateLabelItem[], required: Array of dataset labels to update with their associated dataset IDs
    - `dataset_ids` integer[], required: Array of dataset IDs to associate with the label
    - `id` string, uuid, required: Unique identifier for the dataset label

## Response `200`

Datasets.DatasetLabel.DatasetLabelsResponse

- DatasetsDatasetLabelDatasetLabelsResponse: Presents dataset labels for given dataset.
  - `labels` DatasetsDatasetLabelDatasetLabel[], required
    - `color` string, required: Hex color code for the label
    - `dataset_ids` integer[]: Array of dataset IDs associated with the label
    - `id` string, uuid: Unique identifier for the dataset label
    - `inserted_at` string, date-time: Timestamp when the label was created
    - `name` string, required: Name of the dataset label
    - `team_id` integer, required: ID of the team associated with the label
    - `updated_at` string, date-time: Timestamp when the label was last updated

## Other responses

- `401`: Common.APIError
- `404`: Common.APIError
- `422`: Unprocessible Entity

## Changes

- **2026-11-03** `9cd7289ca12b`: 30 warning
  - added the new `DUPLICATE_REJECT_REASON` enum value to the `errors/code` response property for the response status `401`
  - added the new `DUPLICATE_REJECT_REASON` enum value to the `errors/code` response property for the response status `404`
  - added the new `DUPLICATE_REJECT_REASON` enum value to the `oneOf[subschema #2: Common.APIError]/errors/code` response property for the response status `422`
  - added the new `EXTERNAL_STORAGE_ACCESS_FAILED` enum value to the `errors/code` response property for the response status `401`
  - …26 more

[Operation history](https://skmtc.dev/v7labs/apis/darwin/changes/api/v2/teams/:team_slug/datasets/labels/batch/post.md)

---

[API](https://skmtc.dev/v7labs/apis/darwin.md) - [All operations](https://skmtc.dev/v7labs/apis/darwin/llms.txt) - [OpenAPI document](https://skmtc.dev/v7labs/apis/darwin/revisions/9cd7289ca12b?raw)
