{"openapi":"3.1.0","info":{"title":"TradeProof API","version":"2.0.0","description":"Contractor license verification, insurance compliance, and continuous monitoring against actual state licensing board databases. TradeProof helps general contractors, compliance teams, and construction platforms look up subcontractor credentials across all 50 states with nightly data refresh.","termsOfService":"https://tradeproof.net/terms","contact":{"name":"TradeProof API Support","email":"api@tradeproof.net"},"license":{"name":"Proprietary","url":"https://tradeproof.net/terms"}},"paths":{"/v1/webhooks":{"get":{"tags":["webhooks"],"summary":"List Webhooks","description":"List all webhooks for the current organization.","operationId":"list_webhooks_v1_webhooks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WebhookResponseMasked"},"type":"array","title":"Response List Webhooks V1 Webhooks Get"}}}}}},"post":{"tags":["webhooks"],"summary":"Create Webhook","description":"Register a webhook URL. Professional/Business tier only.","operationId":"create_webhook_v1_webhooks_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhooks/{webhook_id}":{"delete":{"tags":["webhooks"],"summary":"Delete Webhook","description":"Delete a webhook.","operationId":"delete_webhook_v1_webhooks__webhook_id__delete","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"integer","title":"Webhook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhooks/{webhook_id}/deliveries":{"get":{"tags":["webhooks"],"summary":"List Deliveries","description":"List recent delivery logs for a webhook. Professional/Business tier only.","operationId":"list_deliveries_v1_webhooks__webhook_id__deliveries_get","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"integer","title":"Webhook Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Per Page"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhooks/event-types":{"get":{"tags":["webhooks"],"summary":"List Event Types","description":"List all supported webhook event types.","operationId":"list_event_types_v1_webhooks_event_types_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/webhooks/{webhook_id}/test":{"post":{"tags":["webhooks"],"summary":"Test Webhook","description":"Send a test ping to a webhook URL for immediate verification.","operationId":"test_webhook_v1_webhooks__webhook_id__test_post","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"integer","title":"Webhook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/insurance/certificates":{"get":{"tags":["insurance"],"summary":"List Certificates","description":"List all insurance certificates for the current organization.","operationId":"list_certificates_v1_insurance_certificates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/InsuranceCertificateResponse"},"type":"array","title":"Response List Certificates V1 Insurance Certificates Get"}}}}}},"post":{"tags":["insurance"],"summary":"Create Certificate","description":"Create an insurance certificate record for a subcontractor.","operationId":"create_certificate_v1_insurance_certificates_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsuranceCertificateCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsuranceCertificateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/insurance/certificates/{cert_id}":{"get":{"tags":["insurance"],"summary":"Get Certificate","description":"Get a specific insurance certificate with all coverages.","operationId":"get_certificate_v1_insurance_certificates__cert_id__get","parameters":[{"name":"cert_id","in":"path","required":true,"schema":{"type":"integer","title":"Cert Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsuranceCertificateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["insurance"],"summary":"Update Certificate","description":"Update an insurance certificate and its coverages.","operationId":"update_certificate_v1_insurance_certificates__cert_id__put","parameters":[{"name":"cert_id","in":"path","required":true,"schema":{"type":"integer","title":"Cert Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsuranceCertificateUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsuranceCertificateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["insurance"],"summary":"Delete Certificate","description":"Delete an insurance certificate.","operationId":"delete_certificate_v1_insurance_certificates__cert_id__delete","parameters":[{"name":"cert_id","in":"path","required":true,"schema":{"type":"integer","title":"Cert Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/insurance/certificates/{cert_id}/verify":{"post":{"tags":["insurance"],"summary":"Verify Certificate","description":"Run all verification checks on a certificate in the background.\n\nReturns 202 Accepted immediately and runs the full verification\npipeline (NAIC, FMCSA, WC databases, carrier portals) as a\nbackground task. A notification is created when the check completes.","operationId":"verify_certificate_v1_insurance_certificates__cert_id__verify_post","parameters":[{"name":"cert_id","in":"path","required":true,"schema":{"type":"integer","title":"Cert Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/insurance/certificates/{certificate_id}/document":{"get":{"tags":["insurance"],"summary":"Download Certificate Document","description":"Download the stored PDF for a certificate.\n\nReturns the uploaded ACORD 25 certificate file. Access is restricted to\nmembers of the organization that owns the certificate.","operationId":"download_certificate_document_v1_insurance_certificates__certificate_id__document_get","parameters":[{"name":"certificate_id","in":"path","required":true,"schema":{"type":"integer","title":"Certificate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/insurance/certificates/{certificate_id}/verification":{"get":{"tags":["insurance"],"summary":"Get Verification Details","description":"Get detailed verification status for a certificate.\n\nReturns per-coverage verification results, data sources, and freshness\ntimestamps. Source attribution is included on every check result per\nCLAUDE.md compliance requirements.","operationId":"get_verification_details_v1_insurance_certificates__certificate_id__verification_get","parameters":[{"name":"certificate_id","in":"path","required":true,"schema":{"type":"integer","title":"Certificate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/insurance/certificates/{cert_id}/status":{"get":{"tags":["insurance"],"summary":"Get Certificate Status","description":"Get verification status summary for a certificate.","operationId":"get_certificate_status_v1_insurance_certificates__cert_id__status_get","parameters":[{"name":"cert_id","in":"path","required":true,"schema":{"type":"integer","title":"Cert Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/insurance/requirements":{"get":{"tags":["insurance"],"summary":"List Requirements","description":"List all coverage requirement templates.","operationId":"list_requirements_v1_insurance_requirements_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CoverageRequirementResponse"},"type":"array","title":"Response List Requirements V1 Insurance Requirements Get"}}}}}},"post":{"tags":["insurance"],"summary":"Create Requirement","description":"Create a coverage requirement template.","operationId":"create_requirement_v1_insurance_requirements_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoverageRequirementCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoverageRequirementResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/insurance/requirements/{req_id}":{"put":{"tags":["insurance"],"summary":"Update Requirement","description":"Update a coverage requirement template.","operationId":"update_requirement_v1_insurance_requirements__req_id__put","parameters":[{"name":"req_id","in":"path","required":true,"schema":{"type":"integer","title":"Req Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoverageRequirementUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoverageRequirementResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/insurance/requirements/{requirement_id}":{"delete":{"tags":["insurance"],"summary":"Delete Requirement","description":"Delete a coverage requirement template.","operationId":"delete_requirement_v1_insurance_requirements__requirement_id__delete","parameters":[{"name":"requirement_id","in":"path","required":true,"schema":{"type":"integer","title":"Requirement Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/insurance/alerts":{"get":{"tags":["insurance"],"summary":"List Insurance Alerts","description":"List insurance compliance alerts.","operationId":"list_insurance_alerts_v1_insurance_alerts_get","parameters":[{"name":"resolved","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Resolved"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InsuranceAlertResponse"},"title":"Response List Insurance Alerts V1 Insurance Alerts Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/insurance/alerts/{alert_id}/resolve":{"patch":{"tags":["insurance"],"summary":"Resolve Alert","description":"Mark an insurance alert as resolved.","operationId":"resolve_alert_v1_insurance_alerts__alert_id__resolve_patch","parameters":[{"name":"alert_id","in":"path","required":true,"schema":{"type":"integer","title":"Alert Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/insurance/summary":{"get":{"tags":["insurance"],"summary":"Insurance Summary","description":"Dashboard summary: total certificates, compliance %, alerts.","operationId":"insurance_summary_v1_insurance_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsuranceSummary"}}}}}}},"/v1/insurance/requests":{"get":{"tags":["insurance"],"summary":"List Compliance Requests","description":"List all compliance requests.","operationId":"list_compliance_requests_v1_insurance_requests_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ComplianceRequestResponse"},"type":"array","title":"Response List Compliance Requests V1 Insurance Requests Get"}}}}}},"post":{"tags":["insurance"],"summary":"Create Compliance Request","description":"Send a compliance request to a subcontractor (triggers email).","operationId":"create_compliance_request_v1_insurance_requests_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceRequestCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/insurance/requests/{req_id}":{"get":{"tags":["insurance"],"summary":"Get Compliance Request","description":"Get a specific compliance request.","operationId":"get_compliance_request_v1_insurance_requests__req_id__get","parameters":[{"name":"req_id","in":"path","required":true,"schema":{"type":"integer","title":"Req Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/insurance/requests/{req_id}/remind":{"post":{"tags":["insurance"],"summary":"Send Reminder","description":"Send a reminder email for a compliance request.","operationId":"send_reminder_v1_insurance_requests__req_id__remind_post","parameters":[{"name":"req_id","in":"path","required":true,"schema":{"type":"integer","title":"Req Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/insurance/sub/profile/{profile_hash}":{"get":{"tags":["insurance"],"summary":"Sub Profile","description":"Public compliance profile page for a subcontractor.\n\nRate-limited to 30 req/min per IP to prevent brute-force hash enumeration.\nHashes are 32 hex chars (128 bits) for new certificates; legacy 16-char\nhashes continue to resolve via exact-match lookup against the stored value.","operationId":"sub_profile_v1_insurance_sub_profile__profile_hash__get","parameters":[{"name":"profile_hash","in":"path","required":true,"schema":{"type":"string","title":"Profile Hash"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/insurance/sub/{token}/upload":{"post":{"tags":["insurance"],"summary":"Sub Upload Pdf","description":"Upload an ACORD 25 certificate PDF (or image) for a compliance request.\n\nParses the document and returns extracted fields so the sub portal can\nauto-populate the form before final submission.  No auth required — access\nis controlled by the compliance request token.\n\nAccepted formats: PDF, PNG, JPG (max 10 MB).\nImages are converted to PDF server-side before parsing.","operationId":"sub_upload_pdf_v1_insurance_sub__token__upload_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_sub_upload_pdf_v1_insurance_sub__token__upload_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/insurance/sub/{token}":{"get":{"tags":["insurance"],"summary":"Sub Portal Page","description":"Render the sub compliance form (no login required).","operationId":"sub_portal_page_v1_insurance_sub__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["insurance"],"summary":"Sub Portal Submit","description":"Sub submits insurance data through the compliance portal.\n\nIf a PDF was previously uploaded for this token, the stored document is\nassociated with the new certificate and verification_level is set to\n\"parsed\". Otherwise the certificate starts as \"self_reported\".\n\nAfter the certificate is created, the full verification pipeline runs\nasynchronously (NAIC, FMCSA if DOT number provided, WC database checks).","operationId":"sub_portal_submit_v1_insurance_sub__token__post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubPortalSubmission"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/insurance/verify/wc/{state}/{employer}":{"get":{"tags":["insurance"],"summary":"Verify Wc","description":"Check Workers' Comp coverage in a state database.","operationId":"verify_wc_v1_insurance_verify_wc__state___employer__get","parameters":[{"name":"state","in":"path","required":true,"schema":{"type":"string","title":"State"}},{"name":"employer","in":"path","required":true,"schema":{"type":"string","title":"Employer"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WCVerifyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/insurance/verify/naic/{carrier_name}":{"get":{"tags":["insurance"],"summary":"Verify Naic","description":"Check a carrier in the NAIC database.","operationId":"verify_naic_v1_insurance_verify_naic__carrier_name__get","parameters":[{"name":"carrier_name","in":"path","required":true,"schema":{"type":"string","title":"Carrier Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NAICVerifyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/insurance/verify/fmcsa/{dot_number}":{"get":{"tags":["insurance"],"summary":"Verify Fmcsa","description":"Check motor carrier insurance via FMCSA API.","operationId":"verify_fmcsa_v1_insurance_verify_fmcsa__dot_number__get","parameters":[{"name":"dot_number","in":"path","required":true,"schema":{"type":"string","title":"Dot Number"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FMCSAVerifyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/insurance/verify/carrier/{carrier}/{policy}":{"get":{"tags":["insurance"],"summary":"Verify Carrier Portal","description":"Check carrier + policy in insurance reference database.","operationId":"verify_carrier_portal_v1_insurance_verify_carrier__carrier___policy__get","parameters":[{"name":"carrier","in":"path","required":true,"schema":{"type":"string","title":"Carrier"}},{"name":"policy","in":"path","required":true,"schema":{"type":"string","title":"Policy"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CarrierVerifyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/insurance/watchlist":{"get":{"tags":["insurance"],"summary":"List Insurance Watchlist","description":"List all monitored insurance entries for the org.","operationId":"list_insurance_watchlist_v1_insurance_watchlist_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/InsuranceWatchlistResponse"},"type":"array","title":"Response List Insurance Watchlist V1 Insurance Watchlist Get"}}}}}},"post":{"tags":["insurance"],"summary":"Add Insurance Watchlist","description":"Add an employer to the insurance watchlist for monitoring.","operationId":"add_insurance_watchlist_v1_insurance_watchlist_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsuranceWatchlistAdd"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsuranceWatchlistResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/insurance/watchlist/summary":{"get":{"tags":["insurance"],"summary":"Insurance Watchlist Summary","description":"Get summary counts for insurance watchlist.","operationId":"insurance_watchlist_summary_v1_insurance_watchlist_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsuranceWatchlistSummary"}}}}}}},"/v1/insurance/watchlist/{item_id}":{"patch":{"tags":["insurance"],"summary":"Update Insurance Watchlist","description":"Update settings for a monitored insurance entry.","operationId":"update_insurance_watchlist_v1_insurance_watchlist__item_id__patch","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"integer","title":"Item Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsuranceWatchlistUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsuranceWatchlistResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["insurance"],"summary":"Remove Insurance Watchlist","description":"Remove an entry from the insurance watchlist.","operationId":"remove_insurance_watchlist_v1_insurance_watchlist__item_id__delete","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"integer","title":"Item Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/insurance/admin/bulk-import/{source_name}":{"post":{"tags":["insurance"],"summary":"Admin Bulk Import","description":"Trigger a bulk insurance data import from a registered source.\n\nAdmin-only. Runs in background. Sources: wa_li, fmcsa.","operationId":"admin_bulk_import_v1_insurance_admin_bulk_import__source_name__post","parameters":[{"name":"source_name","in":"path","required":true,"schema":{"type":"string","title":"Source Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/insurance/admin/bulk-import":{"post":{"tags":["insurance"],"summary":"Admin Bulk Import All","description":"Trigger ALL registered bulk insurance data imports. Admin-only.","operationId":"admin_bulk_import_all_v1_insurance_admin_bulk_import_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/insurance/admin/bulk-import/status":{"get":{"tags":["insurance"],"summary":"Admin Bulk Import Status","description":"Get stats on bulk-imported insurance reference data. Admin-only.","operationId":"admin_bulk_import_status_v1_insurance_admin_bulk_import_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/insurance/admin/reference-search":{"get":{"tags":["insurance"],"summary":"Admin Reference Search","description":"Search bulk insurance reference data by employer name. Admin-only.","operationId":"admin_reference_search_v1_insurance_admin_reference_search_get","parameters":[{"name":"employer","in":"query","required":true,"schema":{"type":"string","minLength":2,"title":"Employer"}},{"name":"state","in":"query","required":false,"schema":{"type":"string","maxLength":2,"title":"State"}},{"name":"source","in":"query","required":false,"schema":{"type":"string","title":"Source"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/signup":{"post":{"summary":"Signup","description":"Create a new account with a personal organization.","operationId":"signup_v1_auth_signup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSignup"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/login":{"post":{"summary":"Login","description":"Log in and get a JWT token.","operationId":"login_v1_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserLogin"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/account/api-keys":{"get":{"summary":"List Keys","description":"List active API keys for the current organization. Keys are masked for security.","operationId":"list_keys_v1_account_api_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ApiKeyMaskedResponse"},"type":"array","title":"Response List Keys V1 Account Api Keys Get"}}}}}},"post":{"summary":"Create Key","description":"Create a new API key for the current organization.","operationId":"create_key_v1_account_api_keys_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/account/api-keys/{key_id}/reveal":{"post":{"summary":"Reveal Key","description":"API keys are stored as one-way SHA-256 hashes and cannot be recovered.\nThe full key is only shown once at creation time.","operationId":"reveal_key_v1_account_api_keys__key_id__reveal_post","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"integer","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/account/api-keys/{key_id}":{"delete":{"summary":"Revoke Key","description":"Revoke an API key.","operationId":"revoke_key_v1_account_api_keys__key_id__delete","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"integer","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/account/api-keys/{key_id}/scopes":{"patch":{"summary":"Update Key Scopes","description":"Update scopes on an existing API key. Requires admin/owner role.","operationId":"update_key_scopes_v1_account_api_keys__key_id__scopes_patch","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"integer","title":"Key Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyScopeUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/account/api-keys/{key_id}/ip-allowlist":{"get":{"summary":"List Key Ip Allowlist","description":"List key-level IP allowlist entries.","operationId":"list_key_ip_allowlist_v1_account_api_keys__key_id__ip_allowlist_get","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"integer","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/IpAllowlistEntryResponse"},"title":"Response List Key Ip Allowlist V1 Account Api Keys  Key Id  Ip Allowlist Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"summary":"Replace Key Ip Allowlist","description":"Replace the entire key-level IP allowlist.","operationId":"replace_key_ip_allowlist_v1_account_api_keys__key_id__ip_allowlist_put","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"integer","title":"Key Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IpAllowlistUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/IpAllowlistEntryResponse"},"title":"Response Replace Key Ip Allowlist V1 Account Api Keys  Key Id  Ip Allowlist Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/watchlist":{"post":{"summary":"Add To Watchlist","description":"Add a license to your organization's watchlist for continuous monitoring.","operationId":"add_to_watchlist_v1_watchlist_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatchlistAdd"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatchlistItemResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"List Watchlist","description":"List all licenses on your organization's watchlist, enriched with license details.","operationId":"list_watchlist_v1_watchlist_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Per Page"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/watchlist/bulk":{"post":{"summary":"Bulk Add To Watchlist","description":"Add multiple licenses to your organization's watchlist at once.","operationId":"bulk_add_to_watchlist_v1_watchlist_bulk_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatchlistBulkAdd"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WatchlistItemResponse"},"type":"array","title":"Response Bulk Add To Watchlist V1 Watchlist Bulk Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/watchlist/summary":{"get":{"summary":"Watchlist Summary","description":"Get a traffic-light summary of your watchlist: green/yellow/red counts.","operationId":"watchlist_summary_v1_watchlist_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatchlistSummary"}}}}}}},"/v1/watchlist/{item_id}":{"patch":{"summary":"Update Watchlist Item","description":"Update a watchlist item's label or alert settings.","operationId":"update_watchlist_item_v1_watchlist__item_id__patch","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"integer","title":"Item Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatchlistUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatchlistItemResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Remove From Watchlist","description":"Remove a license from your watchlist.","operationId":"remove_from_watchlist_v1_watchlist__item_id__delete","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"integer","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/licenses/{state}/{license_number}":{"get":{"summary":"Get License","description":"Look up a specific license by state and number.","operationId":"get_license_v1_licenses__state___license_number__get","parameters":[{"name":"state","in":"path","required":true,"schema":{"type":"string","title":"State"}},{"name":"license_number","in":"path","required":true,"schema":{"type":"string","title":"License Number"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/licenses/autocomplete":{"get":{"summary":"Autocomplete Licenses","description":"Fast typeahead search. Uses state+btree when state is provided\n(fast for short queries like 'a & g'), falls back to trigram index\nfor longer distinctive terms.","operationId":"autocomplete_licenses_v1_licenses_autocomplete_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":2,"description":"Search term","title":"Q"},"description":"Search term"},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":25,"minimum":1,"default":10,"title":"Limit"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/licenses":{"get":{"summary":"Search Licenses","description":"Search licenses with filters.\n\nEnhanced with smart business name matching:\n- Normalizes & vs AND, strips LLC/INC/CORP suffixes\n- Collapses spaced-out letters (H V A C -> HVAC)\n- Cross-state fallback when no results in specified state\n- Fuzzy suggestions when no exact match found","operationId":"search_licenses_v1_licenses_get","parameters":[{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"State code (e.g. CA, TX, FL). Empty = all states","title":"State"},"description":"State code (e.g. CA, TX, FL). Empty = all states"},{"name":"license_number","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Exact license number","title":"License Number"},"description":"Exact license number"},{"name":"business_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Partial business name match","title":"Business Name"},"description":"Partial business name match"},{"name":"city","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"City name","title":"City"},"description":"City name"},{"name":"classification","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"License classification code (e.g. B, C-10)","title":"Classification"},"description":"License classification code (e.g. B, C-10)"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"License status (e.g. CLEAR, Expired)","title":"Status"},"description":"License status (e.g. CLEAR, Expired)"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Per Page"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Search Licenses V1 Licenses Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/stats":{"get":{"summary":"Get Stats","description":"Get database statistics. Public endpoint, no API key required.\n\nReads from mv_scraper_coverage (refreshed by the scraper loaders) instead\nof aggregating the live licenses table — the live table is 4M+ rows and\na GROUP BY/COUNT was timing out under write load.","operationId":"get_stats_v1_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatsResponse"}}}}}}},"/v1/coverage/summary":{"get":{"summary":"Get Coverage Summary","description":"Per-state license record counts for the coverage map. Public, no auth.","operationId":"get_coverage_summary_v1_coverage_summary_get","parameters":[{"name":"refresh","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Refresh"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/coverage":{"get":{"summary":"Get Coverage","description":"List all supported states for license and WC lookups.","operationId":"get_coverage_v1_coverage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoverageStateResponse"}}}}}}}},"components":{"schemas":{"ApiKeyCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scopes"}},"additionalProperties":false,"type":"object","required":["name"],"title":"ApiKeyCreate"},"ApiKeyMaskedResponse":{"properties":{"id":{"type":"integer","title":"Id"},"key_preview":{"type":"string","title":"Key Preview"},"name":{"type":"string","title":"Name"},"tier":{"type":"string","title":"Tier"},"monthly_limit":{"type":"integer","title":"Monthly Limit"},"requests_this_month":{"type":"integer","title":"Requests This Month"},"is_active":{"type":"boolean","title":"Is Active"},"scopes":{"type":"string","title":"Scopes","default":"*"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","key_preview","name","tier","monthly_limit","requests_this_month","is_active","created_at"],"title":"ApiKeyMaskedResponse","description":"API key response with masked key value for list views."},"ApiKeyResponse":{"properties":{"id":{"type":"integer","title":"Id"},"key":{"type":"string","title":"Key"},"name":{"type":"string","title":"Name"},"tier":{"type":"string","title":"Tier"},"monthly_limit":{"type":"integer","title":"Monthly Limit"},"requests_this_month":{"type":"integer","title":"Requests This Month"},"is_active":{"type":"boolean","title":"Is Active"},"scopes":{"type":"string","title":"Scopes","default":"*"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","key","name","tier","monthly_limit","requests_this_month","is_active","created_at"],"title":"ApiKeyResponse"},"ApiKeyScopeUpdate":{"properties":{"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"}},"type":"object","required":["scopes"],"title":"ApiKeyScopeUpdate","description":"Update scopes on an existing API key."},"Body_sub_upload_pdf_v1_insurance_sub__token__upload_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_sub_upload_pdf_v1_insurance_sub__token__upload_post"},"CarrierVerifyResponse":{"properties":{"carrier":{"type":"string","title":"Carrier"},"policy_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Policy Number"},"found":{"type":"boolean","title":"Found"},"coverage_data":{"type":"object","title":"Coverage Data","default":{}},"source":{"type":"string","title":"Source","default":""}},"type":"object","required":["carrier","found"],"title":"CarrierVerifyResponse"},"ComplianceRequestCreate":{"properties":{"watchlist_item_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Watchlist Item Id"},"requirement_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Requirement Id"},"sub_email":{"type":"string","format":"email","title":"Sub Email"},"sub_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Sub Name"}},"additionalProperties":false,"type":"object","required":["sub_email"],"title":"ComplianceRequestCreate"},"ComplianceRequestResponse":{"properties":{"id":{"type":"integer","title":"Id"},"user_id":{"type":"integer","title":"User Id"},"watchlist_item_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Watchlist Item Id"},"requirement_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Requirement Id"},"sub_email":{"type":"string","title":"Sub Email"},"sub_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sub Name"},"token":{"type":"string","title":"Token"},"status":{"type":"string","title":"Status"},"sent_at":{"type":"string","format":"date-time","title":"Sent At"},"submitted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Submitted At"},"reminder_count":{"type":"integer","title":"Reminder Count","default":0}},"type":"object","required":["id","user_id","sub_email","token","status","sent_at"],"title":"ComplianceRequestResponse"},"CoverageRequirementCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"require_gl":{"type":"boolean","title":"Require Gl","default":true},"min_gl_occurrence":{"type":"integer","title":"Min Gl Occurrence","default":1000000},"min_gl_aggregate":{"type":"integer","title":"Min Gl Aggregate","default":2000000},"require_auto":{"type":"boolean","title":"Require Auto","default":true},"min_auto_combined":{"type":"integer","title":"Min Auto Combined","default":1000000},"require_umbrella":{"type":"boolean","title":"Require Umbrella","default":false},"min_umbrella_occurrence":{"type":"integer","title":"Min Umbrella Occurrence","default":0},"require_wc":{"type":"boolean","title":"Require Wc","default":true},"require_additional_insured":{"type":"boolean","title":"Require Additional Insured","default":true},"require_subrogation_waiver":{"type":"boolean","title":"Require Subrogation Waiver","default":false},"expiry_warning_days":{"type":"integer","title":"Expiry Warning Days","default":30}},"additionalProperties":false,"type":"object","required":["name"],"title":"CoverageRequirementCreate"},"CoverageRequirementResponse":{"properties":{"id":{"type":"integer","title":"Id"},"user_id":{"type":"integer","title":"User Id"},"name":{"type":"string","title":"Name"},"require_gl":{"type":"boolean","title":"Require Gl"},"min_gl_occurrence":{"type":"integer","title":"Min Gl Occurrence"},"min_gl_aggregate":{"type":"integer","title":"Min Gl Aggregate"},"require_auto":{"type":"boolean","title":"Require Auto"},"min_auto_combined":{"type":"integer","title":"Min Auto Combined"},"require_umbrella":{"type":"boolean","title":"Require Umbrella"},"min_umbrella_occurrence":{"type":"integer","title":"Min Umbrella Occurrence"},"require_wc":{"type":"boolean","title":"Require Wc"},"require_additional_insured":{"type":"boolean","title":"Require Additional Insured"},"require_subrogation_waiver":{"type":"boolean","title":"Require Subrogation Waiver"},"expiry_warning_days":{"type":"integer","title":"Expiry Warning Days"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","user_id","name","require_gl","min_gl_occurrence","min_gl_aggregate","require_auto","min_auto_combined","require_umbrella","min_umbrella_occurrence","require_wc","require_additional_insured","require_subrogation_waiver","expiry_warning_days","created_at"],"title":"CoverageRequirementResponse"},"CoverageRequirementUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Name"},"require_gl":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Require Gl"},"min_gl_occurrence":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Gl Occurrence"},"min_gl_aggregate":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Gl Aggregate"},"require_auto":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Require Auto"},"min_auto_combined":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Auto Combined"},"require_umbrella":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Require Umbrella"},"min_umbrella_occurrence":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Umbrella Occurrence"},"require_wc":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Require Wc"},"require_additional_insured":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Require Additional Insured"},"require_subrogation_waiver":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Require Subrogation Waiver"},"expiry_warning_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expiry Warning Days"}},"additionalProperties":false,"type":"object","title":"CoverageRequirementUpdate"},"CoverageStateResponse":{"properties":{"license_states":{"items":{"type":"string"},"type":"array","title":"License States"},"wc_states":{"items":{"type":"string"},"type":"array","title":"Wc States"},"total_license_states":{"type":"integer","title":"Total License States"},"total_wc_states":{"type":"integer","title":"Total Wc States"}},"type":"object","required":["license_states","wc_states","total_license_states","total_wc_states"],"title":"CoverageStateResponse","description":"Response for /v1/coverage endpoint."},"FMCSAVerifyResponse":{"properties":{"dot_number":{"type":"string","title":"Dot Number"},"carrier_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier Name"},"found":{"type":"boolean","title":"Found"},"insurance_filings":{"items":{"type":"object"},"type":"array","title":"Insurance Filings","default":[]},"source":{"type":"string","title":"Source","default":"FMCSA"}},"type":"object","required":["dot_number","found"],"title":"FMCSAVerifyResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"InsuranceAlertResponse":{"properties":{"id":{"type":"integer","title":"Id"},"certificate_id":{"type":"integer","title":"Certificate Id"},"user_id":{"type":"integer","title":"User Id"},"alert_type":{"type":"string","title":"Alert Type"},"severity":{"type":"string","title":"Severity"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"resolved":{"type":"boolean","title":"Resolved","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","certificate_id","user_id","alert_type","severity","created_at"],"title":"InsuranceAlertResponse"},"InsuranceCertificateCreate":{"properties":{"watchlist_item_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Watchlist Item Id"},"insured_name":{"type":"string","maxLength":255,"title":"Insured Name"},"certificate_holder":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Certificate Holder"},"additional_insured":{"type":"boolean","title":"Additional Insured","default":false},"subrogation_waiver":{"type":"boolean","title":"Subrogation Waiver","default":false},"coverages":{"items":{"$ref":"#/components/schemas/InsuranceCoverageCreate"},"type":"array","title":"Coverages","default":[]}},"additionalProperties":false,"type":"object","required":["insured_name"],"title":"InsuranceCertificateCreate"},"InsuranceCertificateResponse":{"properties":{"id":{"type":"integer","title":"Id"},"user_id":{"type":"integer","title":"User Id"},"watchlist_item_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Watchlist Item Id"},"insured_name":{"type":"string","title":"Insured Name"},"certificate_holder":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Certificate Holder"},"additional_insured":{"type":"boolean","title":"Additional Insured","default":false},"subrogation_waiver":{"type":"boolean","title":"Subrogation Waiver","default":false},"compliance_status":{"type":"string","title":"Compliance Status","default":"pending"},"verification_level":{"type":"string","title":"Verification Level","default":"self_reported"},"profile_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Hash"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"verified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Verified At"},"coverages":{"items":{"$ref":"#/components/schemas/InsuranceCoverageResponse"},"type":"array","title":"Coverages","default":[]},"last_checked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Checked At"},"parse_confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Parse Confidence"},"has_document":{"type":"boolean","title":"Has Document","default":false},"document_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Path"}},"type":"object","required":["id","user_id","insured_name","created_at"],"title":"InsuranceCertificateResponse"},"InsuranceCertificateUpdate":{"properties":{"insured_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Insured Name"},"certificate_holder":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Certificate Holder"},"additional_insured":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Additional Insured"},"subrogation_waiver":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Subrogation Waiver"},"coverages":{"anyOf":[{"items":{"$ref":"#/components/schemas/InsuranceCoverageCreate"},"type":"array"},{"type":"null"}],"title":"Coverages"}},"additionalProperties":false,"type":"object","title":"InsuranceCertificateUpdate"},"InsuranceSummary":{"properties":{"total_certificates":{"type":"integer","title":"Total Certificates"},"compliant":{"type":"integer","title":"Compliant"},"non_compliant":{"type":"integer","title":"Non Compliant"},"pending":{"type":"integer","title":"Pending"},"active_alerts":{"type":"integer","title":"Active Alerts"},"expiring_soon":{"type":"integer","title":"Expiring Soon"}},"type":"object","required":["total_certificates","compliant","non_compliant","pending","active_alerts","expiring_soon"],"title":"InsuranceSummary"},"InsuranceWatchlistAdd":{"properties":{"employer_name":{"type":"string","maxLength":300,"minLength":1,"title":"Employer Name"},"state":{"type":"string","maxLength":2,"minLength":2,"title":"State"},"coverage_type":{"type":"string","maxLength":20,"title":"Coverage Type","default":"WC"},"label":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Label"}},"additionalProperties":false,"type":"object","required":["employer_name","state"],"title":"InsuranceWatchlistAdd"},"InsuranceWatchlistResponse":{"properties":{"id":{"type":"integer","title":"Id"},"employer_name":{"type":"string","title":"Employer Name"},"state":{"type":"string","title":"State"},"coverage_type":{"type":"string","title":"Coverage Type"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"alert_on_expiry":{"type":"boolean","title":"Alert On Expiry","default":true},"alert_on_coverage_change":{"type":"boolean","title":"Alert On Coverage Change","default":true},"last_known_carrier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Known Carrier"},"last_known_policy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Known Policy"},"last_known_expiration":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Known Expiration"},"last_known_coverage_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Known Coverage Amount"},"last_checked":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Checked"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"current_carrier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Carrier"},"current_policy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Policy"},"current_expiration":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Expiration"},"current_coverage_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Current Coverage Amount"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","required":["id","employer_name","state","coverage_type"],"title":"InsuranceWatchlistResponse"},"InsuranceWatchlistSummary":{"properties":{"total":{"type":"integer","title":"Total","default":0},"active_coverage":{"type":"integer","title":"Active Coverage","default":0},"expiring_soon":{"type":"integer","title":"Expiring Soon","default":0},"alerts":{"type":"integer","title":"Alerts","default":0}},"type":"object","title":"InsuranceWatchlistSummary"},"InsuranceWatchlistUpdate":{"properties":{"label":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Label"},"alert_on_expiry":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Alert On Expiry"},"alert_on_coverage_change":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Alert On Coverage Change"}},"additionalProperties":false,"type":"object","title":"InsuranceWatchlistUpdate"},"IpAllowlistEntryResponse":{"properties":{"id":{"type":"integer","title":"Id"},"org_id":{"type":"integer","title":"Org Id"},"api_key_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Api Key Id"},"cidr":{"type":"string","title":"Cidr"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"created_by":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","org_id","cidr","created_at"],"title":"IpAllowlistEntryResponse"},"IpAllowlistUpdateRequest":{"properties":{"entries":{"items":{"$ref":"#/components/schemas/IpAllowlistEntryCreate"},"type":"array","title":"Entries"}},"type":"object","required":["entries"],"title":"IpAllowlistUpdateRequest","description":"Replace the entire allowlist (org-level or key-level)."},"LicenseResponse":{"properties":{"license_number":{"type":"string","title":"License Number"},"state":{"type":"string","title":"State"},"business_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Name"},"dba_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dba Name"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"license_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"License Type"},"classifications":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Classifications"},"issue_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Issue Date"},"expiration_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expiration Date"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State Code"},"zip_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zip Code"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"},"bond_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bond Amount"},"workers_comp":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Workers Comp"},"has_disciplinary_action":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Disciplinary Action"},"last_updated":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Updated"}},"type":"object","required":["license_number","state"],"title":"LicenseResponse"},"NAICVerifyResponse":{"properties":{"carrier_name":{"type":"string","title":"Carrier Name"},"naic_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Naic Number"},"found":{"type":"boolean","title":"Found"},"licensed_states":{"items":{"type":"string"},"type":"array","title":"Licensed States","default":[]},"financial_rating":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Financial Rating"},"total_records":{"type":"integer","title":"Total Records","default":0},"source":{"type":"string","title":"Source","default":"NAIC"}},"type":"object","required":["carrier_name","found"],"title":"NAICVerifyResponse"},"PaginatedResponse":{"properties":{"items":{"items":{},"type":"array","title":"Items","default":[]},"total":{"type":"integer","title":"Total","default":0},"page":{"type":"integer","title":"Page","default":1},"per_page":{"type":"integer","title":"Per Page","default":50},"pages":{"type":"integer","title":"Pages","default":0}},"type":"object","title":"PaginatedResponse","description":"Generic paginated response wrapper."},"StatsResponse":{"properties":{"total_licenses":{"type":"integer","title":"Total Licenses"},"states_covered":{"items":{"type":"string"},"type":"array","title":"States Covered"},"last_data_update":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Data Update"}},"type":"object","required":["total_licenses","states_covered"],"title":"StatsResponse"},"SubPortalSubmission":{"properties":{"insured_name":{"type":"string","maxLength":255,"title":"Insured Name"},"certificate_holder":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Certificate Holder"},"additional_insured":{"type":"boolean","title":"Additional Insured","default":false},"subrogation_waiver":{"type":"boolean","title":"Subrogation Waiver","default":false},"coverages":{"items":{"$ref":"#/components/schemas/InsuranceCoverageCreate"},"type":"array","title":"Coverages","default":[]},"dot_number":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Dot Number"}},"additionalProperties":false,"type":"object","required":["insured_name"],"title":"SubPortalSubmission","description":"Data submitted by a sub through the compliance portal."},"TokenResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"user":{"$ref":"#/components/schemas/UserResponse"},"org":{"anyOf":[{"$ref":"#/components/schemas/OrgResponse"},{"type":"null"}]},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"domain_match":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Domain Match"}},"type":"object","required":["access_token","user"],"title":"TokenResponse"},"UserLogin":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":128,"title":"Password"}},"additionalProperties":false,"type":"object","required":["email","password"],"title":"UserLogin"},"UserSignup":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":128,"minLength":8,"title":"Password"},"name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Name"},"company":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Company"},"invitation_token":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Invitation Token"},"referral_code":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Referral Code"},"tos_accepted":{"type":"boolean","title":"Tos Accepted","default":false}},"additionalProperties":false,"type":"object","required":["email","password"],"title":"UserSignup"},"WCVerifyResponse":{"properties":{"employer":{"type":"string","title":"Employer"},"state":{"type":"string","title":"State"},"covered":{"type":"boolean","title":"Covered"},"carrier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier"},"policy_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Policy Number"},"effective_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Effective Date"},"expiration_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expiration Date"},"coverage_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Coverage Amount"},"source":{"type":"string","title":"Source","default":""}},"type":"object","required":["employer","state","covered"],"title":"WCVerifyResponse"},"WatchlistAdd":{"properties":{"license_number":{"type":"string","maxLength":50,"title":"License Number"},"state":{"type":"string","maxLength":2,"title":"State"},"label":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Label"},"subcontractor_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Subcontractor Name"}},"additionalProperties":false,"type":"object","required":["license_number","state"],"title":"WatchlistAdd"},"WatchlistBulkAdd":{"properties":{"items":{"items":{"$ref":"#/components/schemas/WatchlistAdd"},"type":"array","maxItems":500,"title":"Items"}},"additionalProperties":false,"type":"object","required":["items"],"title":"WatchlistBulkAdd"},"WatchlistItemResponse":{"properties":{"id":{"type":"integer","title":"Id"},"license_number":{"type":"string","title":"License Number"},"state":{"type":"string","title":"State"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"subcontractor_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subcontractor Name"},"alert_on_status_change":{"type":"boolean","title":"Alert On Status Change"},"alert_on_expiry":{"type":"boolean","title":"Alert On Expiry"},"last_known_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Known Status"},"last_checked":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Checked"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"business_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Name"},"dba_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dba Name"},"license_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"License Type"},"classifications":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Classifications"},"expiration_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expiration Date"},"issue_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Issue Date"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"zip_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zip Code"},"workers_comp":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Workers Comp"},"has_disciplinary_action":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Disciplinary Action"},"last_updated":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Updated"}},"type":"object","required":["id","license_number","state","alert_on_status_change","alert_on_expiry","created_at"],"title":"WatchlistItemResponse"},"WatchlistSummary":{"properties":{"total":{"type":"integer","title":"Total"},"green":{"type":"integer","title":"Green"},"yellow":{"type":"integer","title":"Yellow"},"red":{"type":"integer","title":"Red"}},"type":"object","required":["total","green","yellow","red"],"title":"WatchlistSummary"},"WatchlistUpdate":{"properties":{"label":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Label"},"subcontractor_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Subcontractor Name"},"alert_on_status_change":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Alert On Status Change"},"alert_on_expiry":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Alert On Expiry"}},"additionalProperties":false,"type":"object","title":"WatchlistUpdate"},"WebhookCreate":{"properties":{"url":{"type":"string","title":"Url"},"events":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Events"}},"type":"object","required":["url"],"title":"WebhookCreate"},"WebhookResponse":{"properties":{"id":{"type":"integer","title":"Id"},"url":{"type":"string","title":"Url"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret"},"events":{"type":"string","title":"Events"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","url","events","is_active","created_at"],"title":"WebhookResponse"},"WebhookResponseMasked":{"properties":{"id":{"type":"integer","title":"Id"},"url":{"type":"string","title":"Url"},"secret":{"type":"string","title":"Secret","default":"****"},"events":{"type":"string","title":"Events"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","url","events","is_active","created_at"],"title":"WebhookResponseMasked","description":"Webhook response with secret masked — used for list/get endpoints."}}},"tags":[{"name":"Auth","description":"Create accounts, log in, and manage authentication tokens."},{"name":"Licenses","description":"Look up and search contractor licenses by state and number."},{"name":"Verification","description":"Batch-lookup multiple licenses in a single request."},{"name":"Watchlist","description":"Monitor licenses for status changes and expiration warnings."},{"name":"Insurance","description":"Manage insurance certificates and coverage compliance."},{"name":"Compliance","description":"Send compliance requests and check subcontractor insurance."},{"name":"Webhooks","description":"Subscribe to real-time notifications for license events."},{"name":"Billing","description":"Manage subscriptions and billing (Stripe integration)."},{"name":"Stats","description":"Public statistics about data coverage and freshness."}],"servers":[{"url":"https://api.tradeproof.net","description":"Production"}]}