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

# Update test set

> Update a test set.



## OpenAPI

````yaml /api-reference/v1/test-sets-v1.yaml patch /test-sets/{test_set_id}
openapi: 3.0.3
info:
  title: Test Sets API
  version: 1.0.0
  description: >
    API for managing test sets - collections of test cases for evaluation.


    Test sets organize test cases and can define parameters for test case
    generation.
  contact:
    name: Coval API Support
    url: https://coval.dev
    email: support@coval.dev
servers:
  - url: https://api.coval.dev/v1
    description: Production API
security:
  - apiKey: []
tags:
  - name: Test Sets
    description: Operations for managing test sets
paths:
  /test-sets/{test_set_id}:
    parameters:
      - name: test_set_id
        in: path
        required: true
        description: Test set ID (8-character ID)
        schema:
          type: string
          minLength: 8
          maxLength: 8
        example: abc12345
    patch:
      tags:
        - Test Sets
      summary: Update test set
      description: Update a test set.
      operationId: updateTestSet
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateTestSetRequest'
      responses:
        '200':
          description: Test set updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  test_set:
                    $ref: '#/components/schemas/TestSetResource'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          description: Slug or display_name conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    UpdateTestSetRequest:
      type: object
      description: Update request. Only provided fields will be updated.
      properties:
        display_name:
          type: string
          minLength: 1
          maxLength: 100
          description: Human-readable test set name
          example: Updated Test Set Name
        slug:
          type: string
          maxLength: 100
          description: URL-friendly identifier
          example: updated-slug
        description:
          type: string
          nullable: true
          description: Test set description
          example: Updated description
        test_set_type:
          type: string
          maxLength: 50
          description: Test set type
          example: WORKFLOW
        test_set_metadata:
          type: object
          description: Additional configuration (null = don't update, {} = clear field)
          additionalProperties: true
          example:
            category: support
            updated: true
        parameters:
          type: object
          description: Test case parameterization (null = don't update, {} = clear field)
          additionalProperties: true
          example:
            name:
              - Alice
              - Bob
        tags:
          type: array
          nullable: true
          description: >-
            Tags to associate with this test set. Null or omitted leaves tags
            unchanged. Pass [] to clear all tags.
          items:
            type: string
          example:
            - regression
    TestSetResource:
      type: object
      description: |
        Test set resource representation.
      properties:
        name:
          type: string
          description: Resource name in format `test-sets/{id}`
          example: test-sets/abc12345
        id:
          type: string
          description: Test set ID (8-character ID)
          minLength: 8
          maxLength: 8
          example: abc12345
        slug:
          type: string
          description: URL-friendly identifier (unique per organization)
          example: customer-support-scenarios
        display_name:
          type: string
          description: Human-readable test set name
          example: Customer Support Scenarios
        description:
          type: string
          nullable: true
          description: Test set description
          example: Test cases for customer support agent
        test_set_type:
          type: string
          nullable: true
          description: Test set type (e.g., DEFAULT, SCENARIO, TRANSCRIPT, WORKFLOW)
          example: SCENARIO
        test_set_metadata:
          type: object
          description: Additional test set configuration (JSON)
          additionalProperties: true
          example:
            category: support
            priority: high
        parameters:
          type: object
          description: 'Test case parameterization (e.g., {"name": ["Alice", "Bob"]})'
          additionalProperties: true
          example:
            customer_name:
              - Alice
              - Bob
            issue_type:
              - billing
              - technical
        test_case_count:
          type: integer
          description: Number of active test cases (GET endpoint only)
          example: 42
        tags:
          type: array
          description: Tags associated with this test set
          items:
            type: string
          default: []
          example:
            - regression
            - voice
        create_time:
          type: string
          format: date-time
          description: Timestamp when test set was created
          example: '2025-10-14T12:00:00Z'
        update_time:
          type: string
          format: date-time
          nullable: true
          description: Timestamp when test set was last updated
          example: '2025-10-15T14:30:00Z'
    ErrorResponse:
      type: object
      description: Standard error response
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - details
          properties:
            code:
              type: string
              description: Machine-readable error code
              example: INVALID_ARGUMENT
            message:
              type: string
              description: Human-readable error message
              example: Invalid request parameters
            details:
              type: array
              description: Detailed error information
              items:
                type: object
                properties:
                  field:
                    type: string
                    description: Field that caused the error
                    example: slug
                  description:
                    type: string
                    description: Description of the error
                    example: slug already exists for this organization
  responses:
    BadRequest:
      description: Invalid request parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: INVALID_ARGUMENT
              message: Invalid request parameters
              details:
                - field: display_name
                  description: display_name is required and cannot be empty
    Unauthorized:
      description: Authentication failed or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: UNAUTHENTICATED
              message: Authentication failed
              details:
                - field: X-API-Key
                  description: Invalid or missing API key
    NotFound:
      description: Resource not found or doesn't belong to organization
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: NOT_FOUND
              message: Test set not found
              details:
                - field: test_set_id
                  description: Test set 'abc12345' not found
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: INTERNAL
              message: Internal server error
              details:
                - description: An unexpected error occurred while processing the request
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: Organization API key for authentication

````