Skip to main content

Update an assistant test

PUT 
/ai/assistants/tests/:test_id

Updates an existing assistant test configuration with new settings

Request

Path Parameters

    test_id Test Idrequired

Body

required

    name Name (string)

    Possible values: non-empty and <= 255 characters

    Updated name for the assistant test. Must be unique and descriptive.

    description Description (string)

    Possible values: <= 1000 characters

    Updated description of the test's purpose and evaluation criteria.

    telnyx_conversation_channel TelnyxConversationChannel (string)

    Possible values: [phone_call, web_call, sms_chat, web_chat]

    Updated communication channel for the test execution.

    destination Destination (string)

    Possible values: non-empty

    Updated target destination for test conversations.

    max_duration_seconds Max Duration Seconds (integer)

    Possible values: >= 1 and <= 3600

    Updated maximum test duration in seconds.

    test_suite Test Suite (string)

    Possible values: <= 100 characters

    Updated test suite assignment for better organization.

    instructions Instructions (string)

    Possible values: non-empty and <= 5000 characters

    Updated test scenario instructions and objectives.

    rubric

    object[]

    Possible values: >= 1

    Updated evaluation criteria for assessing assistant performance.

  • Array [

  • name stringrequired

    Label for the evaluation criterion, e.g., Empathy, Accuracy, Clarity.

    criteria stringrequired

    Specific guidance on how to assess the assistant’s performance for this rubric item.

  • ]

Responses

200: Returns the updated test configuration with all changes applied

422: Validation Error

Request samples


curl -L -X PUT 'https://api.telnyx.com/v2/ai/assistants/tests/:test_id' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"name": "string",
"description": "string",
"telnyx_conversation_channel": "phone_call",
"destination": "string",
"max_duration_seconds": 0,
"test_suite": "string",
"instructions": "string",
"rubric": [
{
"name": "string",
"criteria": "string"
}
]
}'

Response samples


{
"test_id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Customer Support Bot Test",
"description": "string",
"telnyx_conversation_channel": "phone_call",
"destination": "string",
"max_duration_seconds": 0,
"test_suite": "string",
"instructions": "string",
"rubric": [
[
{
"criteria": "Responds within 30 seconds",
"name": "Response Time"
}
]
],
"created_at": [
"2024-01-15T09:00:00Z"
]
}