Skip to main content
POST
Create rule

Body

application/json
consumer
enum<string>
required

Which QA.tech agent the rule applies to: chat steers the AI chat assistant, agent steers the test agent during runs, pr_review steers PR review checks.

Available options:
chat,
agent,
pr_review
title
string
required
Required string length: 1 - 200
content
string
required
Required string length: 1 - 10000
applicationShortId
string

Only apply the rule to tests running against this application (agent rules only)

Pattern: ^app(-.+_.+|_.+)$
labelFilter
string

Only apply the rule to test cases carrying this label (agent rules only)

scenarioShortIds
string[]

Only apply the rule to test cases in these scenarios (agent rules only)

Pattern: ^scenario(-.+_.+|_.+)$
urlPathFilter
string

Only apply the rule to tests whose start URL path contains this substring (agent rules only)

sortOrder
integer<int32>

Rules are applied in ascending sort order

projectShortId
string

Target a specific project by its prefixed short ID (proj-slug_shortId or proj_shortId), as returned by the projects API. Required for organization-scoped API keys; project-scoped keys may only pass their own project's short ID.

Pattern: ^proj(-.+_.+|_.+)$

Response

200 - application/json

The request has succeeded.

success
boolean
required
rule
object
required