> ## Documentation Index
> Fetch the complete documentation index at: https://vida.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Update agent experiment

> Renames an experiment and, while it is still a draft, can replace its saved-version variants. agentConfigId must match the experiment.




## OpenAPI

````yaml put /api/v2/experiments/{experimentId}
openapi: 3.0.0
info:
  version: 2.0.0
  title: Vida API
  description: Vida API Documentation
servers:
  - url: https://api.vida.dev
    description: Vida Production
    variables:
      baseUrl:
        default: api.vida.dev
        description: Production API Root
security: []
tags:
  - name: Agents
  - name: Inbound Email
    description: Control which senders may create inbound email work for an Agent.
  - name: Features
    description: Inspect capabilities available within an account hierarchy.
  - name: Conversation Logs
    description: Query conversation activity and calculate account-level metrics.
  - name: Computer Agents
    description: Set up, configure, inspect, and manage Vida Computer Agents.
  - name: Computer Agent Sessions
    description: View and reset Computer Agent sessions.
  - name: Accounts
  - name: Agent Templates
    description: Create, manage, and apply reusable Agent configurations.
paths:
  /api/v2/experiments/{experimentId}:
    put:
      tags:
        - Agents
      summary: Update agent experiment
      description: >
        Renames an experiment and, while it is still a draft, can replace its
        saved-version variants. agentConfigId must match the experiment.
      operationId: experimentsPutRecord
      parameters:
        - name: experimentId
          in: path
          required: true
          description: ''
          schema: {}
        - name: targetAccountId
          in: query
          required: true
          description: Account used to authorize this request.
          schema: {}
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - agentConfigId
                - name
              properties:
                agentConfigId:
                  type: string
                name:
                  type: string
                variants:
                  type: array
                  minItems: 2
                  items:
                    $ref: '#/components/schemas/AgentExperimentVariant'
      responses:
        '200':
          description: Experiment updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/AgentExperiment'
                  status:
                    type: string
                    example: ok
      security:
        - apiKeyAuth: []
components:
  schemas:
    AgentExperimentVariant:
      type: object
      required:
        - versionId
        - weight
      properties:
        label:
          type: string
          description: Display label for the variant.
        versionId:
          type: integer
          description: Saved version used by this variant.
        weight:
          type: number
          minimum: 0
          exclusiveMinimum: true
          description: Relative traffic weight.
    AgentExperiment:
      type: object
      properties:
        id:
          oneOf:
            - type: integer
            - type: string
          readOnly: true
        agentConfigId:
          type: string
          description: Live agent configuration ID whose versions are tested.
        name:
          type: string
        status:
          type: string
          enum:
            - draft
            - active
            - paused
            - ended
        variants:
          type: array
          minItems: 2
          items:
            type: object
            required:
              - versionId
              - weight
            properties:
              label:
                type: string
                description: Display label for the variant.
              versionId:
                type: integer
                description: Saved version used by this variant.
              weight:
                type: number
                minimum: 0
                exclusiveMinimum: true
                description: Relative traffic weight.
        createdAt:
          type: integer
          format: int64
          nullable: true
          readOnly: true
        createdBy:
          oneOf:
            - type: integer
            - type: string
          nullable: true
          readOnly: true
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: query
      name: token
      description: Vida API Token

````