> ## 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.

# Assign a tag to an experiment

> Assign a tag to an experiment. Tags are scoped to the experiment's dataset and each tag name points at a single experiment, so assigning a tag that another experiment on the same dataset owns atomically moves the tag to this experiment. Re-assigning a tag the experiment already owns is idempotent and replaces the description. Assigning the reserved 'baseline' tag makes this experiment the dataset's baseline; ephemeral experiments cannot become the baseline.



## OpenAPI

````yaml post /v1/experiments/{experiment_id}/tags
openapi: 3.1.0
info:
  title: Arize-Phoenix REST API
  description: Schema for Arize-Phoenix REST API
  version: '1.0'
servers: []
security: []
paths:
  /v1/experiments/{experiment_id}/tags:
    post:
      tags:
        - experiments
      summary: Assign a tag to an experiment
      description: >-
        Assign a tag to an experiment. Tags are scoped to the experiment's
        dataset and each tag name points at a single experiment, so assigning a
        tag that another experiment on the same dataset owns atomically moves
        the tag to this experiment. Re-assigning a tag the experiment already
        owns is idempotent and replaces the description. Assigning the reserved
        'baseline' tag makes this experiment the dataset's baseline; ephemeral
        experiments cannot become the baseline.
      operationId: setExperimentTag
      parameters:
        - name: experiment_id
          in: path
          required: true
          schema:
            type: string
            title: Experiment Id
            description: The ID of the experiment
          description: The ID of the experiment
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetExperimentTagRequestBody'
      responses:
        '200':
          description: The tag as it now applies to the experiment
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SetExperimentTagResponseBody'
        '403':
          content:
            text/plain:
              schema:
                type: string
          description: Forbidden
        '404':
          content:
            text/plain:
              schema:
                type: string
          description: Experiment not found
        '422':
          content:
            text/plain:
              schema:
                type: string
          description: >-
            Invalid experiment ID or request body, or the experiment is
            ephemeral and cannot be tagged as the baseline
components:
  schemas:
    SetExperimentTagRequestBody:
      properties:
        name:
          $ref: '#/components/schemas/Identifier'
          description: >-
            The name of the tag to assign, e.g. 'baseline'. If another
            experiment on the same dataset already owns this tag, the tag is
            moved to this experiment.
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: >-
            An optional description of the tag (replaces any existing
            description)
      type: object
      required:
        - name
      title: SetExperimentTagRequestBody
    SetExperimentTagResponseBody:
      properties:
        data:
          $ref: '#/components/schemas/ExperimentTag'
      type: object
      required:
        - data
      title: SetExperimentTagResponseBody
    Identifier:
      type: string
      pattern: ^[a-z0-9]([_a-z0-9-]*[a-z0-9])?$
      title: Identifier
    ExperimentTag:
      properties:
        id:
          type: string
          title: Id
          description: The node ID of the tag
        name:
          type: string
          title: Name
          description: The name of the tag
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: The description of the tag
      type: object
      required:
        - id
        - name
        - description
      title: ExperimentTag

````