{"openapi":"3.1.0","info":{"title":"StateLicense API","description":"\nContractor license verification API for onboarding and compliance.\n\n## Authentication\n\nCreate a Free account in the [StateLicense console](https://app.statelicense.io/sign-up/?redirect_url=%2F%3Ftab%3Dapi-key), then send the generated key as `Authorization: Bearer YOUR_API_KEY`.\n\n## Production endpoints\n\nUse `GET /v1/verify` for an exact state and license-number check, or `POST /v1/search` for business-name discovery and supported filters. Both return normalized public licensing records with source authority and freshness fields when available.\n\n## Coverage and limits\n\nProduction coverage currently includes 19 jurisdictions: `AK`, `AR`, `AZ`, `CA`, `CO`, `CT`, `DE`, `FL`, `IA`, `IL`, `MN`, `NJ`, `NY`, `OH`, `OR`, `TN`, `TX`, `VA`, `WA`. The list is generated from the same loaded records as `GET /v1/states` and the console State dropdowns.\n\nJurisdiction inclusion does not mean every authority, trade, or historical credential is covered. Inspect each record's authority, credential kind, jurisdiction scope, and source freshness, and consult the coverage guide below. Registrations and business licenses are distinct from trade licenses. Records are source snapshots, not live authority checks.\n\nArkansas, Arizona, Alaska, and Tennessee use manual snapshot imports. Arkansas does not report current status; Arizona is active-only; Iowa registrations are not trade licenses; Tennessee excludes Home Improvement, LLE, and LLP credentials. New York includes NYC DCWP and DOB credentials and a separate statewide public-work contractor registry, not a statewide general-contractor license. Oregon coverage is limited to active CCB license endorsements. Free accounts include 25 authenticated dashboard or API requests per UTC month; Pro includes 1,000 for $49/month.\n\n[Get an API key](https://app.statelicense.io/sign-up/?redirect_url=%2F%3Ftab%3Dapi-key) · [Coverage and methodology](https://statelicense.io/coverage/) · [Pricing](https://statelicense.io/contractor-license-verification-api/#pricing)\n","version":"0.1.0"},"paths":{"/v1/verify":{"get":{"tags":["verify"],"summary":"Verify License","description":"Verify a contractor license by state and license number.\n\nSend a two-letter supported state code and the authority's license number.\nFor Texas, a TX prefix followed by digits is accepted as a fallback when\nthe original number does not match (for example, TX146253 matches 146253).\nThe response marks the record valid when at least one matching license is\nactive and includes normalized source data. Authenticate with\n`Authorization: Bearer YOUR_API_KEY` for account-based usage.","operationId":"verify_license_v1_verify_get","parameters":[{"name":"state","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":2,"title":"State"}},{"name":"license_number","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"title":"License Number"}},{"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/VerifyResponse"},"examples":{"active":{"value":{"valid":true,"license":{"state":"CA","license_number":"EXAMPLE","business_name":"Example Contractor","status":"active"},"matches":[{"state":"CA","license_number":"EXAMPLE","business_name":"Example Contractor","status":"active"}]}},"unknown":{"value":{"valid":false,"license":{"state":"CA","license_number":"EXAMPLE","business_name":"Example Contractor","status":"unknown"},"matches":[{"state":"CA","license_number":"EXAMPLE","business_name":"Example Contractor","status":"unknown"}]}},"multiple":{"value":{"valid":true,"license":null,"matches":[{"state":"CA","license_number":"EXAMPLE","business_name":"Example Contractor","status":"active"},{"state":"CA","license_number":"EXAMPLE","business_name":"Example Contractor","status":"active","license_type":"Another credential"}]}}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Invalid, revoked, or expired Bearer credential","content":{"application/json":{"schema":{"type":"object"},"example":{"detail":"Invalid or revoked API key"}}}},"429":{"description":"Rate limit or request allowance exhausted. Quota exhaustion includes Retry-After seconds and usage in detail; rate-limit responses have a separate error body.","content":{"application/json":{"schema":{"type":"object"},"example":{"error":"Rate limit exceeded: configured request rate"}}},"headers":{"Retry-After":{"description":"Seconds until quota reset; returned for quota exhaustion","schema":{"type":"string"}}}},"503":{"description":"Session authentication is unavailable","content":{"application/json":{"schema":{"type":"object"},"example":{"detail":"Account authentication is temporarily unavailable"}}}},"404":{"description":"No matching record in the loaded datasets; not proof the credential does not exist","content":{"application/json":{"schema":{"type":"object"},"example":{"detail":"License not found"}}}}},"security":[{},{"BearerAuth":[]}]}},"/v1/search":{"post":{"tags":["search"],"summary":"Search Licenses","description":"Search normalized contractor records.\n\nFilter by business name, state, classification, license type, status, city,\nor ZIP code. Use `page` and `page_size` for pagination. The default page\nsize is 20 records; the maximum page size is 100 records. Authenticated\nrequests accept `Authorization: Bearer YOUR_API_KEY` and count toward the\naccount's monthly allowance.","operationId":"search_licenses_v1_search_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchRequest"},"example":{"state":"CA","business_name":"Example","classification":"C-10","page":1,"page_size":20}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Invalid, revoked, or expired Bearer credential","content":{"application/json":{"schema":{"type":"object"},"example":{"detail":"Invalid or revoked API key"}}}},"429":{"description":"Rate limit or request allowance exhausted. Quota exhaustion includes Retry-After seconds and usage in detail; rate-limit responses have a separate error body.","content":{"application/json":{"schema":{"type":"object"},"example":{"error":"Rate limit exceeded: configured request rate"}}},"headers":{"Retry-After":{"description":"Seconds until quota reset; returned for quota exhaustion","schema":{"type":"string"}}}},"503":{"description":"Session authentication is unavailable","content":{"application/json":{"schema":{"type":"object"},"example":{"detail":"Account authentication is temporarily unavailable"}}}}},"security":[{},{"BearerAuth":[]}]}},"/v1/states":{"get":{"tags":["meta"],"summary":"List States","description":"List all states that have license data loaded.","operationId":"list_states_v1_states_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatesResponse"}}}}}}},"/v1/types":{"get":{"tags":["meta"],"summary":"List Types","description":"List license classifications, optionally filtered by state.","operationId":"list_types_v1_types_get","parameters":[{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":2},{"type":"null"}],"title":"State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/license-types":{"get":{"tags":["meta"],"summary":"List License Types","description":"List license types, optionally filtered by state.","operationId":"list_license_types_v1_license_types_get","parameters":[{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":2},{"type":"null"}],"title":"State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseTypesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/account/usage":{"get":{"tags":["account"],"summary":"Get Account Usage","operationId":"get_account_usage_v1_account_usage_get","parameters":[{"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/RequestUsage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, or expired portal session"},"403":{"description":"API keys cannot access session-only portal operations"},"503":{"description":"Session authentication is unavailable"}},"security":[{"ClerkSession":[]}],"description":"\nPortal management operations require a signed-in Clerk session; API keys are rejected with HTTP 403."}},"/v1/account/api-key":{"get":{"tags":["account"],"summary":"Get Api Key","description":"Return API-key metadata for the signed-in console account.\nPortal management operations require a signed-in Clerk session; API keys are rejected with HTTP 403.","operationId":"get_api_key_v1_account_api_key_get","parameters":[{"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/ApiKeyStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, or expired portal session"},"403":{"description":"API keys cannot access session-only portal operations"},"503":{"description":"Session authentication is unavailable"}},"security":[{"ClerkSession":[]}]},"post":{"tags":["account"],"summary":"Create Api Key","description":"Create an API key for the signed-in account; the full key is returned once.\nPortal management operations require a signed-in Clerk session; API keys are rejected with HTTP 403.","operationId":"create_api_key_v1_account_api_key_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeySecretResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, or expired portal session"},"403":{"description":"API keys cannot access session-only portal operations"},"503":{"description":"Session authentication is unavailable"}},"security":[{"ClerkSession":[]}]},"delete":{"tags":["account"],"summary":"Revoke Api Key","description":"Revoke the signed-in account's active API key.\nPortal management operations require a signed-in Clerk session; API keys are rejected with HTTP 403.","operationId":"revoke_api_key_v1_account_api_key_delete","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, or expired portal session"},"403":{"description":"API keys cannot access session-only portal operations"},"503":{"description":"Session authentication is unavailable"}},"security":[{"ClerkSession":[]}]}},"/v1/account/api-key/regenerate":{"post":{"tags":["account"],"summary":"Regenerate Api Key","description":"Replace the active API key; the previous key stops working immediately.\nPortal management operations require a signed-in Clerk session; API keys are rejected with HTTP 403.","operationId":"regenerate_api_key_v1_account_api_key_regenerate_post","parameters":[{"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/ApiKeySecretResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, or expired portal session"},"403":{"description":"API keys cannot access session-only portal operations"},"503":{"description":"Session authentication is unavailable"}},"security":[{"ClerkSession":[]}]}},"/v1/monitors/sources":{"get":{"tags":["monitoring"],"summary":"Sources","operationId":"sources_v1_monitors_sources_get","parameters":[{"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/monitors/usage":{"get":{"tags":["monitoring"],"summary":"Usage","operationId":"usage_v1_monitors_usage_get","parameters":[{"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/monitors/test-email":{"post":{"tags":["monitoring"],"summary":"Test Email","operationId":"test_email_v1_monitors_test_email_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/monitors":{"post":{"tags":["monitoring"],"summary":"Create","operationId":"create_v1_monitors_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMonitor"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["monitoring"],"summary":"Listing","operationId":"listing_v1_monitors_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"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/monitors/bulk":{"post":{"tags":["monitoring"],"summary":"Bulk","operationId":"bulk_v1_monitors_bulk_post","parameters":[{"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/monitors/{id}":{"get":{"tags":["monitoring"],"summary":"Detail","operationId":"detail_v1_monitors__id__get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}},{"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"}}}}}},"patch":{"tags":["monitoring"],"summary":"Update","operationId":"update_v1_monitors__id__patch","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMonitor"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["monitoring"],"summary":"Delete","operationId":"delete_v1_monitors__id__delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/monitors/{id}/events":{"get":{"tags":["monitoring"],"summary":"Events","operationId":"events_v1_monitors__id__events_get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"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/webhook-subscriptions":{"post":{"tags":["monitoring"],"summary":"Subscription","operationId":"subscription_v1_webhook_subscriptions_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Destination"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["monitoring"],"summary":"Subscriptions","operationId":"subscriptions_v1_webhook_subscriptions_get","parameters":[{"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/webhook-subscriptions/{id}":{"delete":{"tags":["monitoring"],"summary":"Remove Subscription","operationId":"remove_subscription_v1_webhook_subscriptions__id__delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["monitoring"],"summary":"Change Destination","operationId":"change_destination_v1_webhook_subscriptions__id__patch","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Destination"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhook-deliveries":{"get":{"tags":["monitoring"],"summary":"Deliveries","operationId":"deliveries_v1_webhook_deliveries_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"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/webhook-deliveries/{id}/redeliver":{"post":{"tags":["monitoring"],"summary":"Redeliver","operationId":"redeliver_v1_webhook_deliveries__id__redeliver_post","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}},{"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/account/monitoring/billing":{"get":{"tags":["monitoring"],"summary":"Billing Status","operationId":"billing_status_v1_account_monitoring_billing_get","parameters":[{"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"}}}},"401":{"description":"Missing, invalid, or expired portal session"},"403":{"description":"API keys cannot access session-only portal operations"},"503":{"description":"Session authentication is unavailable"}},"security":[{"ClerkSession":[]}],"description":"\nPortal management operations require a signed-in Clerk session; API keys are rejected with HTTP 403."}},"/v1/account/monitoring/portal":{"post":{"tags":["monitoring"],"summary":"Portal","operationId":"portal_v1_account_monitoring_portal_post","parameters":[{"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"}}}},"401":{"description":"Missing, invalid, or expired portal session"},"403":{"description":"API keys cannot access session-only portal operations"},"503":{"description":"Session authentication is unavailable"}},"security":[{"ClerkSession":[]}],"description":"\nPortal management operations require a signed-in Clerk session; API keys are rejected with HTTP 403."}},"/v1/webhook-subscriptions/{id}/rotate-secret":{"post":{"tags":["monitoring"],"summary":"Rotate","operationId":"rotate_v1_webhook_subscriptions__id__rotate_secret_post","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}},{"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/webhook-subscriptions/{id}/test":{"post":{"tags":["monitoring"],"summary":"Test Destination","operationId":"test_destination_v1_webhook_subscriptions__id__test_post","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}},{"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/monitoring-capabilities":{"get":{"tags":["monitoring"],"summary":"Public Capabilities","operationId":"public_capabilities_v1_monitoring_capabilities_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/saved-contractors":{"post":{"tags":["monitoring"],"summary":"Save Contractor","operationId":"save_contractor_v1_saved_contractors_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMonitor"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["monitoring"],"summary":"Saved Contractors","operationId":"saved_contractors_v1_saved_contractors_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"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/saved-contractors/{id}":{"get":{"tags":["monitoring"],"summary":"Saved Contractor","operationId":"saved_contractor_v1_saved_contractors__id__get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}},{"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"}}}}}},"delete":{"tags":["monitoring"],"summary":"Remove Saved Contractor","operationId":"remove_saved_contractor_v1_saved_contractors__id__delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ApiKeyMetadata":{"properties":{"key_hint":{"type":"string","title":"Key Hint"},"status":{"type":"string","enum":["active","revoked"],"title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"rotated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Rotated At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"}},"type":"object","required":["key_hint","status","created_at"],"title":"ApiKeyMetadata"},"ApiKeySecretResponse":{"properties":{"key":{"type":"string","title":"Key"},"api_key":{"$ref":"#/components/schemas/ApiKeyMetadata"}},"type":"object","required":["key","api_key"],"title":"ApiKeySecretResponse"},"ApiKeyStatusResponse":{"properties":{"api_key":{"anyOf":[{"$ref":"#/components/schemas/ApiKeyMetadata"},{"type":"null"}]}},"type":"object","title":"ApiKeyStatusResponse"},"CreateMonitor":{"properties":{"state":{"type":"string","maxLength":2,"minLength":2,"title":"State"},"license_number":{"type":"string","maxLength":100,"minLength":1,"title":"License Number"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"dataset":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dataset"},"source_record_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Record Id"},"label":{"type":"string","maxLength":500,"title":"Label","default":""}},"type":"object","required":["state","license_number"],"title":"CreateMonitor"},"Destination":{"properties":{"url":{"type":"string","maxLength":2048,"title":"Url"}},"type":"object","required":["url"],"title":"Destination"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"LicenseDetail":{"properties":{"state":{"type":"string","title":"State"},"license_number":{"type":"string","title":"License Number"},"business_name":{"type":"string","title":"Business Name"},"doing_business_as":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Doing Business As"},"licensee_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Licensee Name"},"license_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"License Type"},"license_type_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"License Type Code"},"credential_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Credential Kind"},"authority":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authority"},"jurisdiction_scope":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jurisdiction Scope"},"source_updated_at":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Source Updated At","description":"UTC date StateLicense downloaded the dataset snapshot used for this record. Not the authority's publication date or a live verification time; null when the historical download date is unverified."},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"dataset":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dataset"},"source_record_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Record Id"},"status":{"type":"string","title":"Status"},"scope_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope Description"},"project_limit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Limit"},"classifications":{"items":{"type":"string"},"type":"array","title":"Classifications","default":[]},"issue_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Issue Date"},"expiration_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Expiration Date"},"suspension_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Suspension Date"},"last_updated":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Last Updated"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"mailing_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mailing State"},"zip_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zip Code"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"has_workers_comp":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Workers Comp"},"workers_comp_coverage_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workers Comp Coverage Type"},"bond_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bond Amount"},"bond_effective_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Bond Effective Date"},"bond_cancelled_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Bond Cancelled Date"},"has_disclosure":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Disclosure"},"raw_status_codes":{"items":{"type":"string"},"type":"array","title":"Raw Status Codes","default":[]}},"type":"object","required":["state","license_number","business_name","status"],"title":"LicenseDetail"},"LicenseTypesResponse":{"properties":{"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"license_types":{"items":{"type":"string"},"type":"array","title":"License Types"}},"type":"object","required":["license_types"],"title":"LicenseTypesResponse"},"RequestUsage":{"properties":{"plan":{"type":"string","enum":["free","pro","anonymous_preview"],"title":"Plan"},"used":{"type":"integer","title":"Used"},"limit":{"type":"integer","title":"Limit"},"remaining":{"type":"integer","title":"Remaining"},"period_start":{"type":"string","format":"date-time","title":"Period Start"},"resets_at":{"type":"string","format":"date-time","title":"Resets At"}},"type":"object","required":["plan","used","limit","remaining","period_start","resets_at"],"title":"RequestUsage"},"SearchRequest":{"properties":{"state":{"anyOf":[{"type":"string","maxLength":2,"minLength":1},{"type":"null"}],"title":"State"},"business_name":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Business Name"},"classification":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Classification"},"license_type":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"License Type"},"status":{"anyOf":[{"type":"string","maxLength":32,"minLength":1},{"type":"null"}],"title":"Status"},"city":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"City"},"zip_code":{"anyOf":[{"type":"string","maxLength":16,"minLength":1},{"type":"null"}],"title":"Zip Code"},"page":{"type":"integer","maximum":1000.0,"minimum":1.0,"title":"Page","default":1},"page_size":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Page Size","description":"Records per page, from 1 to 100. Defaults to 20; maximum page size is 100.","default":20}},"type":"object","title":"SearchRequest"},"SearchResponse":{"properties":{"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"},"results":{"items":{"$ref":"#/components/schemas/LicenseDetail"},"type":"array","title":"Results"}},"type":"object","required":["total","page","page_size","results"],"title":"SearchResponse"},"StatesResponse":{"properties":{"states":{"items":{"type":"string"},"type":"array","title":"States"}},"type":"object","required":["states"],"title":"StatesResponse"},"TypesResponse":{"properties":{"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"classifications":{"items":{"type":"string"},"type":"array","title":"Classifications"}},"type":"object","required":["classifications"],"title":"TypesResponse"},"UpdateMonitor":{"properties":{"label":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Label"},"email":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Email"},"subscription_ids":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":10},{"type":"null"}],"title":"Subscription Ids"}},"type":"object","title":"UpdateMonitor"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VerifyResponse":{"properties":{"valid":{"type":"boolean","title":"Valid","description":"True when at least one match has normalized active status. Does not establish identity, work scope, insurance sufficiency, or project eligibility. Unknown status can yield false without an adverse authority finding."},"license":{"anyOf":[{"$ref":"#/components/schemas/LicenseDetail"},{"type":"null"}],"description":"The matching record only when exactly one record matches; null when several match. Inspect matches in every case."},"matches":{"items":{"$ref":"#/components/schemas/LicenseDetail"},"type":"array","title":"Matches","default":[],"description":"All matching records. Multiple records require review; no match returns HTTP 404 rather than an empty successful verification."}},"type":"object","required":["valid"],"title":"VerifyResponse"}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"StateLicense API key or Clerk session token. Portal-only operations require a Clerk session."},"ClerkSession":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Signed-in Clerk portal session required; StateLicense API keys are rejected."}}},"tags":[{"name":"verify","description":"Exact contractor license-number verification."},{"name":"search","description":"Business-name discovery with filters and pagination."},{"name":"meta","description":"Supported states, classifications, and license types."},{"name":"account","description":"Session-authenticated usage and API-key management for the web console."}],"servers":[{"url":"https://api.statelicense.io"}]}