{
  "openapi": "3.1.0",
  "info": {
    "title": "Certified Roof Systems Inquiry API",
    "version": "1.0.0",
    "description": "Public, rate-limited inquiry action with human confirmation."
  },
  "servers": [
    {
      "url": "https://certifiedroofsystems.com"
    }
  ],
  "paths": {
    "/api/inquiry": {
      "post": {
        "operationId": "submitBusinessInquiry",
        "summary": "Send a roofing consultation to Certified Roof Systems",
        "description": "Use only with the requester's explicit permission. Do not include payment data, passwords, government identifiers, medical details, privileged communications, or other sensitive data.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "email",
                  "phone",
                  "requestedDates",
                  "requestedLocation"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 120
                  },
                  "email": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 254
                  },
                  "phone": {
                    "type": "string",
                    "minLength": 7,
                    "maxLength": 40
                  },
                  "requestedDates": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 180,
                    "description": "Preferred date, range, deadline, or flexible timing."
                  },
                  "requestedLocation": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 180,
                    "description": "Requested service, office, city, or service area."
                  },
                  "notes": {
                    "type": "string",
                    "maxLength": 3000
                  },
                  "website": {
                    "type": "string",
                    "maxLength": 200,
                    "description": "Leave empty; anti-spam field."
                  },
                  "formStartedAt": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "Form opening time as Unix milliseconds."
                  },
                  "sourcePage": {
                    "type": "string"
                  },
                  "submissionChannel": {
                    "type": "string",
                    "enum": [
                      "website",
                      "user-delegated-agent"
                    ]
                  },
                  "agentName": {
                    "type": "string",
                    "maxLength": 120
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Accepted for human follow-up"
          },
          "400": {
            "description": "Invalid request"
          },
          "403": {
            "description": "Origin not allowed"
          },
          "413": {
            "description": "Request too large"
          },
          "429": {
            "description": "Rate limited"
          },
          "502": {
            "description": "Delivery failed; inquiry was not delivered"
          },
          "503": {
            "description": "Delivery not configured"
          }
        }
      }
    }
  }
}
