Returns test case definitions in the workspace, oldest first. Filter by agent to get the set you would pass to Create batch test.
Request#
Query parameters:
| Field | Type | Required | Description |
|---|---|---|---|
agent_id |
string | No | Only test cases for this agent. |
Example request#
curl "https://api.tried.com.au/list-test-case-definitions?agent_id=agent_3e4f5a6b7c8d9e0f1a2b3c4d" \
-H "Authorization: Bearer $TRIED_API_KEY"const params = new URLSearchParams({ agent_id: "agent_3e4f5a6b7c8d9e0f1a2b3c4d" });
const res = await fetch(`https://api.tried.com.au/list-test-case-definitions?${params}`, {
headers: { Authorization: `Bearer ${process.env.TRIED_API_KEY}` },
});
const testCases = await res.json();import os, requests
res = requests.get(
"https://api.tried.com.au/list-test-case-definitions",
headers={"Authorization": f"Bearer {os.environ['TRIED_API_KEY']}"},
params={"agent_id": "agent_3e4f5a6b7c8d9e0f1a2b3c4d"},
)
test_cases = res.json()Response#
200 OK
An array of test case definitions, ordered by creation time, oldest first. The list is not paginated.
[
{
"test_case_definition_id": "test_case_8f7e6d5c4b3a29180f1e2d3c",
"agent_id": "agent_3e4f5a6b7c8d9e0f1a2b3c4d",
"name": "Reschedule appointment",
"user_prompt": "You are Sam. You have a booking on Tuesday at 3pm. You want to move it to Thursday morning.",
"success_criteria": "The agent confirms the new time and says \"Thursday\".",
"dynamic_variables": { "first_name": "Sam" },
"tool_mocks": [],
"llm_model": "gpt-5.6-terra",
"created_timestamp": 1760850000000,
"last_modification_timestamp": 1760850000000
}
]The fields are described in Create test case definition.
Errors#
| Status | When |
|---|---|
401 |
Missing or invalid API key. |
403 |
The key's IP allowlist or scopes reject the request. This route needs the agents scope. |
429 |
Rate limit exceeded. See Rate limits. |
See Errors for the body format.
Retell compatibility#
Retell serves this list at GET /v2/list-test-case-definitions with response engine filters and pagination. Tried uses GET /list-test-case-definitions, filters by agent_id, and returns a plain array.