# POST /voice-agents/:agent_id/tests/run

**Resource:** [Agents](./voice-agents.md)  
**MCP tool:** `run_voice_agent_tests`  
**Scopes:** `voice-agents:write`  
**Write operation:** yes

Run a voice agent's chat tests against its latest saved script (published or not). Runs every test unless test_ids is given; repeat (1 to 5) runs each one several times, since AI conversations vary and a pass rate is more telling than one pass. Charged per test conversation (credits_per_test from list_voice_agent_tests). Returns the run straight away; read results with get_voice_agent_test_run after 30 to 90 seconds.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `agent_id` | path | string | yes |  |
| `test_ids` | body | array | no | Only these tests. Omit to run them all. |
| `repeat` | body | number | no | Times to run each test, 1 to 5. Default 1. |
| `require_approval` | body | boolean | no | Optional. Set true to route this write into the approval queue for human review instead of executing it immediately (returns 202 + an approval_id). Works even when your key/token has permission to execute directly. |

## Request example

```bash
curl -X POST   "https://api.trustpager.com/functions/v1/api/v1/voice-agents/:agent_id/tests/run"   -H "Authorization: Bearer YOUR_API_KEY"   -H "Content-Type: application/json"   -d '{"test_ids":"...","repeat":"...","require_approval":"..."}'
```

---
Base URL: `https://api.trustpager.com/functions/v1/api/v1` — Auth: `Authorization: Bearer YOUR_API_KEY`