Skip to main content
GET
/
ai
/
assistants
/
tests
JavaScript
import Telnyx from 'telnyx';

const client = new Telnyx({
  apiKey: 'My API Key',
});

const tests = await client.ai.assistants.tests.list();

console.log(tests.data);
{
  "meta": {
    "total_pages": 123,
    "total_results": 123,
    "page_number": 123,
    "page_size": 123
  },
  "data": [
    {
      "test_id": "123e4567-e89b-12d3-a456-426614174000",
      "name": "Customer Support Bot Test",
      "description": "<string>",
      "telnyx_conversation_channel": "web_chat",
      "destination": "<string>",
      "max_duration_seconds": 123,
      "test_suite": "<string>",
      "instructions": "<string>",
      "rubric": [
        {
          "criteria": "Responds within 30 seconds",
          "name": "Response Time"
        }
      ],
      "created_at": "2024-01-15T09:00:00Z"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

test_suite
string

Filter tests by test suite name

telnyx_conversation_channel
string

Filter tests by communication channel (e.g., 'web_chat', 'sms')

destination
string

Filter tests by destination (phone number, webhook URL, etc.)

page
object

Consolidated page parameter (deepObject style). Originally: page[size], page[number]

Response

Returns paginated test list with metadata for navigation and filtering

Paginated list of assistant tests with metadata.

Returns a subset of tests based on pagination parameters along with metadata for implementing pagination controls in the UI.

meta
object
required

Pagination metadata including total counts and current page info.

data
AssistantTestResponse · object[]
required

Array of assistant test objects for the current page.