> ## Documentation Index
> Fetch the complete documentation index at: https://arizeai-433a7140.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a dataset label



## OpenAPI

````yaml post /v1/dataset_labels
openapi: 3.1.0
info:
  title: Arize-Phoenix REST API
  description: Schema for Arize-Phoenix REST API
  version: '1.0'
servers: []
security: []
paths:
  /v1/dataset_labels:
    post:
      tags:
        - datasets
      summary: Create a dataset label
      operationId: createDatasetLabel
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateDatasetLabelRequestBody'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateDatasetLabelResponseBody'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                type: string
        '409':
          content:
            text/plain:
              schema:
                type: string
          description: A dataset label with the same name already exists
        '422':
          content:
            text/plain:
              schema:
                type: string
          description: Invalid request body
components:
  schemas:
    CreateDatasetLabelRequestBody:
      properties:
        name:
          type: string
          minLength: 1
          title: Name
          description: The name of the dataset label
        color:
          type: string
          pattern: ^#([0-9a-f]{6})$
          title: Color
          description: >-
            A lowercase hex color code (e.g. '#00cc88') used to display the
            label
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: An optional description of the dataset label
      type: object
      required:
        - name
        - color
      title: CreateDatasetLabelRequestBody
    CreateDatasetLabelResponseBody:
      properties:
        data:
          $ref: '#/components/schemas/DatasetLabel'
      type: object
      required:
        - data
      title: CreateDatasetLabelResponseBody
    DatasetLabel:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        color:
          type: string
          title: Color
      type: object
      required:
        - id
        - name
        - description
        - color
      title: DatasetLabel

````