Update test set
curl --request PATCH \
--url https://api.coval.dev/v1/test-sets/{test_set_id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"display_name": "Updated Test Set Name",
"slug": "updated-slug",
"description": "Updated description",
"test_set_type": "WORKFLOW",
"test_set_metadata": {
"category": "support",
"updated": true
},
"parameters": {
"name": [
"Alice",
"Bob"
]
},
"tags": [
"regression"
]
}
'import requests
url = "https://api.coval.dev/v1/test-sets/{test_set_id}"
payload = {
"display_name": "Updated Test Set Name",
"slug": "updated-slug",
"description": "Updated description",
"test_set_type": "WORKFLOW",
"test_set_metadata": {
"category": "support",
"updated": True
},
"parameters": { "name": ["Alice", "Bob"] },
"tags": ["regression"]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
display_name: 'Updated Test Set Name',
slug: 'updated-slug',
description: 'Updated description',
test_set_type: 'WORKFLOW',
test_set_metadata: {category: 'support', updated: true},
parameters: {name: ['Alice', 'Bob']},
tags: ['regression']
})
};
fetch('https://api.coval.dev/v1/test-sets/{test_set_id}', 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/{test_set_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'display_name' => 'Updated Test Set Name',
'slug' => 'updated-slug',
'description' => 'Updated description',
'test_set_type' => 'WORKFLOW',
'test_set_metadata' => [
'category' => 'support',
'updated' => true
],
'parameters' => [
'name' => [
'Alice',
'Bob'
]
],
'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/{test_set_id}"
payload := strings.NewReader("{\n \"display_name\": \"Updated Test Set Name\",\n \"slug\": \"updated-slug\",\n \"description\": \"Updated description\",\n \"test_set_type\": \"WORKFLOW\",\n \"test_set_metadata\": {\n \"category\": \"support\",\n \"updated\": true\n },\n \"parameters\": {\n \"name\": [\n \"Alice\",\n \"Bob\"\n ]\n },\n \"tags\": [\n \"regression\"\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.coval.dev/v1/test-sets/{test_set_id}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"display_name\": \"Updated Test Set Name\",\n \"slug\": \"updated-slug\",\n \"description\": \"Updated description\",\n \"test_set_type\": \"WORKFLOW\",\n \"test_set_metadata\": {\n \"category\": \"support\",\n \"updated\": true\n },\n \"parameters\": {\n \"name\": [\n \"Alice\",\n \"Bob\"\n ]\n },\n \"tags\": [\n \"regression\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coval.dev/v1/test-sets/{test_set_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"display_name\": \"Updated Test Set Name\",\n \"slug\": \"updated-slug\",\n \"description\": \"Updated description\",\n \"test_set_type\": \"WORKFLOW\",\n \"test_set_metadata\": {\n \"category\": \"support\",\n \"updated\": true\n },\n \"parameters\": {\n \"name\": [\n \"Alice\",\n \"Bob\"\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": "NOT_FOUND",
"message": "Test set not found",
"details": [
{
"field": "test_set_id",
"description": "Test set 'abc12345' not found"
}
]
}
}{
"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
Update test set
Update a test set.
PATCH
/
test-sets
/
{test_set_id}
Update test set
curl --request PATCH \
--url https://api.coval.dev/v1/test-sets/{test_set_id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"display_name": "Updated Test Set Name",
"slug": "updated-slug",
"description": "Updated description",
"test_set_type": "WORKFLOW",
"test_set_metadata": {
"category": "support",
"updated": true
},
"parameters": {
"name": [
"Alice",
"Bob"
]
},
"tags": [
"regression"
]
}
'import requests
url = "https://api.coval.dev/v1/test-sets/{test_set_id}"
payload = {
"display_name": "Updated Test Set Name",
"slug": "updated-slug",
"description": "Updated description",
"test_set_type": "WORKFLOW",
"test_set_metadata": {
"category": "support",
"updated": True
},
"parameters": { "name": ["Alice", "Bob"] },
"tags": ["regression"]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
display_name: 'Updated Test Set Name',
slug: 'updated-slug',
description: 'Updated description',
test_set_type: 'WORKFLOW',
test_set_metadata: {category: 'support', updated: true},
parameters: {name: ['Alice', 'Bob']},
tags: ['regression']
})
};
fetch('https://api.coval.dev/v1/test-sets/{test_set_id}', 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/{test_set_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'display_name' => 'Updated Test Set Name',
'slug' => 'updated-slug',
'description' => 'Updated description',
'test_set_type' => 'WORKFLOW',
'test_set_metadata' => [
'category' => 'support',
'updated' => true
],
'parameters' => [
'name' => [
'Alice',
'Bob'
]
],
'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/{test_set_id}"
payload := strings.NewReader("{\n \"display_name\": \"Updated Test Set Name\",\n \"slug\": \"updated-slug\",\n \"description\": \"Updated description\",\n \"test_set_type\": \"WORKFLOW\",\n \"test_set_metadata\": {\n \"category\": \"support\",\n \"updated\": true\n },\n \"parameters\": {\n \"name\": [\n \"Alice\",\n \"Bob\"\n ]\n },\n \"tags\": [\n \"regression\"\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.coval.dev/v1/test-sets/{test_set_id}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"display_name\": \"Updated Test Set Name\",\n \"slug\": \"updated-slug\",\n \"description\": \"Updated description\",\n \"test_set_type\": \"WORKFLOW\",\n \"test_set_metadata\": {\n \"category\": \"support\",\n \"updated\": true\n },\n \"parameters\": {\n \"name\": [\n \"Alice\",\n \"Bob\"\n ]\n },\n \"tags\": [\n \"regression\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coval.dev/v1/test-sets/{test_set_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"display_name\": \"Updated Test Set Name\",\n \"slug\": \"updated-slug\",\n \"description\": \"Updated description\",\n \"test_set_type\": \"WORKFLOW\",\n \"test_set_metadata\": {\n \"category\": \"support\",\n \"updated\": true\n },\n \"parameters\": {\n \"name\": [\n \"Alice\",\n \"Bob\"\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": "NOT_FOUND",
"message": "Test set not found",
"details": [
{
"field": "test_set_id",
"description": "Test set 'abc12345' not found"
}
]
}
}{
"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
Path Parameters
Test set ID (8-character ID)
Required string length:
8Body
application/json
Update request. Only provided fields will be updated.
Human-readable test set name
Required string length:
1 - 100Example:
"Updated Test Set Name"
URL-friendly identifier
Maximum string length:
100Example:
"updated-slug"
Test set description
Example:
"Updated description"
Test set type
Maximum string length:
50Example:
"WORKFLOW"
Additional configuration (null = don't update, {} = clear field)
Example:
{ "category": "support", "updated": true }Test case parameterization (null = don't update, {} = clear field)
Example:
{ "name": ["Alice", "Bob"] }Tags to associate with this test set. Null or omitted leaves tags unchanged. Pass [] to clear all tags.
Example:
["regression"]Response
Test set updated successfully
Test set resource representation.
Show child attributes
Show child attributes
Was this page helpful?
⌘I