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

# Create a dataset label

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

Create a new dataset label for a given team.

## Path parameters

- `team_slug` string, required

## Request body

- DatasetsDatasetLabelDatasetLabelCreateRequest — Schema for dataset label create request.
  - `color` string, required — Hex color code for the label
  - `dataset_ids` integer[] — Array of dataset IDs associated with the label
  - `name` string, required — Name of the dataset label

## Response `200`

Datasets.DatasetLabel.DatasetLabelResponse

- DatasetsDatasetLabelDatasetLabelResponse — Schema for dataset label response.
  - `label` DatasetsDatasetLabelDatasetLabel, required — Schema for dataset labels.
    - `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

---

[API](https://skmtc.net/v7labs/apis/darwin.md) · [All operations](https://skmtc.net/v7labs/apis/darwin/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/v7labs/darwin/revisions/526a5b6b4cdc/schema)
