Skip to main content
GET
/
v2
/
list-test-case-definitions
JavaScript
import Retell from 'retell-sdk';

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

const response = await client.tests.listTestCaseDefinitions({ type: 'retell-llm' });

console.log(response.has_more);
{
  "pagination_key": "<string>",
  "has_more": true,
  "items": [
    {
      "name": "<string>",
      "response_engine": {
        "type": "retell-llm",
        "llm_id": "<string>",
        "version": 0
      },
      "user_prompt": "<string>",
      "metrics": [
        "<string>"
      ],
      "dynamic_variables": {},
      "tool_mocks": [
        {
          "tool_name": "<string>",
          "input_match_rule": {
            "type": "any"
          },
          "output": "<string>",
          "result": true
        }
      ],
      "test_case_definition_id": "<string>",
      "type": "simulation",
      "creation_timestamp": 123,
      "user_modified_timestamp": 123
    }
  ]
}

Authorizations

Authorization
string
header
required

Authentication header containing API key (find it in dashboard). The format is "Bearer YOUR_API_KEY"

Query Parameters

type
enum<string>
required

Type of response engine

Available options:
retell-llm,
conversation-flow
llm_id
string

LLM ID (required when type is retell-llm)

conversation_flow_id
string

Conversation flow ID (required when type is conversation-flow)

limit
integer
default:50

Maximum number of items to return.

Required range: x <= 1000
pagination_key
string

Pagination key for fetching the next page.

Response

Test case definitions retrieved successfully

pagination_key
string

Pagination key for the next page.

has_more
boolean

Whether more results are available.

items
object[]