Genex
04/02/2025, 10:11 PMVapi Support Bot
04/02/2025, 10:12 PMPOST /test-suite
with your authentication token
bash
curl -X POST https://api.vapi.ai/test-suite \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"name": "Your Test Suite Name"}'
## 2. Add a Test Case
After creating your test suite:
- Click "Add Test" to add a new test case
- Or use the API endpoint: POST /test-suite/:testSuiteId/test
bash
curl -X POST https://api.vapi.ai/test-suite/testSuiteId/test \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"type": "voice",
"scorers": [
{
"type": "ai",
"rubric": "rubric"
}
],
"script": "script"
}'
## 3. Configure Server URL
You can configure your server URL at different levels in Vapi, with the following order of precedence:
1. Function level (highest priority)
2. Assistant level
3. Phone Number level
4. Account-wide level (lowest priority)
According to the [server URL documentation](https://docs.vapi.ai/server-url/setting-server-urls), you can set these URLs in the dashboard or via API.
## 4. Server Configuration Parameters
When configuring your server, you can set these parameters:
json
"server": {
"url": "https://your-server-url.com/endpoint",
"headers": {
"Authorization": "Bearer your_token"
},
"timeoutSeconds": 30
}
## 5. Testing Your Server URL
For testing, you can:
- Use [ngrok](https://docs.vapi.ai/server-url/developing-locally) to expose your local server:
```bashVapi Support Bot
04/02/2025, 10:12 PMThen use the forwarding URL as your server URL in Vapi
- Test with cURL to send requests directly to your endpoint:
```bash
curl -X POST https://your-server-url.com/endpoint \
-H "Content-Type: application/json" \
-d '{"your": "payload"}'
- Inspect API endpoints and review logs to identify any issues
Is there anything specific about configuring your server URL test case that you'd like me to elaborate on?
Sources:
- [Server URL documentation](https://docs.vapi.ai/server-url/setting-server-urls)
- [Server URL developing locally](https://docs.vapi.ai/server-url/developing-locally)
- [Test Suite API documentation](https://docs.vapi.ai/api-reference/test-suite-tests/test-suite-test-controller-create)Vapi
04/06/2025, 9:17 AMGenex
04/06/2025, 6:24 PMVapi
04/07/2025, 2:41 PM