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 his subscription. ",
  "successCriteria": "Agent should acknowledge the request, offer alternatives, and confirm cancellation if the user insists.",
  "llmModel": "gpt-4o-mini",
  "mockData": [
    {
      "variableName": "customer_name",
      "value": "John Doe"
    },
    {
      "variableName": "account_status",
      "value": "active"
    }
  ],
  "attempt": 5
}
'
{
  "testCaseId": "tc_d17T6uReChpyfFeP",
  "agent": {
    "name": "Demo Agent",
    "agentId": "mJzLaPEo425lieb9",
    "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 his subscription. ",
  "attempt": 5,
  "successCriteria": "Agent should acknowledge the request, offer alternatives, and confirm cancellation if the user 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 assigned to handle the chat simulation.

Example:

"D5D0p7TUs66TTAEAx"

userPrompt
string
required

The user prompt that generates the user or customer messages in the chat simulation.

Example:

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

successCriteria
string
required

Criteria used to evaluate whether the agent successfully handled the conversation.

Example:

"Agent should acknowledge the request, offer alternatives, and confirm cancellation if the user insists."

llmModel
string

The LLM model used to generate Agent responses during the chat simulation. For priority models of OpenAI, please use the suffix '-fast-tier' after the model name, eg: gpt-4o-mini-fast-tier

Example:

"gpt-4o-mini"

mockData
object[]

List of mock data variables used to simulate external inputs during the chat.

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

The number of times the simulation should run with this test case. Default is 1.

Example:

5

Response

OK

testCaseId
string

Unique identity for a test case

Example:

"tc_d17T6uReChpyfFeP"

agent
object

Assigned agent for current campaign

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

Workspace to which the user belongs

Example:

"org_V6eZ2zg8ziDx5pft"

llmModel
string

LLM Model used to generate the Agent response during the chat simulation

Example:

"gpt-4o-mini"

mockData
object[]

List of mock data variables used to simulate external inputs during the chat.

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

User prompt used to generate the Customer queries during the chat simulation

Example:

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

attempt
integer<int64>

The number of times the chat simulation should run with this test case.

Example:

5

successCriteria
string

Criteria used to evaluate whether the agent successfully handled the conversation.

Example:

"Agent should acknowledge the request, offer alternatives, and confirm cancellation if the user insists."