See also: Qualification Rules concept and configuration for what this API powers, when to call it, and how it is configured.
See the Qualification Rules feature page for UI guidance and conceptual overview.
Base path
List qualification rules
Query parameters
Each row in the response is enriched with a
decisioningStage field — the classified stage (one of eligibility, fit, match, ranking) — so the UI can render the three-section layout without re-running the classifier client-side. Legacy stage values (qualification → eligibility, applicability → fit, suitability → match) are mapped automatically.
Response 200
Create a qualification rule
admin role.
Request body
Rule types and config schemas
EachruleType validates against a typed config schema at the API boundary — misspelled or missing required fields are rejected with 400.
Every rule type’s config additionally accepts an optional
onMissing field ("skip" | "block", default "skip") controlling the missing-data path: "skip" fail-opens (rule skipped, warning recorded in the decision trace); "block" fail-closes (candidate rejected with Required attribute "<attr>" not present). See Missing data: onMissing.
Example request
Response 201
Returns the created qualification rule object.
Validation
All fields are validated via Zod schemas (CreateQualificationRuleSchema is a discriminated union on ruleType):
name: 1-255 characters, must be unique per tenant.ruleType: Must be one of the six enum values;configis then validated against the typed schema for that variant.attribute_condition(reads a customer attribute) andoffer_attribute(reads an offer field) share an identical operator set, includingnot_in,contains, andnot_contains(the negation ofcontains— true when a list attribute does not include the value, e.g.customer.opt_outs not_contains "all").in/not_inrequire an arrayvalue. These operators evaluate array membership, so a scalar ("value": "gold"instead of["gold"]) silently turns the gate into a no-op —not_inwould then pass every candidate andinwould block every candidate, the opposite of the author’s intent. The API rejects a scalarvaluefor these two operators with400and a message naming the failure. Use["gold","platinum"].scope: Must be one of the eight enum values (global,segment,channel,category,subcategory,offer,creative,placement).priority: Integer, 0-100.stage: Must beeligibility,fit,match, orranking.
Error codes
Update a qualification rule
admin role.
Request body
All fields from the create schema are accepted as optional, plus:Example request
Response 200
Returns the updated qualification rule object.
Delete a qualification rule
draftConfig.
Query parameters
Response 200
This endpoint uses soft-delete — the record is not physically removed from the database. It is excluded from GET results by default. To include soft-deleted records, pass
?includeDeleted=true on the GET request.Unlike most DELETE endpoints that return
204, this endpoint returns 200 with a body so it can communicate ghost-reference warnings. The API checks all Decision Flows in the tenant for references to this rule ID in their draftConfig.stages.filter.qualificationRuleIds array.Error codes
Role requirements
Soft-delete and audit
Qualification rules use soft-delete with audit snapshots. When a rule is deleted:- The
deletedAttimestamp is set (record is retained). - An audit snapshot is captured with the full state before deletion.
- Ghost reference warnings are returned if the rule is still referenced by any Decision Flow.
auditedUpdate, incrementing the version field on each change. This provides a full change history for compliance and debugging.
To include soft-deleted rules in GET responses, add ?includeDeleted=true to the query string.
Multi-scope rules are evaluated differently: global-scoped rules are evaluated in the Decision Flow’s Qualify node, while entity-scoped rules (offer, category, channel, creative) are automatically evaluated per-candidate during the recommend pipeline.
Decisioning Gates
Learn more about configuring decisioning gates in the platform UI.