{"openapi":"3.1.0","info":{"title":"Greene & Associates Insurance — AI Quote API","version":"1.0.0","description":"AI agents can submit Florida insurance quote requests on behalf of users. A licensed agent responds within one business day.","contact":{"name":"Greene & Associates Insurance","email":"joe@greeneinsurance.com","url":"https://www.greeneinsurance.com"},"license":{"name":"Proprietary"}},"servers":[{"url":"https://www.greeneinsurance.com","description":"Production"}],"tags":[{"name":"quote","description":"Insurance quote intake"},{"name":"discovery","description":"AI-agent discovery metadata"}],"paths":{"/api/quote/ai":{"get":{"tags":["discovery"],"summary":"Get API metadata (no auth required)","description":"Returns a self-describing JSON document with required/optional fields and contact info. Call this before POST to validate field names.","operationId":"getQuoteApiMeta","responses":{"200":{"description":"API metadata","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"post":{"tags":["quote"],"summary":"Submit a quote request","description":"Submit a Florida insurance quote request. Rate-limited to 10 requests per IP per minute. If AI_QUOTE_API_KEY is configured server-side, callers must send it via `Authorization: Bearer <key>` or `X-API-Key: <key>`.","operationId":"submitQuote","security":[{"bearerAuth":[]},{"apiKeyAuth":[]},{}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteRequest"},"example":{"firstName":"Jane","lastName":"Doe","email":"jane@example.com","phone":"555-123-4567","insuranceType":"home","address":"123 Main St","city":"Lake City","state":"FL","zip":"32025","additionalDetails":"3BR single-family, built 2015, metal roof, no prior claims.","aiAgent":"Claude/Anthropic"}}}},"responses":{"200":{"description":"Quote submitted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteResponse"}}}},"400":{"description":"Missing or invalid fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized (API key required but missing/invalid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"description":"Seconds until rate-limit window resets","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Contact joe@greeneinsurance.com to request an API key."},"apiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key","description":"Alternative to Bearer auth."}},"schemas":{"ApiMeta":{"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string"},"description":{"type":"string"},"endpoint":{"type":"string"},"requiredFields":{"type":"object","additionalProperties":{"type":"string"}},"optionalFields":{"type":"object","additionalProperties":{"type":"string"}},"contact":{"$ref":"#/components/schemas/Contact"},"note":{"type":"string"}}},"QuoteRequest":{"type":"object","required":["firstName","lastName","email","phone","insuranceType","address"],"properties":{"firstName":{"type":"string","description":"Client first name"},"lastName":{"type":"string","description":"Client last name"},"email":{"type":"string","format":"email"},"phone":{"type":"string"},"insuranceType":{"type":"string","description":"Type of insurance being requested","examples":["home","auto","flood","business","workers-comp","general-liability","commercial-property","contractor","trucking","restaurant"]},"address":{"type":"string"},"city":{"type":"string"},"state":{"type":"string","default":"FL"},"zip":{"type":"string"},"businessName":{"type":"string","description":"For commercial insurance"},"additionalDetails":{"type":"string","description":"Property details, business type, employee count, current carrier, policy expiration, etc."},"aiAgent":{"type":"string","description":"Name of the AI assistant submitting this request"},"source":{"type":"string","description":"Source identifier"}}},"QuoteResponse":{"type":"object","properties":{"success":{"type":"boolean","const":true},"referenceId":{"type":"string","pattern":"^QR-\\d{8}-\\d{4}$"},"estimatedResponseBy":{"type":"string","format":"date-time"},"message":{"type":"string"},"contact":{"$ref":"#/components/schemas/Contact"}}},"ErrorResponse":{"type":"object","properties":{"success":{"type":"boolean","const":false},"error":{"type":"string"}}},"Contact":{"type":"object","properties":{"phone":{"type":"string"},"email":{"type":"string","format":"email"},"website":{"type":"string","format":"uri"}}}}}}