---
title: "Create QA Rule"
method: POST
path: "/v1/qa-rules"
tags: ["QA Rules"]
---

# Create QA Rule

`POST /v1/qa-rules`

Creates a new QA rule with the specified configuration. Define the rule's evaluation criteria and expected result. Returns the created QA rule, including its qaRuleId for subsequent get, update, delete, and issue-listing calls.

## Request body

- CreateQARuleRequest
  - `ruleName` string, required — The name of the QA rule, used to identify it in rule lists and evaluation reports.
  - `ruleDescription` string — A brief explanation of what this QA rule evaluates and its intended purpose.
  - `evaluationCriteria` string, required — The specific criteria used to evaluate agent responses against this rule.
  - `expectedValue` true | false — The expected outcome of the evaluation criteria that determines a successful QA result. Set to true if the evaluation criteria returning true should be treated as a Success, or false if the evaluation criteria returning true should be treated as a Fail. Default is true.
  - `agentIds` string[], required — List of agent Ids on which QA rule would apply

## Response `201`

OK

- QARuleResponse
  - `qaRuleId` string — The unique identifier of the QA rule.
  - `workspaceId` string — The unique identifier of the workspace this QA rule belongs to.
  - `ruleName` string — The name of the QA rule, used to identify it in rule lists and evaluation reports.
  - `ruleDescription` string — A brief explanation of what this QA rule evaluates and its intended purpose.
  - `agents` AgentResponse[]
    - `name` string — The display name of the assigned agent.
    - `agentId` string — The unique identifier of the agent within the system.
    - `status` 'Live' | 'Testing' | 'Disabled' — The current operational status of the agent.
  - `evaluationCriteria` string — The specific criteria or rubric used to evaluate agent responses against this rule.
  - `expectedValue` boolean — The expected evaluation result that determines whether the QA rule is satisfied. When the evaluation criteria returns a result matching this expected value, the interaction is marked as a Success; otherwise it is marked as a Fail.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `500` — Internal Server Error

---

[API](https://skmtc.net/sigmamind/apis/sigmamind-apis.md) · [All operations](https://skmtc.net/sigmamind/apis/sigmamind-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sigmamind/sigmamind-apis/revisions/d00f52b5123f/schema)
