Skip to main content
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"
    ]
  }
}
'
{
  "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,
    "create_time": "2025-10-14T12:00:00Z",
    "update_time": "2025-10-15T14:30:00Z"
  }
}

Authorizations

X-API-Key
string
header
required

Organization API key for authentication

Body

application/json

Request body for creating a test set

display_name
string
required

Human-readable test set name

Required string length: 1 - 100
Example:

"Customer Support Scenarios"

slug
string

URL-friendly identifier (auto-generated from display_name if not provided)

Maximum string length: 100
Example:

"customer-support-scenarios"

description
string | null

Test set description

Example:

"Test cases for customer support agent"

test_set_type
string

Test set type (e.g., DEFAULT, SCENARIO, TRANSCRIPT, WORKFLOW)

Maximum string length: 50
Example:

"SCENARIO"

test_set_metadata
object

Additional test set configuration (JSON)

Example:
{ "category": "support", "priority": "high" }
parameters
object

Test case parameterization

Example:
{
  "customer_name": ["Alice", "Bob"],
  "issue_type": ["billing", "technical"]
}

Response

Test set created successfully

test_set
object

Test set resource representation.