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

# Trigger single-turn workflow test run

> Trigger a single-turn workflow test run.



## OpenAPI

````yaml /public-apis/openapi/test-runs.json post /v1/test-runs/single-turn/workflow
openapi: 3.0.0
info:
  version: 1.0.0
  contact:
    name: Maxim Engineering
    email: eng@getmaxim.ai
  title: Maxim SDK API - test-runs
  description: API documentation for Maxim SDK test-runs endpoints
servers:
  - url: https://api.getmaxim.ai
security: []
paths:
  /v1/test-runs/single-turn/workflow:
    post:
      tags:
        - Test run
      summary: Trigger single-turn workflow test run
      description: Trigger a single-turn workflow test run.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                workspaceId:
                  type: string
                  description: Workspace ID where the test run will execute
                datasetId:
                  type: string
                  description: Dataset ID to use for the test run
                datasetSplitId:
                  type: string
                  description: Optional dataset split ID
                evaluators:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        description: Evaluator ID
                      name:
                        type: string
                        description: Evaluator name (resolved in the current workspace)
                      variableMapping:
                        type: object
                        additionalProperties:
                          type: string
                        description: Optional variable mapping for the evaluator
                    description: >-
                      Evaluator identifier (id or name) with optional variable
                      mapping
                  description: >-
                    Array of evaluators with optional variable mapping to run on
                    the test results.
                contextToEvaluate:
                  type: array
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - DATASOURCE
                          - DATASET_COLUMN
                      payload:
                        type: string
                    required:
                      - type
                      - payload
                  description: Context sources to include in evaluation
                workflowId:
                  type: string
                  description: Workflow ID to run
                environmentId:
                  type: string
                  description: >-
                    Environment ID for variable resolution in the workflow
                    config
              required:
                - workspaceId
                - datasetId
                - workflowId
              description: Payload for triggering a single-turn workflow test run
      responses:
        '200':
          description: Single-turn workflow test run triggered successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        description: Test run ID
                      workspaceId:
                        type: string
                        description: Workspace ID
                      status:
                        type: string
                        description: Current status of the test run
                      entityId:
                        type: string
                        description: Entity ID being tested
                      entityType:
                        type: string
                        description: Type of entity being tested
                      createdAt:
                        type: string
                        description: Creation timestamp
                    required:
                      - id
                      - workspaceId
                      - status
                      - entityType
                      - createdAt
                    description: Response from triggering a simulation
                required:
                  - data
        '400':
          description: Invalid request payload
        '401':
          description: Bad request
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-maxim-api-key
      description: API key for authentication

````