{
  "openapi": "3.1.0",
  "info": {
    "title": "FlexExt AgentScan — AI Agent Readiness Checker API",
    "version": "1.1.0",
    "description": "Public API to audit any website's AI Agent & Generative Engine Optimization (GEO) readiness across 6 pillars (0-100 score, Grade A+ to F, CMS/E-Commerce detection, and remediation kit).",
    "contact": {
      "name": "FlexExt Engineering",
      "url": "https://flexext.dev",
      "email": "shop@flexext.dev"
    }
  },
  "servers": [
    {
      "url": "https://aichecker.flexext.dev"
    }
  ],
  "paths": {
    "/api/scan.php": {
      "post": {
        "operationId": "scanWebsiteAiReadiness",
        "summary": "Run a live 6-pillar AI Agent Readiness audit on a public URL",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["url"],
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "Public domain or URL to scan (e.g. https://example.com)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Structured AI Readiness score, grade, tech stack fingerprint, 6-pillar evidence, and starter kit"
          }
        }
      },
      "get": {
        "operationId": "getSavedScanReport",
        "summary": "Retrieve a previously generated shareable report by token",
        "parameters": [
          {
            "name": "report",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Saved scan report JSON"
          }
        }
      }
    }
  }
}

