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

# Create New Test Case

> Create a new test case in a dataset.



## OpenAPI

````yaml /openapi-v1.json post /api/v1/simulation/datasets/{dataset_id}/test-cases
openapi: 3.1.0
info:
  title: AGO Public API
  version: 1.0.0
  description: Programmatic access to your AGO workspace.
servers:
  - url: https://{tenant_id}.api.useago.com
    description: AGO Public API v1
    variables:
      tenant_id:
        default: your-tenant-id
        description: Your AGO tenant identifier
security: []
paths:
  /api/v1/simulation/datasets/{dataset_id}/test-cases:
    post:
      tags:
        - Simulation
      summary: Create New Test Case
      description: Create a new test case in a dataset.
      operationId: core_api_v1_controllers_simulation_create_new_test_case
      parameters:
        - in: path
          name: dataset_id
          schema:
            title: Dataset Id
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SimulationTestCaseCreateIn'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimulationTestCaseOut'
      security:
        - ScopedAPIKeyAuth: []
components:
  schemas:
    SimulationTestCaseCreateIn:
      description: Schema for creating a simulation test case via the v1 API.
      properties:
        question:
          title: Question
          type: string
        expected_type:
          default: answer
          title: Expected Type
          type: string
        expected_answer:
          anyOf:
            - type: string
            - type: 'null'
          title: Expected Answer
        expected_tool_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Expected Tool Name
        expected_tool_args:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Expected Tool Args
        expected_agent_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Expected Agent Id
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
        persona_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Persona Id
        api_data_overrides:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Api Data Overrides
        tool_call_overrides:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Tool Call Overrides
        steps:
          anyOf:
            - items:
                $ref: '#/components/schemas/ConversationStepIn'
              type: array
            - type: 'null'
          title: Steps
      required:
        - question
      title: SimulationTestCaseCreateIn
      type: object
    SimulationTestCaseOut:
      description: Response schema for simulation test cases.
      properties:
        object:
          default: simulation_test_case
          title: Object
          type: string
        id:
          title: Id
          type: string
        question:
          title: Question
          type: string
        expected_type:
          title: Expected Type
          type: string
        expected_answer:
          anyOf:
            - type: string
            - type: 'null'
          title: Expected Answer
        expected_tool_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Expected Tool Name
        expected_tool_args:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Expected Tool Args
        expected_agent_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Expected Agent Id
        expected_agent_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Expected Agent Name
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
        order:
          anyOf:
            - type: integer
            - type: 'null'
          title: Order
        persona_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Persona Id
        persona_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Persona Name
        api_data_overrides:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Api Data Overrides
        tool_call_overrides:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Tool Call Overrides
        steps:
          default: []
          items:
            $ref: '#/components/schemas/ConversationStepOut'
          title: Steps
          type: array
        created_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Created At
      required:
        - id
        - question
        - expected_type
      title: SimulationTestCaseOut
      type: object
    ConversationStepIn:
      description: Schema for a conversation step within a multi-turn test case.
      properties:
        user_message:
          title: User Message
          type: string
        expected_type:
          default: answer
          title: Expected Type
          type: string
        expected_answer:
          anyOf:
            - type: string
            - type: 'null'
          title: Expected Answer
        expected_tool_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Expected Tool Name
        expected_tool_args:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Expected Tool Args
        step_order:
          title: Step Order
          type: integer
      required:
        - user_message
        - step_order
      title: ConversationStepIn
      type: object
    ConversationStepOut:
      description: Response schema for a conversation step.
      properties:
        id:
          title: Id
          type: string
        step_order:
          title: Step Order
          type: integer
        user_message:
          title: User Message
          type: string
        expected_type:
          title: Expected Type
          type: string
        expected_answer:
          anyOf:
            - type: string
            - type: 'null'
          title: Expected Answer
        expected_tool_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Expected Tool Name
        expected_tool_args:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Expected Tool Args
        expected_agent_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Expected Agent Id
      required:
        - id
        - step_order
        - user_message
        - expected_type
      title: ConversationStepOut
      type: object
  securitySchemes:
    ScopedAPIKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````