Skip to main content
POST
/
v1
/
projects
/
{projectId}
/
test-cases
Create Test Case
curl --request POST \
  --url https://api.pathors.com/v1/projects/{projectId}/test-cases \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "systemPrompt": "<string>",
  "maxTurns": 123,
  "variables": {},
  "acceptanceCriteria": [
    {}
  ]
}
'

Documentation Index

Fetch the complete documentation index at: https://docs.pathors.com/llms.txt

Use this file to discover all available pages before exploring further.

Request

POST https://api.pathors.com/v1/projects/{projectId}/test-cases

Path Parameters

projectId
string
required
The project ID

Headers

Authorization
string
required
Bearer token using your developer key

Body

name
string
required
Name of the test case
systemPrompt
string
required
The system prompt used to simulate the user in the test
maxTurns
integer
required
Maximum number of conversation turns (minimum 1)
variables
object
Key-value pairs of variables to inject into the test
acceptanceCriteria
array
Array of acceptance criteria descriptions (strings)

Response

Returns the created test case with status 201.

Example

curl -X POST https://api.pathors.com/v1/projects/{projectId}/test-cases \
  -H "Authorization: Bearer dk_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Greeting flow",
    "systemPrompt": "You are a customer asking about pricing",
    "maxTurns": 5,
    "variables": { "language": "en" },
    "acceptanceCriteria": [
      "Agent should greet the user",
      "Agent should provide pricing info"
    ]
  }'
{
  "data": {
    "id": "test-case-uuid",
    "projectId": "project-uuid",
    "name": "Greeting flow",
    "systemPrompt": "You are a customer asking about pricing",
    "maxTurns": 5,
    "variables": { "language": "en" },
    "acceptanceCriteria": [
      {
        "id": "criterion-uuid-1",
        "testCaseId": "test-case-uuid",
        "description": "Agent should greet the user"
      },
      {
        "id": "criterion-uuid-2",
        "testCaseId": "test-case-uuid",
        "description": "Agent should provide pricing info"
      }
    ],
    "createdAt": "2026-03-23T00:00:00.000Z",
    "updatedAt": "2026-03-23T00:00:00.000Z"
  }
}