{
  "openapi": "3.1.0",
  "info": {
    "title": "Xweba Digital Growth & AI Web Engineering API",
    "version": "1.0.0",
    "description": "Public API endpoints for Xweba services, WaaS packages, AI diagnostics, and agentic commerce operations.",
    "contact": {
      "name": "Xweba Engineering Team",
      "url": "https://www.xweba.com/contact",
      "email": "info@xweba.com"
    }
  },
  "servers": [
    {
      "url": "https://www.xweba.com",
      "description": "Production Xweba Platform"
    }
  ],
  "paths": {
    "/api/audit": {
      "post": {
        "operationId": "runWebsiteGeoAudit",
        "summary": "Run a real-time AI & GEO readiness diagnostic on a website domain",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["url"],
                "properties": {
                  "url": { "type": "string", "description": "Target domain or URL to inspect" },
                  "industry": { "type": "string", "description": "Optional industry sector" }
                }
              }
            }
          }
        },
        "responses": {
          "200": { "description": "Structured GEO, Schema.org, conversion, and automation readiness scores" }
        }
      }
    },
    "/api/services": {
      "get": {
        "operationId": "getServicesList",
        "summary": "Retrieve Xweba 7 core capability pillars",
        "responses": {
          "200": { "description": "List of engineering and design pillars" }
        }
      }
    },
    "/api/packages": {
      "get": {
        "operationId": "getWaasPackages",
        "summary": "Retrieve Website-as-a-Service tiers in USD and KES",
        "responses": {
          "200": { "description": "List of productized packages and pricing" }
        }
      }
    },
    "/api/paid-audit": {
      "post": {
        "operationId": "purchasePremiumDeepAudit",
        "summary": "Deep Enterprise AI Citation & Knowledge Graph Audit",
        "x-payment-info": {
          "intent": "purchase",
          "method": "http-payment",
          "amount": "0.05",
          "currency": "USD",
          "recipient": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
          "protocols": ["x402", "mpp", "ap2"]
        },
        "responses": {
          "200": { "description": "Enterprise audit results" },
          "402": { "description": "Payment Required via x402 / MPP protocol" }
        }
      }
    },
    "/api/checkout": {
      "post": {
        "operationId": "subscribeWaasTier",
        "summary": "Machine payment checkout for WaaS subscription",
        "x-payment-info": {
          "intent": "subscription",
          "method": "recurring-payment",
          "amount": "59.00",
          "currency": "USD",
          "recipient": "info@xweba.com",
          "protocols": ["mpp", "ap2", "ucp"]
        },
        "responses": {
          "200": { "description": "Subscription confirmed" },
          "402": { "description": "Payment Required" }
        }
      }
    }
  }
}
