Run Call Unit Tests Endpoint

Run call unit tests for a specific agent.

This endpoint:

  1. Fetches the agent's current configuration
  2. Retrieves test cases from db-svc (conversation contexts marked as unit tests)
  3. Runs each test case against the agent's current settings
  4. Calculates similarity scores using LLM-as-judge
  5. Saves results to db-svc
  6. Returns the test results

Args: request: RunCallUnitTestsRequest with agent_id, optional test_ids, and similarity_threshold

Returns: RunCallUnitTestsResponse with all test run results

post/testing/call-unit/run

Request

  • Base URL
    https://api.phonely.ai (the document declares no server; this is the origin it was published from)
  • URL
    https://api.phonely.ai/testing/call-unit/run
  • Auth
    none declared. Required headers: authorization

Headers

authorizationstring required

Request body

agent_idstring required

Agent ID to run tests for

test_idsstring[] nullable

Specific test IDs to run, None = run all

similarity_thresholdinteger

Percentage needed to pass (0-100)

Response

Successful Response

result_idstring required

ID of the saved test result

passed_testsinteger required

Number of tests that passed

total_testsinteger required

Total number of tests run

status'in_progress' | 'completed' | 'failed' required

Status of a call unit test result batch

Changes

No recorded changes to this operation across all 2 revisions of this API.