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

# Update a test set

> Send only the fields to change. `cases` replaces the whole list. Needs the admin role or an API key.



## OpenAPI

````yaml /api-reference/openapi.json patch /v1/test_sets/{test_set_id}
openapi: 3.1.0
info:
  title: GuidingHand API
  version: 1.0.0
  description: >-
    Create sessions (an invite link with a code for the person at the computer),
    run tasks on their computer with one of your agents, follow them, answer
    their questions and approvals, and fetch history and recordings. Test your
    agents with evals: test cases on fresh machines, run in test sets, scored by
    a check script or a rubric. Agents are versioned (save a draft, publish it),
    have tools (their own file system, and your HTTP endpoints), and every
    change is in the org’s audit log.
servers:
  - url: https://guidinghand.ai
    description: Production
  - url: https://dev.guidinghand.ai
    description: Development (Stripe test mode)
security:
  - bearerAuth: []
tags:
  - name: Agents
  - name: Agent files
  - name: Agent tools
  - name: Sessions
  - name: Tasks
  - name: Webhooks
  - name: Audit log
  - name: Test cases
  - name: Test sets
  - name: Test runs
  - name: Start states
  - name: Runners
paths:
  /v1/test_sets/{test_set_id}:
    parameters:
      - name: test_set_id
        in: path
        required: true
        description: The test set’s id (`ts_…`).
        schema:
          type: string
    patch:
      tags:
        - Test sets
      summary: Update a test set
      description: >-
        Send only the fields to change. `cases` replaces the whole list. Needs
        the admin role or an API key.
      operationId: updateTestSet
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TestSetUpdate'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestSet'
        '400':
          $ref: '#/components/responses/E400'
        '401':
          $ref: '#/components/responses/E401'
        '403':
          $ref: '#/components/responses/E403'
        '404':
          $ref: '#/components/responses/E404'
components:
  schemas:
    TestSetUpdate:
      type: object
      description: Only the fields you send change. `cases` replaces the whole list.
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 200
        description:
          type: string
        repeat:
          type: integer
          minimum: 1
          maximum: 20
          default: 1
          description: Tries per case (1 to 20).
        customer:
          oneOf:
            - $ref: '#/components/schemas/Customer'
            - type: 'null'
          description: The simulated customer for its cases that have none of their own.
        cases:
          type: array
          description: Its cases, in order.
          items:
            type: object
            required:
              - test_case_id
            properties:
              test_case_id:
                type: string
                description: A test case’s id or `key`.
              repeat:
                type:
                  - integer
                  - 'null'
                minimum: 1
                maximum: 20
                description: 'Tries for this case; null: the set’s `repeat`.'
        metadata:
          $ref: '#/components/schemas/Metadata'
    TestSet:
      type: object
      description: A list of test cases to run together.
      properties:
        object:
          const: test_set
        test_set_id:
          type: string
          example: ts_3nV0qR7cWb1e
        name:
          type: string
          example: Lenovo Win10 benchmark
        description:
          type: string
        repeat:
          type: integer
          minimum: 1
          maximum: 20
          description: Tries per case unless the case or the run says otherwise (1 to 20).
        customer:
          oneOf:
            - $ref: '#/components/schemas/Customer'
            - type: 'null'
          description: The simulated customer for its cases that have none of their own.
        cases:
          type: array
          items:
            type: object
            properties:
              test_case_id:
                type: string
              key:
                type:
                  - string
                  - 'null'
              repeat:
                type:
                  - integer
                  - 'null'
                minimum: 1
                maximum: 20
                description: 'Tries for this case; null: the set’s `repeat`.'
        case_count:
          type: integer
        metadata:
          $ref: '#/components/schemas/Metadata'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Customer:
      type: object
      description: >-
        The simulated customer who answers the agent during a test: a model with
        this persona, these facts and the machine’s screen. It never sees the
        expected fix or the check.
      properties:
        persona:
          type: string
          example: Retired teacher. Not technical. Short, polite answers.
          description: Who they are and how they answer.
        facts:
          type: object
          maxProperties: 50
          additionalProperties:
            oneOf:
              - type: string
              - type: object
                required:
                  - secret
                properties:
                  secret:
                    type: string
                description: >-
                  A secret: the simulated customer’s model only sees its name,
                  and can type it into the focused field.
          description: >-
            What the customer knows, by name (up to 50). A `{ "secret": … }`
            value is never shown to the model: the customer can only type it
            into the field that has focus.
          example:
            Wi-Fi network: HomeNet
            Wi-Fi password:
              secret: blue-kite-42
        clicks_admin_prompts:
          type: boolean
          description: >-
            When the agent asks, the customer clicks Yes on an admin (UAC)
            prompt.
        does_steps:
          type: boolean
          description: >-
            The customer does steps themselves when the agent asks. When false,
            they ask the agent to do it.
    Metadata:
      type: object
      additionalProperties:
        type: string
        maxLength: 500
      maxProperties: 50
      description: >-
        Your own ids and labels (e.g. a ticket or customer id), returned as
        given.
      example:
        customer_id: cus_42
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - type
            - message
          properties:
            type:
              type: string
              enum:
                - invalid_request
                - authentication
                - payment_required
                - permission
                - not_found
                - conflict
                - rate_limit
                - server_error
            message:
              type: string
            code:
              type: string
              description: >-
                Why it was refused, when there’s more to say than the status.
                Starting a task: `insufficient_balance`,
                `auto_topup_limit_reached` or `card_needs_attention` (402: the
                balance can’t cover a minute; add funds, raise the auto top-up
                limit, or update the card), `concurrency_limit` (429),
                `model_unavailable` (503: the agent’s `model` can’t run on this
                server; choose another). On `/respond`: `already_answered`
                (someone answered or decided first: see `answered_by`) or
                `not_pending` (that question or approval isn’t open any more).
                The GuidingHand app hears two more, which the API never returns:
                `customer_answers_off` and `customer_approvals_off` (the agent
                keeps its questions or approvals for your team). Deleting a
                start state that test cases use: `in_use` (409, with
                `test_case_ids`).
            answered_by:
              type: string
              enum:
                - customer
                - operator
                - timeout
              description: >-
                With `already_answered`: who answered or decided first
                (`customer`: the person at the computer; `timeout`: nobody
                decided an approval within the agent’s
                `approval_timeout_minutes`, so it was denied).
            test_case_ids:
              type: array
              items:
                type: string
              description: 'With `in_use`: the test cases that use the start state.'
  responses:
    E400:
      description: The request is invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    E401:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    E403:
      description: Your role can’t do this.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    E404:
      description: Not found in this org.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: An org API key (`gh_live_…`) from Settings → API keys in the console.

````