Skip to main content
POST
/
run-test
curl -X POST "https://api.magpipe.ai/functions/v1/run-test" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "test_case_id": "b2c3d4e5-2345-6789-abcd-ef0123456789"
  }'
{
  "run_id": "c3d4e5f6-3456-789a-bcde-f01234567890",
  "status": "running",
  "message": "Test run started"
}
Starts a test run for a test case. The system places a real call using the test case configuration, evaluates all assertions after the call completes, and generates an AI analysis for any failures. The run executes asynchronously — this endpoint returns a run_id immediately. Poll List Test Runs to check the result.

Body Parameters

test_case_id
string
required
UUID of the test case to run.

Response

run_id
string
UUID of the newly created test run. Use this to poll for results.
status
string
Initial status — always "running".
message
string
Human-readable confirmation message.

Run Status Values

StatusDescription
pendingQueued, not yet started
runningCall is in progress
passedAll assertions passed
failedOne or more assertions failed
errorSystem error prevented the run from completing
curl -X POST "https://api.magpipe.ai/functions/v1/run-test" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "test_case_id": "b2c3d4e5-2345-6789-abcd-ef0123456789"
  }'
{
  "run_id": "c3d4e5f6-3456-789a-bcde-f01234567890",
  "status": "running",
  "message": "Test run started"
}