{
  "openapi": "3.1.0",
  "info": {
    "title": "PaintersMN painting quote request",
    "version": "1.0.0",
    "description": "Lets an AI assistant request painting quotes for a Minnesota homeowner, with their permission. The homeowner must confirm by email before anything is shared with a painter."
  },
  "servers": [{ "url": "https://paintersmn.com" }],
  "paths": {
    "/api/public/agent-lead": {
      "post": {
        "operationId": "requestPaintingQuote",
        "summary": "Request painting quotes for a Minnesota homeowner",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["project_type", "city", "timeline", "name", "email"],
                "properties": {
                  "project_type": { "type": "string", "enum": ["interior", "exterior", "cabinets", "deck", "commercial"] },
                  "city": { "type": "string", "description": "Minnesota city name" },
                  "address": { "type": "string" },
                  "scope": { "type": "string", "description": "Rooms, sides, size, condition in plain words" },
                  "timeline": { "type": "string", "enum": ["asap", "this-season", "1-3-months", "flexible"] },
                  "readiness": { "type": "string", "enum": ["ready", "comparing", "researching"] },
                  "ownership": { "type": "string", "enum": ["owner", "renter", "other"] },
                  "name": { "type": "string" },
                  "email": { "type": "string", "format": "email" },
                  "phone": { "type": "string" },
                  "contact_requested": { "type": "boolean", "default": true, "description": "Share with up to 3 matching painters after email confirmation" },
                  "assistant_name": { "type": "string" }
                }
              }
            }
          }
        },
        "responses": {
          "200": { "description": "Saved. Ask the homeowner to confirm the email from PaintersMN." },
          "400": { "description": "Invalid fields or city outside Minnesota" },
          "429": { "description": "Too many requests" }
        }
      }
    }
  }
}
