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": "New AI Agent",
    "agentId": "agent_D5D0p7TUs66TTAEAx",
    "status": "Live"
  },
  "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."
}

Documentation Index

Fetch the complete documentation index at: https://docs.sigmamind.ai/llms.txt

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

Authorizations

X-API-Key
string
header
required

Authenticate every request by passing your API key in the X-API-Key header. To get your key, go to Dashboard → API Keys and create or copy your Production API key.

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
enum<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').

Available options:
gpt-5.2,
gpt-5.2-fast-tier,
gpt-5.1,
gpt-5.1-fast-tier,
gpt-5,
gpt-5-fast-tier,
gpt-5-mini,
gpt-5-mini-fast-tier,
gpt-5-nano,
gpt-4.1,
gpt-4.1-fast-tier,
gpt-4.1-mini,
gpt-4.1-mini-fast-tier,
gpt-4.1-nano,
gpt-4.1-nano-fast-tier,
gpt-4o,
gpt-4o-fast-tier,
gpt-4o-mini,
gpt-4o-mini-fast-tier,
claude-haiku-4-5-20251001,
claude-sonnet-4-5-20250929,
claude-sonnet-4-20250514,
gemini-3.1-flash-lite-preview,
gemini-3-flash-preview,
gemini-2.5-flash-lite,
gemini-2.5-flash
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

Created

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

Agent assigned to handle all calls in this campaign. Contains the agent's ID, name, and current status. All contacts in the campaign's contact list will be called using this agent.

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."