Relativity6Platform Docs
POST/v1/flags

Flags

Analyzes a business for insurance hazard flags using evidence-backed research. Returns hazard categories and flags with confidence scores, explanations, and supporting source links. Run a comprehensive scan with no filters, or narrow the search with category_filter and flag_filter.

Base URLhttps://api.relativity6.com

Authentication

Send your API key in the x-api-key header. Send your API key in this header on every request. Modern keys use the format r6-<keyId>.<secret>.

Request body

FieldTypeRequiredDescription
business_namestringRequiredLegal or trade name of the business.
business_addressstringRequiredFull street address for the business location being evaluated.
category_filterstring[]OptionalLimit analysis to specific hazard categories. Names must match the supported taxonomy exactly (case and spacing are normalized on comparison).Guard · Alarm · Janitorial · Gov't Contractors · Fire Suppression · Pest Control · Temp Staffing · Hab - Prop · Hab - GL
flag_filterstring[]OptionalLimit analysis to specific hazard flags (for example, Bankruptcy or OSHA Violation). When combined with category_filter, each flag must belong to one of the specified categories.

Response

FieldTypeRequiredDescription
requestIdstring (UUID)RequiredUnique identifier for this flags request.
business_namestringRequiredBusiness name from the request.
business_addressstringRequiredBusiness address from the request.
hazard_resultsarrayRequiredEvidence-backed hazard findings, sorted by confidence score descending. Only flags with supporting evidence are returned.
hazard_flagstringRequiredThe hazard flag that matched (for example, Bankruptcy).
hazard_categorystringRequiredHazard category the flag belongs to (for example, Guard).
explanationstringRequiredPlain-language summary of why this flag applies to the business.
confidence_scorenumberRequiredConfidence that the flag applies, from 0 to 1.
evidence_linkstringOptionalURL to supporting evidence when available.
hazard_flag_countsobjectRequiredNumber of hazard_results entries for each hazard_flag name.

Errors

StatusDescription
400Invalid request body, unknown category_filter or flag_filter values, or flag/category mismatch when both filters are provided.
401Missing or invalid API key.
403API key not authorized for this endpoint.
429Organization quota exceeded.
502Upstream research service unavailable.
500Server error.

Example request

Example response