Skip to main content
POST
/
v1
/
test-cases
Create Test Case
curl --request POST \
  --url https://api.sigmamind.ai/v1/test-cases \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "agentId": "D5D0p7TUs66TTAEAx",
  "userPrompt": "You are an angry customer who wants to cancel their subscription.",
  "successCriteria": "The agent should acknowledge the cancellation request, present retention alternatives, and confirm the cancellation if the customer insists.",
  "label": "Angry Customer - Cancellation Flow",
  "llmModel": "gpt-4o-mini",
  "mockData": [
    {
      "variableName": "customer_name",
      "value": "John Doe"
    },
    {
      "variableName": "account_status",
      "value": "active"
    }
  ],
  "attempt": 5
}
'
{
  "testCaseId": "tc_d17T6uReChpyfFeP",
  "label": "Angry Customer - Cancellation Flow",
  "agent": {
    "name": "Demo Agent",
    "agentId": "D5D0p7TUs66TTAEAx",
    "status": "Testing"
  },
  "workspaceId": "org_V6eZ2zg8ziDx5pft",
  "llmModel": "gpt-4o-mini",
  "mockData": [
    {
      "variableName": "customer_name",
      "value": "John Doe"
    },
    {
      "variableName": "account_status",
      "value": "active"
    }
  ],
  "userPrompt": "You are an angry customer who wants to cancel your subscription.",
  "attempt": 5,
  "successCriteria": "The agent should acknowledge the cancellation request, present retention alternatives, and confirm the cancellation if the customer insists."
}

Authorizations

X-API-Key
string
header
required

API Key is required in header. You can find it in the settings

Body

application/json
agentId
string
required

The unique identifier of the Agent that will respond during the chat simulation.

Example:

"D5D0p7TUs66TTAEAx"

userPrompt
string
required

A prompt that defines the persona and intent of the simulated user. This drives the user-side messages throughout the conversation.

Example:

"You are an angry customer who wants to cancel their subscription."

successCriteria
string
required

A plain-language description of what a successful agent response looks like. Used to evaluate the agent's performance after each simulation run.

Example:

"The agent should acknowledge the cancellation request, present retention alternatives, and confirm the cancellation if the customer insists."

label
string

A human-readable name or label for the test case, used to identify it in reports and dashboards.

Example:

"Angry Customer - Cancellation Flow"

llmModel
string

The LLM model used to generate Agent responses during the simulation. To use OpenAI priority tier models, append '-fast-tier' to the model name (e.g., 'gpt-4o-mini-fast-tier').

Example:

"gpt-4o-mini"

mockData
object[]

A list of mock variables that substitute for real external data sources during the simulation. Each entry defines a variable name and its simulated value.

Example:
[
{
"variableName": "customer_name",
"value": "John Doe"
},
{
"variableName": "account_status",
"value": "active"
}
]
attempt
integer<int64>

The number of times this test case should be executed. Each run is an independent simulation. Defaults to 1.

Example:

5

Response

OK

testCaseId
string

The unique identifier of the test case.

Example:

"tc_d17T6uReChpyfFeP"

label
string

A human-readable name or label for the test case, used to identify it in reports and dashboards.

Example:

"Angry Customer - Cancellation Flow"

agent
object

Assigned agent for handling conversations

Example:
{
"name": "Demo Agent",
"agentId": "D5D0p7TUs66TTAEAx",
"status": "Testing"
}
workspaceId
string

The unique identifier of the workspace under which this test case was created.

Example:

"org_V6eZ2zg8ziDx5pft"

llmModel
string

The LLM model used to generate Agent responses during the simulation.

Example:

"gpt-4o-mini"

mockData
object[]

The list of mock variables and their simulated values that were used to substitute for real external data sources during the simulation.

Example:
[
{
"variableName": "customer_name",
"value": "John Doe"
},
{
"variableName": "account_status",
"value": "active"
}
]
userPrompt
string

The prompt that defined the persona and intent of the simulated user, driving the user-side messages throughout the conversation.

Example:

"You are an angry customer who wants to cancel your subscription."

attempt
integer<int64>

The number of times this test case was configured to run as independent simulation attempts.

Example:

5

successCriteria
string

The plain-language description of what a successful agent response looks like, used to evaluate the agent's performance after each simulation run.

Example:

"The agent should acknowledge the cancellation request, present retention alternatives, and confirm the cancellation if the customer insists."