{
  "openapi": "3.0.3",
  "info": {
    "title": "UploadHTML & WebHub API",
    "description": "Cloudflare Edge API for publishing static HTML pages, managing custom domains, and interacting with WebHub community portals.",
    "version": "2.0.0",
    "contact": {
      "name": "UploadHTML Support",
      "url": "https://uploadhtml.com/support"
    }
  },
  "servers": [
    {
      "url": "https://uploadhtml.com",
      "description": "Production Edge Cloudflare CDN"
    }
  ],
  "paths": {
    "/api/upload": {
      "post": {
        "summary": "Publish static HTML page",
        "operationId": "uploadPage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "html"
                ],
                "properties": {
                  "html": {
                    "type": "string",
                    "description": "HTML content"
                  },
                  "slug": {
                    "type": "string",
                    "description": "Unique slug identifier"
                  },
                  "password": {
                    "type": "string",
                    "description": "Optional password protection"
                  },
                  "ttl": {
                    "type": "integer",
                    "description": "Time to live in seconds"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Uploaded successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string"
                    },
                    "qr_url": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/check/{slug}": {
      "get": {
        "summary": "Check page existence and status",
        "operationId": "checkPage",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Page status information"
          }
        }
      }
    },
    "/api/health": {
      "get": {
        "summary": "System health check and uptime SLA",
        "operationId": "getHealth",
        "responses": {
          "200": {
            "description": "System is healthy and operational"
          }
        }
      }
    }
  }
}