General Documentation
Agents
Agent Executions
Test Suites
Projects
WhatsApp Conversations
Customers
WhatsApp Configs
Agent Test Chats
Conversation Assignments
WhatsApp Templates
WhatsApp Contact Notes
Agent Snapshots
Test Runs
Create a new test run
Creates a new test run for a specific test case
POST
/
test_cases
/
{test_case_id}
/
test_runs
Copy
curl --request POST \
--url https://app.kapso.ai/api/v1/test_cases/{test_case_id}/test_runs \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '{
"agent_test_run": {},
"run_now": false
}'
Copy
{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"thread_id": "thread_12345abcde",
"started_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"score": 9.5,
"feedback": "The agent performed well on this test",
"execution_completed": true,
"conversation": {},
"full_history": {},
"error": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"test_case": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Greeting Test",
"description": "Tests the agent's greeting response",
"script": "Ask the agent to introduce itself",
"rubric": "The agent should respond with a polite introduction",
"test_suite_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}
}
Authorizations
API key required for all endpoints
Path Parameters
Body
application/json
Response
201
application/json
Test run created successfully
The response is of type object
.
Copy
curl --request POST \
--url https://app.kapso.ai/api/v1/test_cases/{test_case_id}/test_runs \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '{
"agent_test_run": {},
"run_now": false
}'
Copy
{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"thread_id": "thread_12345abcde",
"started_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"score": 9.5,
"feedback": "The agent performed well on this test",
"execution_completed": true,
"conversation": {},
"full_history": {},
"error": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"test_case": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Greeting Test",
"description": "Tests the agent's greeting response",
"script": "Ask the agent to introduce itself",
"rubric": "The agent should respond with a polite introduction",
"test_suite_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}
}
Assistant
Responses are generated using AI and may contain mistakes.