> ## 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.

# Update an assistant test

> Updates an existing assistant test configuration with new settings



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/ai/assistants.yml put /ai/assistants/tests/{test_id}
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}:
    put:
      tags:
        - Assistants
      summary: Update an assistant test
      description: Updates an existing assistant test configuration with new settings
      operationId: update_assistant_test_public_assistants_tests__test_id__put
      parameters:
        - name: test_id
          in: path
          required: true
          schema:
            type: string
            title: Test Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAssistantTestRequest'
      responses:
        '200':
          description: Returns the updated test configuration with all changes applied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssistantTestResponse'
        '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 assistantTest = await
            client.ai.assistants.tests.update('test_id');


            console.log(assistantTest.test_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
            )
            assistant_test = client.ai.assistants.tests.update(
                test_id="test_id",
            )
            print(assistant_test.test_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\tassistantTest, err := client.AI.Assistants.Tests.Update(\n\t\tcontext.TODO(),\n\t\t\"test_id\",\n\t\ttelnyx.AIAssistantTestUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", assistantTest.TestID)\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.AssistantTest;
            import com.telnyx.sdk.models.ai.assistants.tests.TestUpdateParams;

            public final class Main {
                private Main() {}

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

                    AssistantTest assistantTest = client.ai().assistants().tests().update("test_id");
                }
            }
        - lang: Ruby
          source: |-
            require "telnyx"

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

            assistant_test = telnyx.ai.assistants.tests.update("test_id")

            puts(assistant_test)
        - lang: CLI
          source: |-
            telnyx ai:assistants:tests update \
              --api-key 'My API Key' \
              --test-id test_id
components:
  schemas:
    UpdateAssistantTestRequest:
      properties:
        name:
          type: string
          maxLength: 255
          minLength: 1
          title: Name
          description: Updated name for the assistant test. Must be unique and descriptive.
        description:
          type: string
          maxLength: 1000
          title: Description
          description: Updated description of the test's purpose and evaluation criteria.
        telnyx_conversation_channel:
          $ref: '#/components/schemas/TelnyxConversationChannel'
          description: Updated communication channel for the test execution.
        destination:
          type: string
          minLength: 1
          title: Destination
          description: Updated target destination for test conversations.
        max_duration_seconds:
          type: integer
          maximum: 3600
          minimum: 1
          title: Max Duration Seconds
          description: Updated maximum test duration in seconds.
        test_suite:
          type: string
          maxLength: 100
          title: Test Suite
          description: Updated test suite assignment for better organization.
        instructions:
          type: string
          maxLength: 5000
          minLength: 1
          title: Instructions
          description: Updated test scenario instructions and objectives.
        rubric:
          items:
            type: object
            required:
              - name
              - criteria
            properties:
              name:
                type: string
                description: >-
                  Label for the evaluation criterion, e.g., Empathy, Accuracy,
                  Clarity.
              criteria:
                type: string
                description: >-
                  Specific guidance on how to assess the assistant’s performance
                  for this rubric item.
            additionalProperties: false
          type: array
          minItems: 1
          title: Rubric
          description: Updated evaluation criteria for assessing assistant performance.
      type: object
      title: UpdateAssistantTestRequest
      description: |-
        Request model for updating an existing assistant test.

        All fields are optional, allowing partial updates of test configuration.
        Only provided fields will be updated, others remain unchanged.
    AssistantTestResponse:
      properties:
        test_id:
          type: string
          format: uuid
          title: Test Id
          description: Unique identifier for the assistant test.
          example: 123e4567-e89b-12d3-a456-426614174000
        name:
          type: string
          title: Name
          description: Human-readable name of the test.
          example: Customer Support Bot Test
        description:
          type: string
          title: Description
          description: Detailed description of the test's purpose and scope.
        telnyx_conversation_channel:
          allOf:
            - $ref: '#/components/schemas/TelnyxConversationChannel'
          description: Communication channel used for test execution.
          example: web_chat
        destination:
          type: string
          title: Destination
          description: Target destination for test conversations.
        max_duration_seconds:
          type: integer
          title: Max Duration Seconds
          description: Maximum allowed duration for test execution in seconds.
        test_suite:
          type: string
          title: Test Suite
          description: Test suite grouping for organizational purposes.
        instructions:
          type: string
          title: Instructions
          description: Detailed test scenario instructions and objectives.
        rubric:
          items:
            type: object
            required:
              - name
              - criteria
            properties:
              name:
                type: string
                description: >-
                  Label for the evaluation criterion, e.g., Empathy, Accuracy,
                  Clarity.
              criteria:
                type: string
                description: >-
                  Specific guidance on how to assess the assistant’s performance
                  for this rubric item.
            additionalProperties: false
          type: array
          title: Rubric
          description: Evaluation criteria used to assess test performance.
          example:
            - criteria: Responds within 30 seconds
              name: Response Time
        created_at:
          type: string
          format: date-time
          title: Created At
          description: Timestamp when the test was created.
          example: '2024-01-16T09:00:00Z'
      type: object
      required:
        - test_id
        - name
        - telnyx_conversation_channel
        - rubric
        - created_at
      title: AssistantTestResponse
      description: |-
        Response model containing complete assistant test information.

        Returns all test configuration details including evaluation criteria,
        scheduling, and metadata. Used when retrieving individual tests or
        after creating/updating tests.
    HTTPValidationError:
      title: HTTPValidationError
      type: object
      properties:
        detail:
          title: Detail
          type: array
          items:
            $ref: '#/components/schemas/ValidationError'
    TelnyxConversationChannel:
      type: string
      enum:
        - phone_call
        - web_call
        - sms_chat
        - web_chat
      title: TelnyxConversationChannel
    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

````