Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.kaireonai.com/llms.txt

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

POST /api/v1/policy-conflicts/analyze

Run static analysis on the tenant’s contact policy configuration to detect conflicts, overlaps, contradictions, and priority ties. No request body is required — the endpoint analyzes all active contact policies for the current tenant.

Response

The response includes a conflicts array with detailed conflict records, and a summary object with totals broken down by severity.
{
  "conflicts": [
    {
      "type": "contradiction",
      "severity": "error",
      "description": "Policy A blocks email delivery while Policy B requires email as only channel",
      "policies": ["cp_001", "cp_002"],
      "recommendation": "Review channel scoping on both policies"
    },
    {
      "type": "overlap",
      "severity": "warning",
      "description": "Policies C and D both cap email to 3/week with identical scope",
      "policies": ["cp_003", "cp_004"],
      "recommendation": "Consider merging into a single policy"
    },
    {
      "type": "priority_tie",
      "severity": "warning",
      "description": "Policies E and F have identical priority (50) and overlapping scope",
      "policies": ["cp_005", "cp_006"],
      "recommendation": "Assign different priorities to ensure deterministic evaluation order"
    }
  ],
  "summary": {
    "total": 3,
    "errors": 1,
    "warnings": 2
  }
}
When all policies are well-formed and non-conflicting, the response returns an empty conflicts array and summary: { total: 0, errors: 0, warnings: 0 }.

Conflict Types

TypeDescription
contradictionTwo policies produce mutually exclusive outcomes
overlapTwo policies cover the same scope with redundant rules
priority_tiePolicies share the same priority and overlapping scope
gapA scope combination has no policy coverage
dead_ruleA policy can never fire due to higher-priority blocking policies
See also: Contact Policies | AI Intelligence