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

# Update variant



## OpenAPI

````yaml PATCH /v1/agents/{agentId}/branches/{branchId}/variants/{variantId}
openapi: 3.1.0
info:
  title: PolyAI Agents API
  version: 1.0.11
  description: Manage PolyAI agents, telephony, deployments, and real-time configs.
servers:
  - url: https://api.us.poly.ai
    description: US region
  - url: https://api.eu.poly.ai
    description: EU region
  - url: https://api.uk.poly.ai
    description: UK region
  - url: https://api.studio.poly.ai
    description: Studio region
security:
  - polyApiKey: []
paths:
  /v1/agents/{agentId}/branches/{branchId}/variants/{variantId}:
    parameters:
      - name: agentId
        in: path
        required: true
        schema:
          type: string
      - name: branchId
        in: path
        required: true
        schema:
          type: string
      - name: variantId
        in: path
        required: true
        schema:
          type: string
    patch:
      tags:
        - Variants
      summary: Update variant
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateVariantBody'
      responses:
        '200':
          description: Updated variant
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VariantResponse'
components:
  schemas:
    UpdateVariantBody:
      type: object
      properties:
        name:
          type: string
          minLength: 1
        attributeValues:
          type: object
          properties:
            values:
              type: object
              additionalProperties:
                type: string
              default: {}
          additionalProperties: false
        isDefault:
          type: boolean
      additionalProperties: false
      title: UpdateVariantBody
    VariantResponse:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        isDefault:
          type: boolean
        attributeValues:
          type: object
          properties:
            values:
              type: object
              additionalProperties:
                type: string
          required:
            - values
          additionalProperties: false
      required:
        - id
        - name
        - isDefault
        - attributeValues
      additionalProperties: false
      title: VariantResponse
  securitySchemes:
    polyApiKey:
      type: apiKey
      in: header
      name: X-API-KEY

````