Skip to main content
GET
/
api
/
v1
/
external
/
companies
/
{companyId}
/
policies
/
{policyId}
/
validate
Validate Policy
curl --request GET \
  --url https://app.aiinsurance.io/api/v1/external/companies/{companyId}/policies/{policyId}/validate \
  --header 'Authorization: <api-key>'
{
  "policyId": "550e8400-e29b-41d4-a716-446655440001",
  "validatedAt": "2026-04-14T18:30:00.000Z",
  "summary": {
    "totalChecks": 8,
    "passed": 8,
    "failed": 0,
    "skipped": 0
  },
  "results": [
    {
      "check": "contiguity",
      "status": "pass",
      "scope": "version:1"
    },
    {
      "check": "fullTermInvariance",
      "status": "pass",
      "scope": "version:1"
    },
    {
      "check": "hashCorrectness",
      "status": "pass",
      "scope": "version:1"
    },
    {
      "check": "noDuplicateSegments",
      "status": "pass",
      "scope": "version:1"
    },
    {
      "check": "transactionSegmentExistence",
      "status": "pass",
      "scope": "version:1"
    },
    {
      "check": "cancelEarnedPremium",
      "status": "pass",
      "scope": "policy"
    },
    {
      "check": "cancelReinstatePremium",
      "status": "pass",
      "scope": "policy"
    },
    {
      "check": "versionSequentiality",
      "status": "pass",
      "scope": "policy"
    }
  ]
}

Authorizations

Authorization
string
header
required

API key authentication. Include your API key in the Authorization header.

Path Parameters

companyId
string<uuid>
required

Company identifier

policyId
string<uuid>
required

Policy identifier

Query Parameters

version
integer

Validate only this policy version. If omitted, all versions are validated. Version-scoped checks run only for the specified version; policy-scoped checks always run.

Required range: x >= 1
checks
string

Comma-separated list of check names to run (e.g., contiguity,hashCorrectness). If omitted, all checks run. Unrecognized check names are silently ignored. If all provided names are unrecognized, all checks run (same as omitting the parameter). Check names are case-sensitive.

Response

Validation results for the policy

Validation results for a single policy, including a summary of pass/fail/skip counts and the individual check results.

policyId
string<uuid>
required

The policy that was validated

validatedAt
string<date-time>
required

ISO 8601 timestamp of when the validation was performed

summary
object
required

Aggregate counts of check results for a single policy. A policy with multiple versions will have more results than the number of check types, because version-scoped checks run once per version.

results
object[]
required

Individual check results. Contains one entry per check per scope (version-scoped checks produce one result per version).