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

# Trigger a manual test run

> Initiates immediate execution of a specific assistant test



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/ai/assistants.yml post /ai/assistants/tests/{test_id}/runs
openapi: 3.1.0
info:
  title: Telnyx AI Assistants API
  version: 2.0.0
  description: >-
    API for managing AI Assistants, including CRUD fields, versions, tags,
    integrations, MCP servers, and shared tools.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /ai/assistants/tests/{test_id}/runs:
    post:
      tags:
        - Assistants
      summary: Trigger a manual test run
      description: Initiates immediate execution of a specific assistant test
      operationId: trigger_test_run_public_assistants_tests__test_id__runs_post
      parameters:
        - name: test_id
          in: path
          required: true
          schema:
            type: string
            title: Test Id
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TriggerTestRunRequest'
              title: Request
      responses:
        '201':
          description: Returns the created test run with execution details and status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestRunResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Telnyx from 'telnyx';


            const client = new Telnyx({
              apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
            });


            const testRunResponse = await
            client.ai.assistants.tests.runs.trigger('test_id');


            console.log(testRunResponse.run_id);
        - lang: Python
          source: |-
            import os
            from telnyx import Telnyx

            client = Telnyx(
                api_key=os.environ.get("TELNYX_API_KEY"),  # This is the default and can be omitted
            )
            test_run_response = client.ai.assistants.tests.runs.trigger(
                test_id="test_id",
            )
            print(test_run_response.run_id)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/team-telnyx/telnyx-go\"\n\t\"github.com/team-telnyx/telnyx-go/option\"\n)\n\nfunc main() {\n\tclient := telnyx.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\ttestRunResponse, err := client.AI.Assistants.Tests.Runs.Trigger(\n\t\tcontext.TODO(),\n\t\t\"test_id\",\n\t\ttelnyx.AIAssistantTestRunTriggerParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", testRunResponse.RunID)\n}\n"
        - lang: Java
          source: >-
            package com.telnyx.sdk.example;


            import com.telnyx.sdk.client.TelnyxClient;

            import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;

            import
            com.telnyx.sdk.models.ai.assistants.tests.runs.RunTriggerParams;

            import
            com.telnyx.sdk.models.ai.assistants.tests.runs.TestRunResponse;


            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    TelnyxClient client = TelnyxOkHttpClient.fromEnv();

                    TestRunResponse testRunResponse = client.ai().assistants().tests().runs().trigger("test_id");
                }
            }
        - lang: Ruby
          source: >-
            require "telnyx"


            telnyx = Telnyx::Client.new(api_key: "My API Key")


            test_run_response =
            telnyx.ai.assistants.tests.runs.trigger("test_id")


            puts(test_run_response)
        - lang: CLI
          source: |-
            telnyx ai:assistants:tests:runs trigger \
              --api-key 'My API Key' \
              --test-id test_id
components:
  schemas:
    TriggerTestRunRequest:
      properties:
        destination_version_id:
          type: string
          title: Destination Version Id
          description: >-
            Optional assistant version ID to use for this test run. If provided,
            the version must exist or a 400 error will be returned. If not
            provided, test will run on main version
          example: 123e4567-e89b-12d3-a456-426614174000
      type: object
      title: TriggerTestRunRequest
      description: |-
        Request model for triggering a single test run.

        Optional request body for the trigger test run endpoint.
    TestRunResponse:
      properties:
        run_id:
          type: string
          format: uuid
          title: Run Id
          description: Unique identifier for this specific test run execution.
          example: 987fcdeb-51a2-43d1-b456-426614174000
        test_id:
          type: string
          format: uuid
          title: Test Id
          description: Identifier of the assistant test that was executed.
          example: 123e4567-e89b-12d3-a456-426614174000
        status:
          $ref: '#/components/schemas/TestStatus'
        triggered_by:
          type: string
          title: Triggered By
          description: How this test run was initiated (manual, scheduled, or API).
          example: cron
        completed_at:
          type: string
          format: date-time
          title: Completed At
          description: Timestamp when the test run finished execution.
        logs:
          type: string
          title: Logs
          description: Detailed execution logs and debug information.
        conversation_id:
          type: string
          title: Conversation Id
          description: Identifier of the conversation created during test execution.
        conversation_insights_id:
          type: string
          title: Conversation Insights Id
          description: Identifier for conversation analysis and insights data.
        test_suite_run_id:
          type: string
          format: uuid
          title: Test Suite Run Id
          description: Identifier linking this run to a test suite execution batch.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: Timestamp when the test run was created and queued.
          example: '2024-01-23T10:30:00Z'
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: Timestamp of the last update to this test run.
        detail_status:
          items:
            $ref: '#/components/schemas/TestRunDetailResult'
          type: array
          title: Detail Status
          description: >-
            Detailed evaluation results for each rubric criteria. Name is name
            of the criteria from the rubric and status is the result of the
            evaluation. This list will have a result for every criteria in the
            rubric section.
      type: object
      required:
        - run_id
        - test_id
        - status
        - triggered_by
        - created_at
      title: TestRunResponse
      description: |-
        Response model containing test run execution details and results.

        Provides comprehensive information about a test execution including
        status, timing, logs, and detailed evaluation results.
    HTTPValidationError:
      title: HTTPValidationError
      type: object
      properties:
        detail:
          title: Detail
          type: array
          items:
            $ref: '#/components/schemas/ValidationError'
    TestStatus:
      type: string
      enum:
        - pending
        - starting
        - running
        - passed
        - failed
        - error
      title: TestStatus
      description: |-
        Represents the lifecycle of a test:
          - 'pending': Test is waiting to be executed.
          - 'starting': Test execution is initializing.
          - 'running': Test is currently executing.
          - 'passed': Test completed successfully.
          - 'failed': Test executed but did not pass.
          - 'error': An error occurred during test execution.
    TestRunDetailResult:
      properties:
        name:
          type: string
          title: Name
        status:
          $ref: '#/components/schemas/TestStatus'
      type: object
      required:
        - name
        - status
      title: TestRunDetailResult
    ValidationError:
      title: ValidationError
      required:
        - loc
        - msg
        - type
      type: object
      properties:
        loc:
          title: Location
          type: array
          items:
            anyOf:
              - type: string
              - type: integer
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````