Disqualification
Endpoints for inspecting hard-disqualification rule activity. For the user-facing concept and configuration walkthrough, see the Hard Disqualification guide.
GET /scoring/disqualifications/match-counts
Return the current match count for every active hard-disqualification rule in the active Organizational Unit. The Configure > Scoring > Disqualification tab uses this endpoint to render the per-rule counts shown next to each rule. It is also useful as a programmatic health check on your disqualification ruleset.
A rule's match count is the number of leads in the OU that are currently disqualified by that specific rule. A lead disqualified by two rules contributes to both counts.
Request
No request body. Authentication and active OU context are taken from your credentials.
Response
Status: 200 OK
{
"match_counts": [
{
"rule_id": "8b2c1a5e-...",
"dimension": "profile",
"rule_name": "email equals \"\" AND phone equals \"\"",
"match_count": 142
},
{
"rule_id": "7d4f9c3a-...",
"dimension": "profile",
"rule_name": "email_domain in [gmail.com, yahoo.com]",
"match_count": 38
},
{
"rule_id": "2e1a8b6c-...",
"dimension": "account",
"rule_name": "account_status equals \"Competitor\"",
"match_count": 6
}
]
}
Response Fields
| Field | Type | Description |
|---|---|---|
match_counts[].rule_id | string | Rule identifier. Use this to look the rule up via the rule endpoints, or to navigate directly to the rule slideout in the UI. |
match_counts[].dimension | string | Either profile or account. Engagement and deal dimensions are not supported for hard disqualification. |
match_counts[].rule_name | string | Human-readable summary of the rule's conditions, synthesised from its property and operator. In V1 there is no separate user-editable name field on rules, so this string is what the UI displays. |
match_count | integer | Number of leads in the OU currently disqualified by this rule. |
Example
curl -X GET "https://api.kenbun.io/scoring/disqualifications/match-counts" \
-H "Authorization: Bearer <token>"
Common Errors
| Status | Meaning | Solution |
|---|---|---|
| 400 | Missing or malformed authentication context | Confirm your credentials and that you have an active OU selected. |
| 401 | Unauthorized | Verify your API credentials. |
| 500 | Server error | Retry. If the error persists, contact support. |
Configuring Hard-Disqualification Rules
Hard-disqualification rules are created and updated through the existing profile and account rule endpoints. Two fields on the rule POST and PUT bodies enable hard-disqualification behavior:
rule_typeaccepts either"add_points"(the default, normal scoring rule) or"hard_disqualify"(the rule disqualifies matching leads instead of scoring them).conditionsis a JSON object that captures compound AND/OR conditions for hard-disqualification rules. It is only honored whenrule_typeis"hard_disqualify". The shape supports a single flat group with two or more conditions and agroup_operatorof"AND"or"OR".
For the full POST and PUT request shapes, see the existing rule endpoints:
Conditions JSON Shape
When rule_type is "hard_disqualify" and the rule uses compound conditions, the conditions field looks like:
{
"group_operator": "AND",
"conditions": [
{ "property": "email", "operator": "equals", "value": "" },
{ "property": "phone", "operator": "equals", "value": "" }
]
}
Single-condition hard-disqualification rules can omit the conditions field and use the rule's existing top-level property, operator, and value fields, exactly like an "add_points" rule.
Behavior After Save
When a hard-disqualification rule is created or updated, kenbun re-evaluates it across the OU within seconds. Matching leads are flagged immediately. Their score values are preserved, but they are excluded from default lead and account lists, segment counts, and trigger evaluations. See the Hard Disqualification guide for the full behavior contract.
Related Endpoints
- Profile Rules: create or list profile rules, including hard-disqualification rules
- Profile Rule by ID: update or delete a single profile rule
See Also
- Hard Disqualification guide: concepts, configuration walkthrough, and best practices
- Profile Scoring: how profile rules work in general
- Account Scoring: the account-level equivalent