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

# Update Agent Test Case

> 
Modify an existing agent test case's inputs, outputs, or metadata. Use to correct errors or update expected outputs.



## OpenAPI

````yaml https://app.freeplay.ai/openapi.json patch /api/v2/projects/{project_id}/agent-datasets/{dataset_id}/test-cases/{test_case_id}
openapi: 3.1.0
info:
  title: Freeplay API
  version: 0.1.0
servers: []
security:
  - BearerAuth: []
paths:
  /api/v2/projects/{project_id}/agent-datasets/{dataset_id}/test-cases/{test_case_id}:
    patch:
      tags:
        - Agent Datasets
      summary: Update Agent Test Case
      description: >-

        Modify an existing agent test case's inputs, outputs, or metadata. Use
        to correct errors or update expected outputs.
      operationId: patch_update_agent_dataset_test_case
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
        - name: dataset_id
          in: path
          required: true
          schema:
            type: string
        - name: test_case_id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              properties:
                inputs:
                  default: null
                  oneOf:
                    - $ref: '#/components/schemas/JSONValue'
                    - type: 'null'
                outputs:
                  default: null
                  oneOf:
                    - $ref: '#/components/schemas/JSONValue'
                    - type: 'null'
                metadata:
                  default: null
                  title: Metadata
                  additionalProperties:
                    anyOf:
                      - type: string
                      - type: integer
                      - type: number
                      - type: boolean
                  type:
                    - object
                    - 'null'
              title: AgentTestCase
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  id:
                    format: uuid
                    title: Id
                    type: string
                  input:
                    $ref: '#/components/schemas/JSONValue'
                    default: null
                  output:
                    $ref: '#/components/schemas/JSONValue'
                    default: null
                  metadata:
                    default: null
                    title: Metadata
                    additionalProperties:
                      anyOf:
                        - type: string
                        - type: integer
                        - type: number
                        - type: boolean
                    type:
                      - object
                      - 'null'
                required:
                  - id
                title: AgentTestCaseResponse
                type: object
          description: >-
            AgentTestCaseResponse(trace_test_case:
            shared.sqlalchemy.models.TraceTestCase)
components:
  schemas:
    JSONValue:
      anyOf:
        - type: boolean
        - type: integer
        - type: number
        - type: string
        - additionalProperties:
            $ref: '#/components/schemas/JSONValue'
          type: object
        - items:
            $ref: '#/components/schemas/JSONValue'
          type: array
        - type: 'null'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````