Create test set
curl --request POST \
--url https://api.coval.dev/v1/test-sets \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"display_name": "Customer Support Scenarios",
"slug": "customer-support-scenarios",
"description": "Test cases for customer support agent",
"test_set_type": "SCENARIO",
"test_set_metadata": {
"category": "support",
"priority": "high"
},
"parameters": {
"customer_name": [
"Alice",
"Bob"
],
"issue_type": [
"billing",
"technical"
]
},
"tags": [
"regression"
]
}
'import requests
url = "https://api.coval.dev/v1/test-sets"
payload = {
"display_name": "Customer Support Scenarios",
"slug": "customer-support-scenarios",
"description": "Test cases for customer support agent",
"test_set_type": "SCENARIO",
"test_set_metadata": {
"category": "support",
"priority": "high"
},
"parameters": {
"customer_name": ["Alice", "Bob"],
"issue_type": ["billing", "technical"]
},
"tags": ["regression"]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
display_name: 'Customer Support Scenarios',
slug: 'customer-support-scenarios',
description: 'Test cases for customer support agent',
test_set_type: 'SCENARIO',
test_set_metadata: {category: 'support', priority: 'high'},
parameters: {customer_name: ['Alice', 'Bob'], issue_type: ['billing', 'technical']},
tags: ['regression']
})
};
fetch('https://api.coval.dev/v1/test-sets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.coval.dev/v1/test-sets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'display_name' => 'Customer Support Scenarios',
'slug' => 'customer-support-scenarios',
'description' => 'Test cases for customer support agent',
'test_set_type' => 'SCENARIO',
'test_set_metadata' => [
'category' => 'support',
'priority' => 'high'
],
'parameters' => [
'customer_name' => [
'Alice',
'Bob'
],
'issue_type' => [
'billing',
'technical'
]
],
'tags' => [
'regression'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.coval.dev/v1/test-sets"
payload := strings.NewReader("{\n \"display_name\": \"Customer Support Scenarios\",\n \"slug\": \"customer-support-scenarios\",\n \"description\": \"Test cases for customer support agent\",\n \"test_set_type\": \"SCENARIO\",\n \"test_set_metadata\": {\n \"category\": \"support\",\n \"priority\": \"high\"\n },\n \"parameters\": {\n \"customer_name\": [\n \"Alice\",\n \"Bob\"\n ],\n \"issue_type\": [\n \"billing\",\n \"technical\"\n ]\n },\n \"tags\": [\n \"regression\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.coval.dev/v1/test-sets")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"display_name\": \"Customer Support Scenarios\",\n \"slug\": \"customer-support-scenarios\",\n \"description\": \"Test cases for customer support agent\",\n \"test_set_type\": \"SCENARIO\",\n \"test_set_metadata\": {\n \"category\": \"support\",\n \"priority\": \"high\"\n },\n \"parameters\": {\n \"customer_name\": [\n \"Alice\",\n \"Bob\"\n ],\n \"issue_type\": [\n \"billing\",\n \"technical\"\n ]\n },\n \"tags\": [\n \"regression\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coval.dev/v1/test-sets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"display_name\": \"Customer Support Scenarios\",\n \"slug\": \"customer-support-scenarios\",\n \"description\": \"Test cases for customer support agent\",\n \"test_set_type\": \"SCENARIO\",\n \"test_set_metadata\": {\n \"category\": \"support\",\n \"priority\": \"high\"\n },\n \"parameters\": {\n \"customer_name\": [\n \"Alice\",\n \"Bob\"\n ],\n \"issue_type\": [\n \"billing\",\n \"technical\"\n ]\n },\n \"tags\": [\n \"regression\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"test_set": {
"name": "test-sets/abc12345",
"id": "abc12345",
"slug": "customer-support-scenarios",
"display_name": "Customer Support Scenarios",
"description": "Test cases for customer support agent",
"test_set_type": "SCENARIO",
"test_set_metadata": {
"category": "support",
"priority": "high"
},
"parameters": {
"customer_name": [
"Alice",
"Bob"
],
"issue_type": [
"billing",
"technical"
]
},
"test_case_count": 42,
"tags": [
"regression",
"voice"
],
"create_time": "2025-10-14T12:00:00Z",
"update_time": "2025-10-15T14:30:00Z"
}
}{
"error": {
"code": "INVALID_ARGUMENT",
"message": "Invalid request parameters",
"details": [
{
"field": "display_name",
"description": "display_name is required and cannot be empty"
}
]
}
}{
"error": {
"code": "UNAUTHENTICATED",
"message": "Authentication failed",
"details": [
{
"field": "X-API-Key",
"description": "Invalid or missing API key"
}
]
}
}{
"error": {
"code": "INVALID_ARGUMENT",
"message": "Invalid request parameters",
"details": [
{
"field": "slug",
"description": "slug already exists for this organization"
}
]
}
}{
"error": {
"code": "INTERNAL",
"message": "Internal server error",
"details": [
{
"description": "An unexpected error occurred while processing the request"
}
]
}
}Test Sets
Create test set
Create a new test set.
POST
/
test-sets
Create test set
curl --request POST \
--url https://api.coval.dev/v1/test-sets \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"display_name": "Customer Support Scenarios",
"slug": "customer-support-scenarios",
"description": "Test cases for customer support agent",
"test_set_type": "SCENARIO",
"test_set_metadata": {
"category": "support",
"priority": "high"
},
"parameters": {
"customer_name": [
"Alice",
"Bob"
],
"issue_type": [
"billing",
"technical"
]
},
"tags": [
"regression"
]
}
'import requests
url = "https://api.coval.dev/v1/test-sets"
payload = {
"display_name": "Customer Support Scenarios",
"slug": "customer-support-scenarios",
"description": "Test cases for customer support agent",
"test_set_type": "SCENARIO",
"test_set_metadata": {
"category": "support",
"priority": "high"
},
"parameters": {
"customer_name": ["Alice", "Bob"],
"issue_type": ["billing", "technical"]
},
"tags": ["regression"]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
display_name: 'Customer Support Scenarios',
slug: 'customer-support-scenarios',
description: 'Test cases for customer support agent',
test_set_type: 'SCENARIO',
test_set_metadata: {category: 'support', priority: 'high'},
parameters: {customer_name: ['Alice', 'Bob'], issue_type: ['billing', 'technical']},
tags: ['regression']
})
};
fetch('https://api.coval.dev/v1/test-sets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.coval.dev/v1/test-sets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'display_name' => 'Customer Support Scenarios',
'slug' => 'customer-support-scenarios',
'description' => 'Test cases for customer support agent',
'test_set_type' => 'SCENARIO',
'test_set_metadata' => [
'category' => 'support',
'priority' => 'high'
],
'parameters' => [
'customer_name' => [
'Alice',
'Bob'
],
'issue_type' => [
'billing',
'technical'
]
],
'tags' => [
'regression'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.coval.dev/v1/test-sets"
payload := strings.NewReader("{\n \"display_name\": \"Customer Support Scenarios\",\n \"slug\": \"customer-support-scenarios\",\n \"description\": \"Test cases for customer support agent\",\n \"test_set_type\": \"SCENARIO\",\n \"test_set_metadata\": {\n \"category\": \"support\",\n \"priority\": \"high\"\n },\n \"parameters\": {\n \"customer_name\": [\n \"Alice\",\n \"Bob\"\n ],\n \"issue_type\": [\n \"billing\",\n \"technical\"\n ]\n },\n \"tags\": [\n \"regression\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.coval.dev/v1/test-sets")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"display_name\": \"Customer Support Scenarios\",\n \"slug\": \"customer-support-scenarios\",\n \"description\": \"Test cases for customer support agent\",\n \"test_set_type\": \"SCENARIO\",\n \"test_set_metadata\": {\n \"category\": \"support\",\n \"priority\": \"high\"\n },\n \"parameters\": {\n \"customer_name\": [\n \"Alice\",\n \"Bob\"\n ],\n \"issue_type\": [\n \"billing\",\n \"technical\"\n ]\n },\n \"tags\": [\n \"regression\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coval.dev/v1/test-sets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"display_name\": \"Customer Support Scenarios\",\n \"slug\": \"customer-support-scenarios\",\n \"description\": \"Test cases for customer support agent\",\n \"test_set_type\": \"SCENARIO\",\n \"test_set_metadata\": {\n \"category\": \"support\",\n \"priority\": \"high\"\n },\n \"parameters\": {\n \"customer_name\": [\n \"Alice\",\n \"Bob\"\n ],\n \"issue_type\": [\n \"billing\",\n \"technical\"\n ]\n },\n \"tags\": [\n \"regression\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"test_set": {
"name": "test-sets/abc12345",
"id": "abc12345",
"slug": "customer-support-scenarios",
"display_name": "Customer Support Scenarios",
"description": "Test cases for customer support agent",
"test_set_type": "SCENARIO",
"test_set_metadata": {
"category": "support",
"priority": "high"
},
"parameters": {
"customer_name": [
"Alice",
"Bob"
],
"issue_type": [
"billing",
"technical"
]
},
"test_case_count": 42,
"tags": [
"regression",
"voice"
],
"create_time": "2025-10-14T12:00:00Z",
"update_time": "2025-10-15T14:30:00Z"
}
}{
"error": {
"code": "INVALID_ARGUMENT",
"message": "Invalid request parameters",
"details": [
{
"field": "display_name",
"description": "display_name is required and cannot be empty"
}
]
}
}{
"error": {
"code": "UNAUTHENTICATED",
"message": "Authentication failed",
"details": [
{
"field": "X-API-Key",
"description": "Invalid or missing API key"
}
]
}
}{
"error": {
"code": "INVALID_ARGUMENT",
"message": "Invalid request parameters",
"details": [
{
"field": "slug",
"description": "slug already exists for this organization"
}
]
}
}{
"error": {
"code": "INTERNAL",
"message": "Internal server error",
"details": [
{
"description": "An unexpected error occurred while processing the request"
}
]
}
}Authorizations
Organization API key for authentication
Body
application/json
Request body for creating a test set
Human-readable test set name
Required string length:
1 - 100Example:
"Customer Support Scenarios"
URL-friendly identifier (auto-generated from display_name if not provided)
Maximum string length:
100Example:
"customer-support-scenarios"
Test set description
Example:
"Test cases for customer support agent"
Test set type (e.g., DEFAULT, SCENARIO, TRANSCRIPT, WORKFLOW)
Maximum string length:
50Example:
"SCENARIO"
Additional test set configuration (JSON)
Example:
{ "category": "support", "priority": "high" }Test case parameterization
Example:
{
"customer_name": ["Alice", "Bob"],
"issue_type": ["billing", "technical"]
}Tags to associate with this test set. Null or omitted creates the test set with no tags. Pass [] for an empty tag list.
Example:
["regression"]Response
Test set created successfully
Test set resource representation.
Show child attributes
Show child attributes
Was this page helpful?
⌘I